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)
-   -   options... again (https://forum.x-cart.com/showthread.php?t=21927)

Audiolines 05-19-2006 03:38 PM

options... again
 
ok...

so we have radio buttons for variants working, but we want to display the calculated price of the option next to the option,

for example, we have a new, used and demo item

new - $100
used - $80
demo - $60

i dont understand the math function used to calculate the %savings. i figure this code is similar to what i need.

balinor 05-19-2006 04:34 PM

Here's what I use in modules/Product_Options/customer_options.tpl:

Code:

<OPTION value="{$o.optionid}"{if $o.selected eq 'Y'} selected{/if}>{$o.option_name}{if $v.is_modifier eq 'Y'} ({if $o.modifier_type ne '%'}{math equation="price+modifier" price=$product.taxed_price modifier=$o.price_modifier assign="optionprice"}{include file="currency.tpl" value=$optionprice}{else}{$o.price_modifier}%{/if}){/if}</OPTION>


All times are GMT -8. The time now is 03:37 PM.

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