Skip to content

Clear cart not working when logged in (v1.11.1) #4062

@grimasod

Description

@grimasod

Current behavior

Clicking the "Clear cart" button only clears the cart in the client, not on the backend server. After reloading the page the previous cart contents reappear. Other problems can occur because of this, like quantities multiplying in the cart.

The Microcart clearCart method calls the cart/clear action, which deletes the server token. When cart/sync is called next, the server cart can't be synchronized.

Expected behavior

Clearing the cart should result in an empty cart on the server.

Steps to reproduce the issue

Repository

  1. Log in and add an item to the cart
  2. Open Microcart and click "Clear cart"
  3. Reload the page
  4. The product is in the cart again

Can you handle fixing this bug by yourself?

  • YES
  • NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
  • This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
  • This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Environment details

  • Browser:
  • OS:
  • Node:
  • Code Version: v1.11.1

Additional information

New in v1.11.1

Metadata

Metadata

Assignees

Labels

P2: ImportantPriority mark - still high ;)bugBug reports

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions