revert Posted July 26, 2013 Share Posted July 26, 2013 Hi, i have small override in product-list.tpl where is reduction percentage calculated from amount of price: {assign var='precentage_amount' value=(($product.price_without_reduction-$product.price)/$product.price_without_reduction*100)} // and the echo <span id="reduction_amount_display"> -{$precentage_amount|string_format:"%d"}% </span> $precentage_amount is 39.891591 and string format of this number without decimals is 39 ??? it may be 40 how to setup roundup up? thank you! Link to comment Share on other sites More sharing options...
NemoPS Posted July 26, 2013 Share Posted July 26, 2013 I think that string format simply cuts the decimal part away. Try with |round Link to comment Share on other sites More sharing options...
Recommended Posts