You can see an example in customer/main/product.tpl:
{math equation="100-(price/lprice)*100" price=$product.taxed_price lprice=$product.list_price format="%3.0f" assign=discount}
{ $discount }%
to change size of downloadable file to show in Kb instead of bites you can use this:
{math equation="length/1000" length=$product.length format="%2.f" assign=file_size}
{ $file_size } Kb
You can read more about "math" function here:
http://smarty.php.net/manual/en/language.function.math.php
Admin FinestShops
Comments