Is there a way to get a variants stock quantity in commerce? Like the question says. I know you can check if a variant is &quot;in stock&quot; 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:
&lt;input type=&quot;number&quot; min=&quot;0&quot; max=&quot;{{ variant.availableStock }} /&gt;
So as to prevent users from inputing a quantity that the store doesn't have.
You can do the following:
{{ variant.stock }}