X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Using {if} {else} statement to display correct text (https://forum.x-cart.com/showthread.php?t=20478)

bedstar 03-13-2006 02:07 AM

Using {if} {else} statement to display correct text
 
Hi Guys

Were having a sale on and i have included a "was" and "now" price The was price is pulled from an extra field and if no price has been entered into this field then i want it to display a piece of code that will automatically display a was price. I have tried the following code but i can't get it to work.

Has anyone any ideas.

Code:


{if $extra_fields[3].field_value ne ""}{math equation="round(p / .9)" p=$product.taxed_price assign=was_price} { include file="currency.tpl" value=$was_price}б═{else}{$extra_fields[3].field_value}{/if}




Regards

John.
Xcart Version 4x

pauldodman 03-14-2006 06:59 AM

Would it not be easier to do this with the List price function instead of creating extra fields?

markwhoo 03-14-2006 10:34 AM

Exactly, just change the damn text to reflect the WAS and IS NOW

lol


All times are GMT -8. The time now is 08:42 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.