My variant.inventory_quantity is undefined

New Member
2 0 1



I'm using the Brooklyn theme and attempting to allow customers to continue purchasing items that are out of stock, but displaying a message on the variant page that says "This product is on backorder, please expect delayed shipping". 

I've added some console logging to my theme.js and it seems that my variant object has no attribute named inventory_quantity, and when I try to console.log(variant.inventory_quantity) it comes up as undefined. 

I was wondering why this might be, and where the inventory would be tracked then so that I could conditionally display a message?

Willing to hire a developer if needed, thanks!

My site: (password is eastlinq)

Replies 12 (12)
New Member
3 0 1

AlecuMarian Thanks for help!, It worked

New Member
1 0 0

Use current_variant.inventory_quantity instead of variant.inventory_quantity in theme.js file

Shopify Partner
13 0 2


Taz Khan , Shopify Partner, Contact me here: