Discussions

Ask a Question
Back to All

Inventory variable?

Can Tapcart release an inventory variable for use in custom blocks? We're developing a low inventory warning custom block but can't without this variable (and we're not willing to use an API endpoint to do this).


For example, on our online store the following shopify liquid works great:

{% if product.variants.first.inventory_management == "shopify" and product.variants.first.inventory_quantity < 6 and product.variants.first.inventory_quantity > 0 %} Only {{ product.variants.first.inventory_quantity }} left in stock! {% endif %}