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

Item counter is not updating line item quantity value in storage if same product was added twice (or more) on Quick Order page #18453

Open
jurijsnikolajevs opened this issue Feb 6, 2024 · 0 comments

Comments

@jurijsnikolajevs
Copy link

Describe the bug
When user adds product on Quick order page he enters product SKU to find product. In suggestion dropdown he selects desired product and this product will be added to the table with minimal quantity. He can use item-counter to increase or decrease this product quantity value.
If he adds same product using search (product that is already been added to the table) - quantity field will be increased by 1. And now, if he will be using item counter to change value - value in storage will not be affected (visually on frontend value will be changed) and when user will press Add to Cart button last value (updated by adding same product using search) will be added to the cart.

Tell us the version of Spartacus

  • Library version: 6.8.0

To Reproduce
Steps to reproduce the behavior:

  1. Go to Quick Order page
  2. Add any product using search (quantity of this product will be 1)
  3. Increase this quantity to 3 using item-counter (quantity of product is 3)
  4. Add same product using search (by entering same SKU) (quantity of product will be 4)
  5. Increase quantity to 6 using item-counter (visually in table quantity will be 6)
  6. Press Add to Cart button and validate quantity added to cart (quantity added to cart will be 4)

You can also notice that item-counter is not changing quantity stored in storage by adding same product for the 3rd time instead of pressing Add to Cart button on last step. When quantity is 6 (see reproduction steps upper) - add same product using SKU for 3rd time. When you will do that - you will notice that quantity became 5 instead of expected 7.

Expected behavior
After user adds product that already been added to quick order table using search for 2nd, 3rd, 4th and so on time, quantity of this product must be increased. Item-counter associated with current product line item should work properly after this (if user later will be changing quantity using item-counter - this changes must be passed to storage and later to the cart).

Screenshots
image
image
image
image

Desktop (please complete the following information):

  • OS: Window 10
  • Browser Chrome
  • Version 121.0.6167.140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant