Sometime you need to play with the price format. magento default add 2 precision format for the price. now if you want to remove precision or want to keep 3 decimal point for price then you need to do following
1) Open /lib/zend/Currency.php file
2) Find 'precision' => 2 near line no. 78
here is the place, you need to change precision decimal
Change 'precision' => 0 if you want to keep 0 decimal
Do you know how this is done in 1.4? The suggested solution doesn't seem to work there.
ReplyDeleteSame with me. Change that and tried lib/Zend/Locale/Data/es_CL.xml, but nothing. It only changes it on the backend, not on the front.
ReplyDeleteHave you clean the Zend cache in /var directory.
DeleteThat a look at http://xme.im/format-magento-currency-or-number-base-on-locale
is there any solution in 1.4?
ReplyDeleteHow can I change it in 1.5
ReplyDeleteFound out a different simple way in magento 1.5.1
ReplyDeleteGot to code/core/Mage/Directory/Model/Currency.php
change line number 194.
public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
{
return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets);
}
0 - Denotes the precision point for price.
Rahi Jain, great solution! This is the only one I found that has worked in my case.
ReplyDeleteHello you looking some file .xml in src/data to edit.
ReplyDeleteFlush cache, F5--> worked as well as for me
ManhVT