Jump to content

string_format round up not work


Recommended Posts

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

×
×
  • Create New...