AdamB15 Posted January 23, 2015 Share Posted January 23, 2015 Hey all, I've had a search for this already however could only find answers for previous versions and didn't want to risk breaking my store! Currently when a customer logs in, they are taken to their account. However, we would prefer it if they were instead taken to the homepage. How do I go about changing it so that once they have logged in, they are taken to the homepage, rather than my-account ? Many thanks Adam Link to comment Share on other sites More sharing options...
imagetag Posted January 24, 2015 Share Posted January 24, 2015 (edited) I think you will have to override your AuthController. Look for processSubmitLogin(). In this function you should find a redirect to "my-account", in case that no "back" parameter is given. Change this to something like: $link = new Link(); Tools::redirect($link->getPageLink("index")); Not tested, but shouldn't be too wrong Edited January 24, 2015 by imagetag (see edit history) 1 Link to comment Share on other sites More sharing options...
AdamB15 Posted January 24, 2015 Author Share Posted January 24, 2015 This is the only bit I could find within that function - do I need to add the code above? if (!$this->ajax && $back = Tools::getValue('back')){ if ($back == Tools::secureReferrer(Tools::getValue('back'))) Tools::redirect(html_entity_decode($back)); $back = $back ? $back : 'my-account'; Tools::redirect('index.php?controller='.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : $back)); } I see that it's got the 'my-account' but it looks different from what you've put - will leave it as is for now in case of breaking it all Link to comment Share on other sites More sharing options...
feuerbach Posted April 2, 2015 Share Posted April 2, 2015 Unless there is a very specific need, after login the user should be redirected back to the original page. Prestashop apparently doesn't include this feature, at least in 1.6.0.11. Link to comment Share on other sites More sharing options...
amerigeau Posted September 7, 2015 Share Posted September 7, 2015 Bonjour à tous, petite contribution pour cela, j'ai mis à jour mon article avec le fichier AuthController.php pour 1.6 afin de rediriger le client sur le panier quand il se logue. Voici le lien de l'article : http://arnaud-merigeau.fr/tuto-prestashop-rediriger-apres-login-vers-etape-suivante/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now