Search code examples
magentomagento-1.9

Show currency code and currency symbol in magento


I am facing an issue regarding currency.Right now only the currency symbol is shown e.g $50. But I want to show the currency name and currency code e.g. US $50 or A$50 to differentiate among different symbols.

I have found that using the below way one can get the desired things

Currency Code :

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

Currency Symbol :

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

But I cant understand where I should implement this. The Currency converter is present in the header. I want that if user selects "USD" the price of each product display as "US $20".


Solution

  • You can set this from the admin panel:

    Go to admin -> system -> Manage Currency ->symbols

    And set your code and symbol here.