Menu
Feedback
Start here
Tutorials
Developer portal

Known Issues
Support Rules
Troubleshooting

Frequently Asked Questions
Announcements
Known issues
Quantity being modified in the wrong item with product-list component (IO/SF)
Quantity being modified in the wrong item with product-list component (IO/SF)
ID: 402976
Backlog
Published on 12/16/2022
Last update on 12/16/2022

Summary

In the "vtex.product-list" component, used on the IO/SF Minicart (vtex.minicart v2) or in "Cart v0" (vtex.checkout-cart), when a cart has the same item sliced in more than one occurrence (for example when it's needed for discounts apportionment or maybe when it has itemAttachments), to change the quantity for their second occurrence will call the API for their first occurrence, so the summed quantity for the item will be wrong.

Other side effects: this bug is changing the quantity for completely different items, or the item is going to a third line – which disappears after reloading the page, so seems somewhat related to the cart optimistic behavior.

Simulation

Considering this cart: https://checkoutio.myvtex.com/cart/add/?sku=282&qty=7&seller=1&sc=1

  • the 7 units will be presented as 1+6 due to the promotion (which sliced the item to ensure their unitary price after being rounded).
  • changing the 2nd item from 6 to 8 should result in 1+8(9 units)
  • this change is being applied on the 1st item, so behaving as from 1 to 8
  • the final result is going as 8+6 (14 units*)

*the items will be regrouped by the API since the rounding is not a problem for the resulted price.

If the cart has completely different SKUs, where both can be presented sliced (3un from SKU A as 1+2 and 3un from SKU B as 1+2), to change the quantity for the second item or on their second occurrence will behave as the other bugs mentioned.

Workaround

N/A

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback