I'm looking to create a new reward currency, so instead of my Magento store selling $ 300.00 dollars, I want it to display 300 reward points.
I already tried the bad practice solution by adding this to the currency section in the lib / Zend / Locale / Data / en.xml directory
<currency type="RWP">
<displayName>Reward Point</displayName>
<displayName count="one">Reward Point</displayName>
<displayName count="other">Reward Points</displayName>
<symbol>Reward Points</symbol>
</currency>
I managed to turn it on and use it in Magento by following this topic:
http://www.magentocommerce.com/boards/viewthread/56508/
but it still uses the default formatting template: ¤ #,##0.00so it looks like Bonus Points800.00
My locale is set to ru_CA , and as far as I can tell, I was unable to change the formatting template without affecting the CDN and USD format either.
I tried to override Mage_Core_Model_Store, so if the current currency code is RWP, it will format the price using an array of formatting options, but this does not work when I'm in the product view. Not to mention that it also seems like a really dirty way to achieve what I want.
public function formatPrice($price, $includeContainer = true)
{
if ($this->getCurrentCurrency()) {
$options = array();
if ($this->getCurrentCurrencyCode() == 'RWP') {
$options = array(
'position' => 16,
'precision' => 0,
'format'=> '#,##0.00 '
);
}
return $this->getCurrentCurrency()->format($price, $options, $includeContainer);
}
return $price;
}
source
share