Jump to content

Blank products


huggettm

Recommended Posts

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"

 

 

 

 

 

Link to comment
Share on other sites

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 by keat
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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 by keat
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...