By using Magento’s Directory Helper class, you can easily convert between available currencies.
You have to make sure that you have loaded the exchange rates for the currencies you are converting.
// Currency conversion rates have to be available in the target currency
$fromCur = 'USD'; // currency code to convert from - usually your base currency
$toCur = 'EUR'; // currency to convert to
$price = Mage::helper('directory')->
currencyConvert($tax->getPrice($product, $product->getFinalPrice(), false), $fromCur, $toCur);
// if you want it rounded:
$converted_final_price = Mage::app()->getStore()->roundPrice($price);
Originally published on magebase.com. Copyright © 2010 Magebase - All Rights Reserved.




Proud members of the 









Mage::helper(‘directory’)->currencyConvert()
is not working in magento v1.5
please let me know what I should use in v1.5?
The method is there and it should be working. Have you made sure that you have loaded the exchange rates for the currency you are trying to convert to or from as it states above?
I’m using magento v1.4.
My base currency is “INR” and I wan’t to convert currrent cuurrency to base currency.
$priceOne = Mage::helper(‘directory’)->currencyConvert($price, $currentCurrencyCode, $baseCurrencyCode);
not working above code????
but $priceTwo = Mage::helper(‘directory’)->currencyConvert($price, $baseCurrencyCode, $currentCurrencyCode);
working i,e vice versa its working.
Please let me know the solution.