cancel
Showing results for 
Search instead for 
Did you mean: 

User Login

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

User Login

How to redirect User to Home page after login in Magento 1.9 ?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: User Login

Hello @foysal 

 

To redirect to the homepage follow bellow steps:

Go to
admin > System > Configuration > customer configuration > Login Options >

and set “Redirect Customer to Account Dashboard after Logging in” to No.

 

Then open
\app\code\core\Mage\Customer\controllers\AccountController.php

Look around line 193:
Mage::helper('customer')->getAccountUrl()is the redirection url to customer dashboard. Change this to your desired URL.

So, for example, you can change it from this:

$session->setBeforeAuthUrl(Mage::helper('customer')->getAccountUrl());

To this:
$session->setBeforeAuthUrl(Mage::getBaseUrl());

 

Note: Override this file in the local folder, before doing any changes in this.

 

Other solution:

 

follow below URL:

https://magento.stackexchange.com/questions/93351/customer-login-redirect-to-homepage

Manish Mittal
https://www.manishmittal.com/

View solution in original post

1 REPLY 1

Re: User Login

Hello @foysal 

 

To redirect to the homepage follow bellow steps:

Go to
admin > System > Configuration > customer configuration > Login Options >

and set “Redirect Customer to Account Dashboard after Logging in” to No.

 

Then open
\app\code\core\Mage\Customer\controllers\AccountController.php

Look around line 193:
Mage::helper('customer')->getAccountUrl()is the redirection url to customer dashboard. Change this to your desired URL.

So, for example, you can change it from this:

$session->setBeforeAuthUrl(Mage::helper('customer')->getAccountUrl());

To this:
$session->setBeforeAuthUrl(Mage::getBaseUrl());

 

Note: Override this file in the local folder, before doing any changes in this.

 

Other solution:

 

follow below URL:

https://magento.stackexchange.com/questions/93351/customer-login-redirect-to-homepage

Manish Mittal
https://www.manishmittal.com/