Raghubendra Posted November 5, 2014 Share Posted November 5, 2014 I am new to prestashop and I am developing a module. In the module I want to run some code whenever a user logs out. Is there any way to achieve the same. Thanks in advance. Link to comment Share on other sites More sharing options...
NemoPS Posted November 5, 2014 Share Posted November 5, 2014 There is no hook, so you have to override this method of the Customer class public function mylogout() { if (isset(Context::getContext()->cookie)) Context::getContext()->cookie->mylogout(); $this->logged = 0; } 1 Link to comment Share on other sites More sharing options...
Raghubendra Posted November 5, 2014 Author Share Posted November 5, 2014 Thanks for your reply. But I still don't get it, can you please explain in details how it is going to be done. Let me explain what I want to achieve :- I have set a cookie in my module for some specific purpose and I want that when the customer logs out then the cookie should be unset. Is is possible to achieve the above case anyhow? Please reply soon. Thanks in advance. Link to comment Share on other sites More sharing options...
NemoPS Posted November 7, 2014 Share Posted November 7, 2014 Which method are you using? 'Cause if you use $this->context->cookie->__set() as you should, it would be erased anyway once logging out Link to comment Share on other sites More sharing options...
Recommended Posts