I'm trying to set the currency based on IP lookup.
So far I've found only this php snippet for setting the currency http://ravikumar85.blogspot.ie/2010/02/magento-set-base-currency-through-code.html
but if I put this code in index.php just before Mage::run()
if($geolookup == 'UK') {
Mage::app()->getStore()->setCurrentCurrencyCode('GBP');
}
I get this error
There has been an error processing your request
Mage registry key "controller" already exists
Any idea?
Thanks