Menu
Feedback
Start here


Known issues
Out of stock products are displayed as available for purchase on the product page
ID:
Backlog
Published on 2/8/2018
Last update on 12/22/2022

Summary

Products that are out of stock are available for purchase on the product page (the buy button appears). However, by clicking the button and going to the cart, Checkout queries the system and prevents the product from being actually purchased.

The cause of this is a field called stockBalance, which is one of the fields used by the Catalog to display (or not) the buy button on the product page. This field displays the total units in stock for an SKU. However, when a product is associated with a gift, stockBalance is returning the gift's stock instead of the SKU's stock. And that's exactly where the problem lies. The scenario will happen when a product has no stock but the gift associated with it does.

Simulation

  • Add a gift to a product that is currently out of stock.
  • Access its product page.

Workaround

For now, the solution is to disassociate the gift from the product with no stock. This will render the product unavailable again.

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