Skip to content

Incorrect cart sync on login in specific case #3995

@ArturDivante

Description

@ArturDivante

During the tests of #3994 we found out, that cart sync works incorrect in terms of quantity of products:

Steps to reproduce the issue

  1. Login to user account
  2. Add some product to cart
  3. Logout, clear cache
  4. As anonymous user, add the same product to the cart (color & size must match)
  5. Now login to the same account again

Current behavior

Only one item of added product is in the cart.

Expected behavior

Added item should be in cart with quantity set to two (one from current session and one that already was on the account)

When we try this scenario with two diffrent products, everything is working correctly - after step 5 (2nd logging in), user have in cart all items - the ones he added before logging in and ones added before when logged-in. But for 2 pieces of the same product - quantity is not summing.

Repository

next.storefrontcloud.io
demo.storefrontcloud.io

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: Chrome
  • OS: Ubuntu
  • Code Version: 1.11, 1.10.5

Metadata

Metadata

Assignees

Labels

P3: NormalPriority mark - normal prioritybugBug reports

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions