huggettm Posted January 29, 2018 Share Posted January 29, 2018 Hi, somehow customers are able to add blank products to the shipping basket for example 1 x Police Helmet. Hard Plastic (Hats) - Male - One Size - BH031 ($2.68) $2.68 1 x Glitter Black Toppers, Plastic (Hats) - Unisex - One Size - BH084 ($1.47) $1.47 1 x - ($0.00) $0.00 1 x - ($0.00) $0.00 Subtotal:$4.15 Total Discount :$0.00 Shipping:$8.55 Total Tax:$0.00 Total:$12.70 any ideas how? Looking at the db they have a product id of "0" Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted January 29, 2018 Share Posted January 29, 2018 Is your store up to date? Quote Link to comment Share on other sites More sharing options...
huggettm Posted January 29, 2018 Author Share Posted January 29, 2018 V 6.1.8. Quote Link to comment Share on other sites More sharing options...
keat Posted January 29, 2018 Share Posted January 29, 2018 (edited) I see this quite often, and have no idea what's causing it. I think I have it narrowed down to one or two scenarios, maybe something to do with sessions or cookies, but i'm unable to recreate it. 1. Customer using a mobile device, adds items to his cart, minimises his session, (which is really easy to do on a mobile device) and then comes back to it after sessions_max_lifetime has elapsed. (sessions_max_lifetime is another story.) 2. or Customer adds items to his cart, proceeds with checkout and closes his browser. Something in the session doesn't clear down properly. When he later returns these become null items and are still lurking somewhere. I had one customer recently, says when he opened his browser, he found his previous order still in his basket, despite him checking out, and paying for this order, days previous. He cleared the items out manually. As far as he was concrened, these items had now gone. However, his order came through to us, with a dozen or so null items. Edited January 29, 2018 by keat Quote Link to comment Share on other sites More sharing options...
huggettm Posted January 29, 2018 Author Share Posted January 29, 2018 so perhaps some automated cache clear would help? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted January 29, 2018 Share Posted January 29, 2018 Ideally you want to have your own VPS and make sure the session garbage clean up syncs with PHP session length. Increasing the gx_maxlifetime should help. It was a while ago this came up now so I don't exactly remember the ins and outs but it can certainly be solved with some PHP config changes. Quote Link to comment Share on other sites More sharing options...
huggettm Posted January 29, 2018 Author Share Posted January 29, 2018 we have our own vps, if you have advised on it before could you check the integration? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted January 29, 2018 Share Posted January 29, 2018 Essentially the gc_maxlifetime value is lower than the cookie session. This means the session data on the server doesn't exists when the cookie does. It was some months ago I looked at this with @keat and I have to say I can't remember what the best scenario was. I seem to remember setting your own save path with long gc_maxlifetime was the best solution. Quote Link to comment Share on other sites More sharing options...
keat Posted January 29, 2018 Share Posted January 29, 2018 (edited) Session_gc_maxlifetime is 20 minutes by default. Any session that's opened and the mouse not moved or a click generated within a 20 miniute period is deemed stale by PHP and subsequently deleted. Although the 20 minutes has a second variable which could make this more like 40 - 60 minutes. I increased session.cookie_lifetime and session_gc_maxliftetime to 7 days (604800), which cured one problem relating to null products, but not all of them. I still see them. I guess it's possible that your customer added the two items to his basket and left his session open but untouched, PHP would then remove this as a stale session. The customer then came back finding his cart empty, and re-added them. Although, the experiments we ran a few months back, didn't show an empty basket. To the end user, nothing appeared wrong. If your customer will talk to you, it would be interesting to learn what those 2 items might have been, although in my experience I've yet to find a customer techy enough to understand the issue. @Al Brookbanks do you think reducing session.cookie_lifetime to a value slighty lower than session_gc_maxliftetime might help, or could this make matters worse. Edited January 29, 2018 by keat Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 2, 2018 Share Posted February 2, 2018 Have you discussed with the customer what they did? Add some products, come back an hour later, find their basket empty? (Although, I think what you illustrate above is not caused by session timeouts. I have other ideas.) 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.