vtex-apps / product-quantity

The Product Quantity allows users to a add a chosen amount of the displayed product in their cart.
0 stars 14 forks source link

AvailableQuantity prop returning 10,000 for all products when out of pdp #56

Open Gustavo-Gava opened 2 years ago

Gustavo-Gava commented 2 years ago

Describe the bug When we use the component outside the product page, the AvailableQuantity property defaults to 10,000 for all products, allowing the user to add quantities up to that limit, and only on the minicart validating with the correct quantity.

To Reproduce Steps to reproduce the behavior:

  1. Go to this site
  2. Scroll down to the shelf
  3. Add a large quantity of items in the quantity selector, and after that click the CTA button.
  4. Go to the minicart and see that the added quantity was not available

Expected behavior The expected behavior was that validation of the amount of product available would occur, just as it does when the component is in the PDP.

Screenshots image image (2) (1) image (3) (1)

Desktop environment:

System: OS: Windows 10 10.0.19043 CPU: (12) x64 AMD Ryzen 5 5600 6-Core Processor Memory: 5.57 GB / 15.95 GB Binaries: Node: 14.17.6 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.71) Internet Explorer: 11.0.19041.1566