Php Magento - How to redirect user to a custom store after login -


After checking the customer group type, I want to redirect a user after signing in. Now in the login.phtml file, where should I change? Where should I apply my condition to check customer type in code? help please.

After successful sign in login.phtml file is not executed, You must override this controller class

Mage_Customer_AccountController

Refer to this link if you do not know how to override the controller

< / P>

Then type your code in your new AccountController class like this

  public function _loginPostRedirect () {$ session = $ this- & gt; _getSession (); Dana :: log ($ session-> getCustomerGroupId ()); }  

Once logged in with the foreground and check your log /var/log/system.log that you will get the customer group id


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -