keat Posted October 18, 2017 Share Posted October 18, 2017 Is there a save basket function or plugin available. I still have customers trying to use cubecart as a live ordering system, where they open a browser window, add items to the basket and leave the window open to come back to later. I was hoping that increasing sessions.gc_maxlifetime to 3 days would be enough, but it seems not. Quote Link to comment Share on other sites More sharing options...
Noodleman Posted October 18, 2017 Share Posted October 18, 2017 I'm working on one.. wont be around for a while Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 18, 2017 Share Posted October 18, 2017 Latest versions of CubeCart have a session timeout of 604800 (seven days). This value is then assigned to session.gc_maxlifetime and session.cookie_lifetime. However, on a local dev machine, this works as I can work on Monday and get back to it on Saturday and the session would still be alive. On a working installation on a paid hosting service, the session is lost after about an hour or two. So, you may want to confirm with your hosting provider if there is some other factor being imposed upon your site's session length. Quote Link to comment Share on other sites More sharing options...
keat Posted October 19, 2017 Author Share Posted October 19, 2017 I host my own server, so changing these settings is not an issue. I modified sessions.gc_maxlifetime to 3 days, but it seems that 3 days is not enough for some folk. I've now upped this to 7 days, but no doubt someone will still find a way to break it. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 19, 2017 Share Posted October 19, 2017 Where did you modify this value? In the PHP.INI file? In CubeCart's Session class, this value is overwritten if it is less than 604800. You can verify this value in CubeCart's admin, PHP Info screen. Quote Link to comment Share on other sites More sharing options...
keat Posted October 20, 2017 Author Share Posted October 20, 2017 (edited) I did indeed make the changes in php.ini. Having done a lot of fault finding with Al on the sessions.gc_maxlifetime, it seems that the local value is overwritten by the servers master value, so it doesn't matter what value you put in session class, this will be ignored by the server. The default PHP value being only 20 minutes, and about another 20 miniutes to invoke the session delete. (40 minutes in total) This was the ultimate cause of my null orders. Customers leaving the browser window open and the session timing out on the server. Al made some changes to cubecart to try and overcome this, which I believe writes information to a temporary file, but I was lead to believe that even this wasn't going to be straight forward, and of course requires a CubeCart update which is a PITA as I have custom mods. A mod which gives the customer the option to save his basket, would be another effort to try and curb the habit of leaving the browser window open. Edited October 20, 2017 by keat Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 20, 2017 Share Posted October 20, 2017 CubeCart wants to overwrite PHP's (server) master value with a local value. What could happen is that PHP, under some other influence, 1)won't let that happen*, or possibly 2)would force PHP to use the master value instead of any local value, or 3)force PHP to use a value established somewhere else. I know that various PHP settings are overridden by settings in suPHP (et al) and/or mod_security. * CubeCart does not test for a failed ini_set() command in the Session class. If PHP_INFO shows the local value as being what was set, then the command succeeded, and we are left with #2 or #3. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.