1

Magento shows 'shopping cart is empty' when I add a product to cart, but not all of the time. Some products get added without a problem, others do not. And the same product may work fine one time, but then an hour later generates the 'shopping cart is empty' when added to the cart.

I am experiencing this issue with CE v1.9.0.1, and have tried many solutions to it related to folder permissions, session storage, cookie timeouts/paths/domains, etc., but none are working - the issue persists. There are no errors in the exception.log. Chrome developer tools show no console errors, and the cookies all look fine.

This issue has been reported by numerous other users of the site, not just in my testing, so I do not believe it to be related to browser caching.

Might the issue be related to too many concurrent users on the site, or database connections?

Site is https://www.tribilliards.com/

  • Have you ever found a solutions for the issue. (I am writing new answer cuz I don't have enough reputation for writing comment) – hpeev Apr 5 '18 at 13:18
2

After several days of dealing with the same thing I think I have your answer. I too troubleshot it as a session/cookie problem and couldn't find a permenant resolution. Turns out it's server side caching that does this. Turning off block caching and resetting the magento cache saved the day. If you're using any kind of full page cache plugin, this will contribute to the problem as well.

This isn't ideal because it turns off caching for all blocks and does reduce frontend performance. I'm still pretty green at administrating a Magento site, but I understand one can "hole punch" so specific dynamic blocks, like new products, are not cached while your static blocks are. I'll update this answer once I overcome this problem.

1

As I was not being able to find a logical answer to this. This problem is being temporarily fixed by disabling the server cache. But it would be great if somebody can explain this and come up with a more appropriate solution.

1

On my first pass through the site, I was able to replicate the error. I added something to my cart. And then... the cart was empty:

Empty Cart

On the second pass, it seemed to stick: Cart is not empty

Normally, I'd recommend taking a look at the cookie domain, where the sessions are stored, as that's the #1 cause of an empty cart like that. But it sounds like you've been down that road.

I did an SSL test on the site, and it looks like you are only serving https content: SSL test - Okay

I did a speed test, and although the site was a bit slow, it didn't have any major issues that cropped up: Speed Test result

The one thing that I saw that is non-standard is that when you add something to the cart, there is a redirect with a session key in the URL string. It also adds in the rewards points information.

If I had to guess, the problem is most likely with how the rewards points are being called.

  • I completely disabled the Rewards Points extension, and the issue remains. – Ken Munroe Feb 26 '17 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.