Popular Posts

Saturday, 12 April 2014

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(); ?>



..........:)

No comments:

Post a Comment

Magento: How to get last order id

There are many ways to get last order id:   1. From checkout session: $lastOrderId = Mage::getSingleton('checkout/session'...