Clicking on the 'Add to Cart' button multiple times quickly for an item that wasn't previously in cart messes up the count of the cart items. #2639
Labels
3: Medium complexity
bug
Bug reports
P4: Nice to have
Priority mark - it's nice to have
QA approved after merge
Testers will add this label after positive check on merged changes
QA approved on branch
Testers will add this label after positive check on specific branch.
Milestone
Current behavior
For a product that isn't already in cart, when the Add to cart button is clicked multiple times quickly without changing the quantity of the item via the quantity field, the count of items in the cart is usually more than what is expected after the cart sync with the server is completed.
If the cart is eventually converted to an order, there is also the tendency for the order to contain the same product as more than one line item.
Expected behavior
The quantity of a product in cart should be the same as the number of times the add to cart button is clicked for that product, provided that the quantity of the product isn't changed via the quantity field.
Steps to reproduce the issue
Can you handle fixing this bug by yourself?
YES
Environment details
Additional information
Investigation revealed that this is due to the content of the request body sent to update an item's quantity on the server in the servercartAfterPulled action of the cart module. By clicking on the Add to cart button quickly multiple times, the request sent to the server causes the server to create the product in cart multiple times with different server_item_id
The text was updated successfully, but these errors were encountered: