JGG Posted November 26, 2014 Share Posted November 26, 2014 Hi, I am having trouble with log in and log out buttons. When a new user creates an account on the site the login button still says login, with no apparent way to log out. When the page is refreshed, the button still says log in (it should change to log out as soon as the customer is logged in). When the user navigates to a new page the button changes to logout. But now, when you click the logout button, it continues to say logout (it should now say login). In this case, neither refreshing the page nor navigating to a new page will change the logout button to a login button. I have verified that clicking logout does actually log the customer out. This is most likely related to to the commercial theme I am using. When I switch to the default bootstrap theme, the problem does not occur. I have also done a clean test installation of the theme on Prestashop 1.6.0.9 and the problem is the same on that site. I have filed a ticket with the theme author, but have received no response. Also, the problem does not occur with a clean installation of this theme on Prestashop 1.5.4 I am hoping this is a relatively simple issue that I can attempt to fix myself. Any ideas? http://www.modernfrill.ca Thanks. Link to comment Share on other sites More sharing options...
shacker Posted December 1, 2014 Share Posted December 1, 2014 ok, there must be an issue in the rule for is logged or no. if you can edit the tpl of the header links, try to paste the code here to help, or if is a paid theme, better contact the developer Link to comment Share on other sites More sharing options...
El Patron Posted December 1, 2014 Share Posted December 1, 2014 worked fine for me http://screencast.com/t/JLxzKhKqQt8J make sure to clear browser cache and cookies, when we develop shop this can sometimes be an issue Link to comment Share on other sites More sharing options...
JGG Posted December 2, 2014 Author Share Posted December 2, 2014 Thanks for taking a look at this. It works fine now because I "fixed" it by turning off template caching. However, that is not really a fix because I would like to be able to turn on template caching and still have the template work (like the default-bootstrap theme does). I am not sure exactly how much performance I lost by turning off caching, or whether it is worth the time trying to fix the theme. Link to comment Share on other sites More sharing options...
El Patron Posted December 2, 2014 Share Posted December 2, 2014 Hi, you would not want to run without smarty cache compile. It's really a core feature of smarty and significantly helps with performance. If the developer or re-seller of theme has support forum I would use that to describe the bug or post in job offers to get hands on review. Let us know how you get it sorted. thanks Link to comment Share on other sites More sharing options...
shacker Posted December 4, 2014 Share Posted December 4, 2014 is strange that dnt workif you dont force compile. also, you have a javascript error bootstrap.min.js:6 Uncaught TypeError: undefined is not a function Link to comment Share on other sites More sharing options...
taonylu Posted December 18, 2014 Share Posted December 18, 2014 I also met this status. My server is use nginx+ hhvm. I tried some times to fix it. And finally, I append a functions which was used in previous version, and it works. Here I show you the code. In classes folder, Cookie.php line 222, (my version is prestashop 1.6.0.8) public function logout() { $this->_content = array(); $this->_setcookie(); unset($_COOKIE[$this->_name]); $this->_modified = true; $this->write();// Append this } public function mylogout() { unset($this->_content['id_compare']); unset($this->_content['id_customer']); unset($this->_content['id_guest']); unset($this->_content['is_guest']); unset($this->_content['id_connections']); unset($this->_content['customer_lastname']); unset($this->_content['customer_firstname']); unset($this->_content['passwd']); unset($this->_content['logged']); unset($this->_content['email']); unset($this->_content['id_cart']); unset($this->_content['id_address_invoice']); unset($this->_content['id_address_delivery']); $this->_modified = true; $this->write();// Append this } Link to comment Share on other sites More sharing options...
kaviarasan Posted December 19, 2016 Share Posted December 19, 2016 when i log in to my account it working but when i log out it not working properly but some time i refresh after clicking the log out button it getting log out Link to comment Share on other sites More sharing options...
Recommended Posts