Magento – Add to Cart leads to SHOPPING CART IS EMPTY (but not all the time)

magento-1.9

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/

Best Answer

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.

Related Topic