Products Price Decimal Bug (Solved)

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
nurzki
Forum Members
Forum Members
Posts: 11
Joined: Wed Jun 11, 2008 1:54 am

Products Price Decimal Bug (Solved)

Post 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
Last edited by nurzki on Mon Apr 19, 2010 12:12 pm, edited 1 time in total.
Peciura

Re: Products Price Decimal Bug

Post 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':'.':','}
nurzki
Forum Members
Forum Members
Posts: 11
Joined: Wed Jun 11, 2008 1:54 am

Re: Products Price Decimal Bug

Post by nurzki »

Thanks so much It worked well.
Post Reply

Return to “Modules/Add-Ons”