How to redirect User to Home page after login in Magento 1.9 ?
Solved! Go to Solution.
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
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