Showing posts with label Convert price fron current currency to base currency Magento. Show all posts
Showing posts with label Convert price fron current currency to base currency Magento. Show all posts

Wednesday, 5 November 2014

How to convert price to another currency in magento


How to convert price to another currency in magento

Here i show you very simple code to convert current currency to base currency. You can also use any currency code instead of base currency code...

$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
$yourprice = 10;

$convert = Mage::helper('directory')->currencyConvert($yourprice , $baseCurrencyCode, $currentCurrencyCode);