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:
if($this->_CustomerGroup())
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();
$_session->setBeforeAuthUrl(Mage::helper('redirection')->setRedirectOnLogin());
}
}
}
}
Is there someone who can help me out with a piece of code and help me get into the right direction?
Br,
Steve