How Convert USD to INR ( base currency) in magento?.
I tried to below code , but not working.
$amt=1000;
Mage::helper('directory')->currencyConvert($amt, 'USD', 'INR');
But its work on Mage::helper('directory')->currencyConvert($amt, 'INR', 'USD');
Best Answer
You cannot
convert one price currency price to base currency
.because
magento did not calculate base currency rate from other current rate
.Magento
define a price in BASE currency which will convert using rate for other currency
Magento
is calculate other price from base Currency
Please got see Mage_Directory_Model_Currency class on function
Here
show that you can not get base currency from other currency
That means that you code format is
Mage::helper('directory')->currencyConvert($amt, 'baseCurrecy', 'your currency');
Mage::helper('directory')->currencyConvert($amt, 'your currency', 'baseCurrecy');