| View previous topic :: View next topic |
| Author |
Message |
artbasement
Joined: 01 Sep 2008 Posts: 56
|
Posted: Thu Oct 02, 2008 4:45 am Post subject: Help with Php please? |
|
|
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 |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Thu Oct 02, 2008 4:54 am Post subject: |
|
|
AUTOHOTKEY FORUM  _________________
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 |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 3254 Location: Simi Valley, CA
|
Posted: Thu Oct 02, 2008 9:04 am Post subject: |
|
|
| tank wrote: | AUTOHOTKEY FORUM  |
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 |
|
 |
artbasement
Joined: 01 Sep 2008 Posts: 56
|
Posted: Thu Oct 02, 2008 9:18 am Post subject: |
|
|
SORRY
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...  |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Thu Oct 02, 2008 1:38 pm Post subject: |
|
|
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 |
|
 |
|