Skip to content

[2.1.11] Add to cart, try to checkout, cart is empty but mini-cart has items. #13427

@aeu

Description

@aeu

Issue

We have been getting reports from users saying that they added product to cart, tried to checkout, but when they go to the cart, the cart was empty, but the mini-cart still showed products.

We have been getting customer complaints about this issue in every release of Magento 2 we have used since October, up to and including our current implementation which is 2.1.11.

This has obviously been a nightmare to debug, but we have figured out how to reproduce it 100%, in Luma.

Preconditions

Dedicated server,
Magento 2.1.11.
CentOS 7.3.
PHP 7.
MariaDB.
Double Redis (session and cache).
Images on a CDN.

Steps to reproduce

  1. Add product to cart
  2. Click on cart
  3. Click on checkout button multiple times before the checkout page has loaded. At least two clicks are necessary.
  4. You will now be on a cart page page that says your cart is empty but your minicart will still have content.

Actual result

The user will be directed to a cart page saying there are no items in the cart, but the mini-cart will still have contents.

Expected result

The cart should have items in it.

Misc

I believe that this is probably related to the "Hit refresh multiple times fast in checkout and your cart will be empty" bug edit which can be referenced here - #12362

Fix

We added some client-side code to disable the "checkout" button after it was clicked, which solves this issue. This obviously does not resolve the fundamental problem (double refresh on checkout page clears cart) but it should be done anyway if for no other reason than to reduce server load. We can create a pull request for this if needed.

screen shot 2018-01-25 at 9 56 10 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions