kemeris
#1
Beacuse of poor TAX calculation cheme in cs-cart, I am modifying template to suite my need.

I have managed to recalculate “You save” like this:

`{include file="common_templates/price.tpl" value=$product.list_price-$product.taxed_price`

But can't recalculate % of discount. I am trying like this:

`{include file="common_templates/price.tpl" value=($product.list_price-$product.taxed_price) % $product.list_price`

I am getting smarty error, probably because of “(” character

I would appreciate any help

n1xus
#2
use {math equasion}

Here is docs {math} | Smarty

you will get something like this:

{math equasion=“your calc” assign=“new_constant”}

{include file=“common_templates/price.tpl” value=$new_constant

kemeris
#3
[quote name='N1XUS' timestamp='1329123952' post='131152']

use {math equasion}

Here is docs http://www.smarty.ne…e.function.math

you will get something like this:

{math equasion=“your calc” assign=“new_constant”}

{include file=“common_templates/price.tpl” value=$new_constant

[/quote]

Thank you! Thank you!

kemeris
#4
Just in case anyone is interested in this, I ended with this code

{math equation="round((x-y)*100/x)" x=$product.list_price y=$product.taxed_price assign="discount_prc_cust"}

{include file="common_templates/price.tpl" value=$discount_prc_cust