I'm using a custom redirect extension from iPragmatech to redirect a customer to a different URL after logging in. This is based on customer groups.

I have asked the developer for help which he gave me but I'm not fully experienced with programming.

At the moment I can only select one customer group in a dropdown in the backend. I can change the dropdown to a Multiselect but I also need to customize the _CustomerGroup method. In Model/Observer/Customer.php I need to change this line:


This is the total code:

    /*method for Login Redirection*/
public function customerLogin(Varien_Event_Observer $observer)

    if (Mage::helper('redirection')->isEnabled()){  
        $lasturl = Mage::getSingleton('core/session')->getLastUrl();
        if (strpos(Mage::helper('core/http')->getHttpReferer(), 'checkout') === false){
            if (! preg_match("#customer/account/create#", $lasturl) && Mage::helper('redirection')->isoptionEnabled('login_redirection')) {
                    if($this->_CustomerGroup()) {
                    $_session = $this->_getSession();


Is there someone who can help me out with a piece of code and help me get into the right direction?




Your Answer

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

Browse other questions tagged or ask your own question.