Magento – Magento 2 | Mini Cart has items but cart is empty | Session problem? | Double clicking on “Proceed To Checkout” redirects to an empty cart

cartcheckoutmagento2.2mini-cartsession

I have a weird problem where my mini-cart is showing that there are products in the cart, however, cart is showing empty.

Also, when refreshing the checkout a few times, it redirects to the cart with a message of:

You have no items in your shopping cart.

Click here to continue shopping.

I have set my cookie life time to 1 year but that didn't solve my problem. Could the problem be related to customer session? Not sure how to debug this.

UPDATE:

When logged in – double click on "Proceed To Checkout" – This clears the cart and "logges out". However, the "Welcome message" still displays the customer name and mini-cart seems to have items inside.

UPDATE 2:
After applying this commit: https://github.com/magento/magento2/commit/9a799f130a0a8b64028de6258e7cf1378bc9bc8f the problem with "Double clicking the 'Proceed to Checkout' button" is now fixed. All it does is disabling the button once it's clicked.

However, when refreshing the checkout twice still redirects to the empty cart with mini-cart still showing items.

Best Answer

Hey it happened with me too and i did one thing which worked for me i know it is not the solution but still it worked. Issue occured when you clicked twice on checkout button while first click request is not processed yet which occur empty cart error what you can do is once checkout button is clicked you can disabled it instently so that i wont click again using JavaScript. Hope this help you too.

If you find this reply helpful mark it as solution cheers coding.

Related Topic