Hi everyone!
The theme is Porto.
Is there a way to get the inventory quantity of an item on the cart page?
I’ve listed the properties of the items in the cart, plus the product object and none has the inventory_quantity property.
The only way I can think of as of now is by using Shopify’s API, which I’ve never used btw, to get an item’s inventory value. So I’m quite lost on this.
Any help will be of great value, thanks in advance.
{{lineitem.variant.inventory_quantity}}
1 Like
You saved my day, I’d already spent quite a lot of time on this.
A big and appreciative thank you to you @Kumar2573 .
I missed that property and it’s working wonderfully for what I needed.
1 Like
Do you have any instructions on how to implement this? I tried using the property in the cart template but it returns no value.
in the cart liquid file,
try
{{ item.variant.inventory_quantity }}