ludojlm Posted January 2, 2019 Share Posted January 2, 2019 Bonjour, Je cherche à faire une redirection automatique après l'authentification. J'ai trouvé où le faire, mais je n'ai pas trouvé comment le faire sur la page désirée Je suis sur 1.7.4.4. MyAccountController.php class MyAccountControllerCore extends FrontController { public $auth = true; public $php_self = 'my-account'; public $authRedirection = ''; public $ssl = true; /** * Assign template vars related to page content * @see FrontController::initContent() */ public function initContent() { $this->context->smarty->assign([ 'logout_url' => $this->context->link->getPageLink('index', true, null, 'mylogout') ]); parent::initContent(); $this->setTemplate('customer/my-account'); } } C'est au moment de définir $authRedirection. Si je veux rediriger sur la page d'accueil, je laisse ainsi, mais je souhaite rediriger sur la page "Tous les produits" (2-accueil selon mon url). Je ne sais juste pas quoi mettre : j'ai tenté des évidents (catalog, categories, products), j'ai fouillé un peu en testant les différents options du FrontController, sans grand succès. Si quelqu'un a une idée, d'avance merci Link to comment Share on other sites More sharing options...
isteph26 Posted January 4, 2019 Share Posted January 4, 2019 Salut, Essaie ca : Go to: modules\ps_customersignin\ps_customersignin.php , after line 76 'my_account_url' => $link->getPageLink('my-account', true), I create new url variable 'login_url' => $link->getPageLink('authentication', true), Go to: themes\yourtheme\modules\ps_customersignin\ps_customersignin.tpl change this: <a href="{$my_account_url}" title="{l s='Log in to your customer account' d='Shop.Theme.Customeraccount'}" rel="nofollow" > for this with new variable <a href="{$login_url}" title="{l s='Log in to your customer account' d='Shop.Theme.Customeraccount'}" rel="nofollow" > This is all!! Link to comment Share on other sites More sharing options...
starslider Posted March 4, 2020 Share Posted March 4, 2020 (edited) Bonjour, je déterre d'un an ce topic, mais je ne vois pas de réponse hors je suis dans un cas similaire, voir plus simple. J'utilise Prestashop 1.7.5.1, php 7.3 J'aimerai que mes utilisateurs soit simplement redirigés vers la page d'accueil après l'authentification. Hors je tombe systématiquement vers la page mon compte, qui n'a que peu d’intérêt au final... Une solution? une astuce? Merci de votre aide! 🙂 Edited March 4, 2020 by starslider (see edit history) 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