Inventory & stock
Stock tracking, the manage-stock gate, and out-of-stock enforcement.
Inventory tracks quantities and decides whether out-of-stock products can be bought.
The stock gate
A single rule decides enforcement, combining:
- a store-level
manage_inventorytoggle (default off), and - a per-product override (inherit / force-on / force-off).
When stock management is active for a product, the storefront blocks add-to-cart and checkout once it's out of stock, and order placement holds against managed quantity. When inactive, products are always purchasable.
Quantities
Set and read available quantity via the inventory mutations/queries. The product
type exposes in_stock / available_qty to the storefront so themes can show
availability.
Note
Stock is enforced at both add-to-cart and order placement, so a product can't be oversold through a race between the two.
