Sunday, July 8, 2012

How to get currency symbol in Magento

To get currency symbol for current store:

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

or if you want to pass a certain currency code to get currency symbol, then use it:

<?php echo Mage::app()->getLocale()->currency('[CURRENCY_CODE]')->getSymbol(); ?>

Where CURRENCY_CODE should be replaced by currency code of your store:For Example:

<?php echo Mage::app()->getLocale()->currency('AUD')->getSymbol(); ?>

That's it.. Enjoy :)

1 comment:

Anonymous said...

thanks a lot for this :)