Like the question says. I know you can check if a variant is "in stock" with v.hasStock, but is there a way to pull the current stock quantity value?

In my particular situation I would like to do something like this:

<input type="number" min="0" max="{{ variant.availableStock }} />

So as to prevent users from inputing a quantity that the store doesn't have.

1 Answer 1


You can do the following:

{{ variant.stock }}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.