If all my customers had a custom field containing either 'GBP' or 'EURO' for example, is it possible for the store to switch currency based on this custom field value once they login?

So EURO customers see Euro pricing, and GBP see GBP pricing.

  • use : Mage::app()->getStore()->setCurrentCurrencyCode('USD'); Mage::app()->getStore()->setCurrentCurrencyCode('GBP'); base on condition Oct 21, 2016 at 10:17

1 Answer 1


You can define an observer on controller_action_layout_render_before and have something like this:

function controllerActionLayoutRenderBefore($observer)
    if(!Mage::getSingleton('customer/session')->isLoggedIn()) return;

    $customer = Mage::getSingleton('customer/session')->getCustomer();
    $currency = $customer->getData('my_currency_attribute');

    if (!empty($currency))

Given that the value of your attribute matches EXACTLY the available currency codes (in your example it should EUR instead of EURO)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.