aguha2050 Posted December 21, 2014 Share Posted December 21, 2014 Hello devs, I am new to Prestashop, I want to redirect customers when they logout to a "Thank You" Custom Page. Is there any way to do that? I'm sure there is, just need your help. I'm using prestashop v1.6.0.9, deafult prestashop theme. Thanks a lot... Link to comment Share on other sites More sharing options...
eontech Posted December 21, 2014 Share Posted December 21, 2014 Hi, I believe if you create an override for customer.php class (in the /override folder) with a single copy of mylogout() function you can add this line to the end of that function after: ... $this->logged = 0; Tools::redirect('/path_to_your_custom_page'); 1 Link to comment Share on other sites More sharing options...
aguha2050 Posted December 21, 2014 Author Share Posted December 21, 2014 could you be little more specific please? I am in badly need of your help... Link to comment Share on other sites More sharing options...
MacRoy Posted December 21, 2014 Share Posted December 21, 2014 (edited) Hi! The easiest way to do this is as follows. Go to Translations and select Translations of installed modules. Now look up the DEFAULT BOOTSTRAP - CONFIRMATION Here you will find: For any questions or for further information, please contact our ... You can now enter the PRE (For any questions or for further information, please contact OUR), for example, Thank you for your order. The end result may look like the type like this Thank you for your order! For any questions or for further information, please contact our customer service. This is just one example. You understand now what you can do and how to do it. Best regards MacRoy Edited December 21, 2014 by MacRoy (see edit history) Link to comment Share on other sites More sharing options...
eontech Posted December 21, 2014 Share Posted December 21, 2014 (edited) assuming that you have a custom 'Thank you' CMS page, you can add the single line, mentioned before to mylogout() function in CustomerCore class. You can either modify the core class directly in /classes/customer.php file or create an override of this class (to be able to update your prestashop version and still preserve the changes you made). Look up how to create an override elsewhere and see if that's the route you'd like to take. You only need to include the functions you change in your override class. This should work regardless of whether an order was placed or not. Edited December 21, 2014 by eontech (see edit history) 1 Link to comment Share on other sites More sharing options...
aguha2050 Posted December 21, 2014 Author Share Posted December 21, 2014 (edited) assuming that you have a custom 'Thank you' CMS page, you can add the single line, mentioned before to mylogout() function in CustomerCore class. You can either modify the core class directly in /classes/customer.php file or create an override of this class (to be able to update your prestashop version and still preserve the changes you made). Look up how to create an override elsewhere and see if that's the route you'd like to take. The only need to include the functions you change in your override class. This should work regardless of whether an order was placed or not. Hi, I believe if you create an override for customer.php class (in the /override folder) with a single copy of mylogout() function you can add this line to the end of that function after: ... $this->logged = 0; Tools::redirect('/path_to_your_custom_page'); Thanks a lot jesus (eontech) I got it working with little bit of practical knowledge.. . . . . This is for all future visitor > open classes/customer.php press cntrl+f and search for mylogout() copy pase this code >>> Tools::redirect('/path_to_your_custom_page'); next to $this->logged = 0; (which is already there in customer.php) replace "/path_to_your_custom_page" with your full custom page link.. (yes full link, along with domain, else it will just redirect to home page.) Cheers Edited December 21, 2014 by aguha2050 (see edit history) 1 Link to comment Share on other sites More sharing options...
eontech Posted December 21, 2014 Share Posted December 21, 2014 Glad to hear you got it working. You may still want to look into how to do the same thing using overrides to stop any future version upgrades from over-writing your changes. At any rate, it will be useful if you marked this as solved as described here: Serge Link to comment Share on other sites More sharing options...
astriti Posted December 12, 2016 Share Posted December 12, 2016 Thnx a lot guys 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