archproject Posted May 3, 2010 Share Posted May 3, 2010 Hi there, Is there a module that can set a timeout period of user log in's? and then when the set time is reached it gives out a popup saying "CLICK yes if you still want to be login and NO to log off immediately" or can I set this manually.Something like this http://stackoverflow.com/questions/864133/how-do-you-keep-a-user-logged-in-with-a-popup-windowRegardsArchproject Link to comment Share on other sites More sharing options...
rocky Posted May 3, 2010 Share Posted May 3, 2010 I'm not sure how to display a popup box after a certain period, but I can tell you how to reduce the amount of time before the customer is automatically logged out. Change line 50 of classes/Cookie.php (in Prestashop v1.2.5): $this->_expire = isset($expire) ? intval($expire) : (time() + 1728000); By default, Prestashop's cookie will expire after 1728000 seconds, which causes the customer to be automatically logged out when it is deleted. Simply reduce that number. Link to comment Share on other sites More sharing options...
archproject Posted May 4, 2010 Author Share Posted May 4, 2010 rocky,thanks for your help .... actually i just need that and the popup thing is just something extra ... when the cookie expire will their cart expire too? and will they be redirected to login page ?i will try this out tomorrow,,, thanks Link to comment Share on other sites More sharing options...
rocky Posted May 4, 2010 Share Posted May 4, 2010 I'm not sure what happens when the cookie expires. Try it and see what happens. I have a feeling that it will still appear that you are logged in until you refresh the page or click a link, then Prestashop will display as if you aren't logged in. Link to comment Share on other sites More sharing options...
archproject Posted June 17, 2010 Author Share Posted June 17, 2010 1 728 000 seconds = 480 hoursDarn ... that's along time 480 hours is 20 DAYS.... why did the development team set it to 20 days ... wow .. anyway ... I am testing it ..since I set the cart to be available when the customer log out ... I will see if the cart still there if expires in 60 sec ... hehehe ..EDITED: YES it does ... retain the cart information. my next question is where to change the admin timeout of the back office now Link to comment Share on other sites More sharing options...
sannie Posted May 16, 2011 Share Posted May 16, 2011 Hi rocky,Would you also know how to set the cookie expire date for the referrer cookie?When a visitor comes to my website via a referral site, a cookie is set. But the expiry date is set for 6 months! I need to change this to 14 days. (I checked this by simulating a visitor: open a browser, clear cookie history, visit referral site and clicked on the referral link to my site on the referral site. I can see a new cookie being set in my browser and it's expiry date -Safari: preferences- show cookie).I'm using Prestashop 1.3.6. I've searched everywhere and am at the end of my wits..any help is greatly appreciated! 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