cancel
Showing results for 
Search instead for 
Did you mean: 

Currency error upgrade 1.9.0.1 to 1.9.2.1

Currency error upgrade 1.9.0.1 to 1.9.2.1

After upgrade to version 1.9.2.1 via command line everything works fine except "Create new order from admin panel" 

 

When adding products to the new order there's an error:

 

PHP Fatal error:  Call to a member function getCode() on a non-object in /public_html/includes/src/Mage_Directory_Model_Currency.php on line 194

 

We have base currency as MXN and no other addon currency so we:

Added USD as a second Currency with MXN as a base currency and we could now add products Smiley Happy

 

BUT when selecting payment method got the same error as before Smiley Sad

 

Everything was working fine on 1.9.0.1 any ideas? what could be broken

 

3 REPLIES

Re: Currency error upgrade 1.9.0.1 to 1.9.2.1

Hi.

 

Just before the

 

throw new Exception();

on line 193 of app/code/core/Mage/Directory/Model/Currency.php, can you add in the following

 

var_dump($toCurrency);

and let's see what that outputs.

 

Regards,

Andy 

Problem solved? Click Accept as Solution!
www.iwebsolutions.co.uk | Magento Small Business Partner

Re: Currency error upgrade 1.9.0.1 to 1.9.2.1

Thanks for the quick response iweb_smartie

 

used:  Mage::log('$toCurrency = '.$toCurrency,null,'debug.log',true);

instead of var_dump() 

 

And I got the following:

 

DEBUG (7): $toCurrency = false

 

 

Re: Currency error upgrade 1.9.0.1 to 1.9.2.1