Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Cart Becomes Empty When Updating Configurable Products #4391

Open
3 tasks
Masumisigma opened this issue Feb 5, 2025 · 1 comment
Open
3 tasks

[bug]: Cart Becomes Empty When Updating Configurable Products #4391

Masumisigma opened this issue Feb 5, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Masumisigma
Copy link

Describe the bug
When updating a configurable product in the cart under certain conditions, the cart becomes empty instead of retaining the selected item.

Issue 1: Selecting the same configurable product option
When a user tries to update a configurable product in the cart and selects the same options as before, the item is removed from the cart but not re-added, leaving the cart empty.
Issue 2: Selecting an out-of-stock configurable option
If a user updates a configurable product by selecting a variant that is out of stock, the item is removed from the cart, and the new selection is not added. This results in an empty cart instead of keeping the original item.
To reproduce

Scenario 1: Selecting the Same Configurable Option
Add a configurable product (e.g., a T-shirt with size M, color Red) to the cart.
Go to the cart page and attempt to update the product by selecting the same size and color.
Observe that the item gets removed from the cart and is not re-added.
Scenario 2: Selecting an Out-of-Stock Option
Add a configurable product (e.g., a T-shirt with size M, color Red) to the cart.
Go to the cart page and try updating the product by selecting a different variant that is out of stock (e.g., size L, color Blue).
The original item gets removed from the cart, and the new item is not added.
The cart becomes empty.

Expected behavior

If the user selects the same configurable option, the cart should remain unchanged.
If the user selects an out-of-stock option, the system should prevent the update and retain the original item in the cart.
The cart should never become empty due to a failed update.

Screenshots

https://github.com/user-attachments/assets/82f1c78c-3d6e-40e1-9629-87597500b9ac
https://github.com/user-attachments/assets/f54a3259-8a25-4730-a1dc-e58bb610e477

Possible solutions

Add any ideas about possible solutions to the problem here.

Debug Report

Paste the output of yarn build:report, and any other context about the problem, here.

Please complete the following device information:

  • Browser: Chrome, Safari
  • Browser Version: 132.0.1
  • Magento Version: 2.4.4

Please let us know what packages this bug is in regards to:

  • venia-concept
  • venia-ui
  • pwa-buildpack
@Masumisigma Masumisigma added the bug Something isn't working label Feb 5, 2025
Copy link

m2-assistant bot commented Feb 5, 2025

Hi @Masumisigma. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant