Sunday, 27 July 2014

Get Currency code and symbol in magento


Get Currency code and symbol in magento

Currency Code :

<?php echo $currency_code = Mage::app()->getStore()->getCurrentCurrencyCode(); ?>

Currency Symbol :

<?php echo Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol(); ?>

3 comments:

Anonymous said...

Thank You! That helped me.

Anonymous said...

cool!

Anonymous said...

I found out for my case that:

If your code and symbol are the same, getSymbol() wont return any value.

In this case, either change your symbol to another value or just use:

$currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();