I found snippet here, but it seems it is broken as second parameter (target currency) is expected to be object
So correct would be
$targetCurrency = Mage::getModel('directory/currency')->load('EUR');
$price = round(Mage::helper('directory')->currencyConvert($priceToConvert, 'GBP', $targetCurrency), 2);

#1 by shyam on August 27, 2010 - 10:25
Quote
Hi….
I am getting the following error,when i am going to convert the currency price from one to another….
Fatal error: Call to a member function getCode() on a non-object in /opt/lampp/htdocs/magento/app/code/core/Mage/Directory/Model/Currency.php on line 171