Thought I would post this up in case anyway else needs it.
In Magenta 1.3 to change currency from two decimals to zero decimals:
Change
Code:
lib/Zend/Currency.php file on line 78 from
'precision'=>2
to
'precision'=>0
All your backend currency values are now in zero decimals and then
Code:
/app/code/core/Mage/Core/Model/Store.php
around line 733 from
public function formatPrice($price, $includeContainer = true)
{
if ($this->getCurrentCurrency()) {
return $this->getCurrentCurrency()->format($price, array(), $includeContainer);
}
return $price;
}
to
public function formatPrice($price, $includeContainer = true)
{
if ($this->getCurrentCurrency()) {
if($this->getCurrentCurrency() == "USD") {
return $this->getCurrentCurrency()->format($price, array('precision'=>2), $includeContainer);
}
else {
return $this->getCurrentCurrency()->format($price, array('precision'=>0), $includeContainer);
}
}
return $price;
}
If you want more currency options on the front end, just add using more conditionals.
Thats all.
Last edited by TWD; 03-29-2010 at 09:15 AM..
|