AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help with Php please?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
artbasement



Joined: 01 Sep 2008
Posts: 56

PostPosted: Thu Oct 02, 2008 4:45 am    Post subject: Help with Php please? Reply with quote

I am trying to edit some Php in my online cart, so that in a Drop Down list of delivery options, if the delivery has a cost of "£0.00" it will show the user "FREE" instead of "£0.00" but if it shows "£7.95" (not free) it will still show the price.

I have found the bit of script, but I can't get it to work. I am a novice at Php so it's probably very simple, but if you could show me how that would be great...

Code:
<div class="formLine">
<div class="formSpace">   
<select id="select_shipping_method" name="shipping_method">
{foreach from=$shipping_methods item="sm"}
<option value="{$sm.ssid}" {if $sm.checked == "yes"}selected="selected"{assign var="current_shipping_amount" value=$sm.shipping_price}{/if} onchange="opcRecalcTotalOnShippingChange()">
         
{if $sm.shipping_price|price < 1}   
                                                                         
{$sm.method_name|htmlspecialchars} - {$sm.shipping_price|price}
                                                                         
{else}
   
{if $sm.shipping_price|price > 1}
{$sm.method_name|htmlspecialchars} - FREE   
{/if}
{/if}
</option>
{/foreach}      
</select>
</div>
</div>
Back to top
View user's profile Send private message MSN Messenger
tank



Joined: 21 Dec 2007
Posts: 3700
Location: Louisville KY USA

PostPosted: Thu Oct 02, 2008 4:54 am    Post subject: Reply with quote

Twisted Evil Twisted Evil Twisted Evil AUTOHOTKEY FORUM Evil or Very Mad Evil or Very Mad Rolling Eyes
_________________

We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Back to top
View user's profile Send private message
[VxE]



Joined: 07 Oct 2006
Posts: 3254
Location: Simi Valley, CA

PostPosted: Thu Oct 02, 2008 9:04 am    Post subject: Reply with quote

tank wrote:
Twisted Evil Twisted Evil Twisted Evil AUTOHOTKEY FORUM Evil or Very Mad Evil or Very Mad Rolling Eyes


In that case...

Onegai Shimasu wrote:
SWM-25, 6'1" 82kg, enjoys cooking, programming, anime, shopping, fiction novels, and helping others. Seeking kind SF in mid-20's. Must have very colorful imagination. Local plz, USA 93021 (805) *** ****
(\,~~,/)
('"0_0")
.\>♥</
' [_|_]


[/sarcasm]
_________________
Ternary (a ? b : c) guide     TSV Table Manipulation Library
Post code inside [code][/code] tags!
Back to top
View user's profile Send private message
artbasement



Joined: 01 Sep 2008
Posts: 56

PostPosted: Thu Oct 02, 2008 9:18 am    Post subject: Reply with quote

SORRY
Embarassed
It was something which I thought might be of interest and easy for one of you to answer.

Have posted it on Php forum instead... Embarassed
Back to top
View user's profile Send private message MSN Messenger
tank



Joined: 21 Dec 2007
Posts: 3700
Location: Louisville KY USA

PostPosted: Thu Oct 02, 2008 1:38 pm    Post subject: Reply with quote

please keep in mind the nose thumbing was meant to convey a point but was done with the hope of being in humor as well
_________________

We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group