Add to cart button brings you to an empty cart for certain products need help troubleshooting!

magento.stackexchange https://magento.stackexchange.com//questions/80854

  •  13-12-2019
  •  | 
  •  

Question

So not one person in all of this section can help troubleshoot session issues?

NOTE I've completely updated my question as this was never resolved:


EDIT: I just noticed that while I set 777 on var/session new files that are created are set to 600 (rw) Could this be the culprit?


If customer A adds product "pencil" to cart - customer A can checkout

If customer B adds product "pencil" to cart - customer B, C, D gets an empty cart

After customer A adds product to cart, no one can add to cart for that product - eventually you can but I haven't figured out why yet.

So I am leaning towards cookies or a session problem.

What I've already tried:

  • Set cookie life time to 24 hours (86400)
  • Set all indexes to Update on save
  • Re-index all indexes
  • Cleared all caches
  • Verified that var/sessions is 777
  • Disk is not full
  • No messages in the log files

Here is a portion of my Web configuration:

enter image description here

Do these settings look correct?

Are there additional steps that I can take to figure this out?

Was it helpful?

Solution 4

So after months of trying to figure this out and 150 bounty points later, the solution is to set a minimum quantity in the cart:

  • System -> Configuration
  • Inventory -> Product Stock Options
  • Next to Minimum Qty Allowed in Shopping Cart click Add Minimum Qty
  • Set to ALL GROUPS quantity 1
  • Click Save

-

To recreate the issue:

  • Ensure there is no Minimum Qty Allowed in Shopping Cart set.
  • Add a product to cart
  • From the cart page, enter 0 as the quantity and press UPDATE SHOPPING CART and the cart will empty

This was some how happening immediately on add to cart but lack of interest from more experienced people in this community has me not caring either - just that I posted what fixed the issue.

OTHER TIPS

Empty carts are usually one of two things in my experience:

  • Disk is FULL
  • There is an exception that is wrapped in a try/catch that traps the error but doesn't push to Mage::logException
  • There is a problem with sessions

In general, though, it's usually a full hard drive.

The products that don't work, are they using the same template as the ones that do? My first thought was a custom template missing the <?php echo $this->getBlockHtml('formkey');?> but then that should have been failing in 1.9.0.1 too.

Even so, if you're sure these products were OK before the upgrade then custom templates/blocks/models are a likely cause. Here are some things you can try:

  1. Check with the vendors of any third-party extensions you've got, that these extensions are compatible with 1.9.2.
  2. If you're using a custom theme, switch back to rwd/default (you can do this for a single product as a test) and see if the problem persists.
  3. Maybe an obvious one, but by the same token easy to take for granted: make sure logging is actually enabled. System > Configuration > Developer > Log Settings
  4. Check your web server log file (e.g. /var/log/apache2/error_log or /var/log/nginx/error.log)
  5. Temporarily remove / rename custom PHP code in app/code/local/Mage/* that you think might be involved, see if the app/code/core versions work any better.

Also, try and find a pattern to the problem. Is it only Simple products that are affected? Or is it Configurable products, or Bundles etc etc? Is it products with Special Prices? They're bound to have something in common.

Good luck! :)

We had exactly the same problem after updating to 1.9.2 from 1.7.0.2 and it was a session problem. Please check your cookie domain settings and use your domain name without "." It will be added by code.

To add additional solutions, only a select few of my bundled products would return an empty cart when the "add to cart" button was clicked.

Several of the child-products, the "not visible individually" products that were the specific size for the parent product were disabled, but for some reason they were still showing up as options in the drop down menu. Enabling them solved the issue for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top