Skip to Content

Inventory

The inventory object describes inventory information for a product or variant, including available quantity and status.

Usage Example

{%- comment -%} Show inventory status {%- endcomment -%} {% if inventory.available %} <p>In stock: {{ inventory.quantity }} items</p> {% else %} <p>Out of stock</p> {% endif %}

Properties

available

Returns true if the item is available in inventory.

id

Returns the unique id for this inventory record.

location

Returns the location of the inventory (if applicable).

quantity

Returns the available quantity in inventory.

Last updated on