Menu
Feedback
Known issues
Out of stock products are displayed as available for purchase on the product page
Marketing & Merchandising
ID:
Backlog
Published on2/8/2018
Last updated on12/22/2022
1 min read

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
Was this helpful?
Yes
No
Suggest Edits (GitHub)
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 VTEX support
For personalized assistance, contact our experts
Open a support ticket
GitHubDeveloper PortalCommunityFeedback