Page 1 of 1
Products Price Decimal Bug (Solved)
Posted: Mon Apr 19, 2010 5:51 am
by nurzki
On my Item the price is $3.50 but when I look at in Summary View page it displays : $3.5 but when I change it to $3.51 it display correctly. Am I missing something or perhaps some configuration? pls help
Version is 2.7 also appears on 2.6.1
Re: Products Price Decimal Bug
Posted: Mon Apr 19, 2010 8:48 am
by Peciura
You are missing smarty variable modifier "string_format"
http://www.smarty.net/manual/en/languag ... format.php
Code: Select all
{$entry->price|string_format:'%.2f'}
Some times it is handy to use "number_format". It is not smarty standard variable modifier so refer to php manual how to use it
http://php.net/manual/en/function.number-format.php
Code: Select all
{$entry->price|number_format:'2':'.':','}
Re: Products Price Decimal Bug
Posted: Mon Apr 19, 2010 12:09 pm
by nurzki
Thanks so much It worked well.