Showing inventory levels on variants - Minimal Theme

Instinct_Windsp
Tourist
12 0 0

I know this question has been asked a few times, like here, but the answer may be out of date and/or it doesn't apply to my theme (Minimal) because I can't find any of the theme files they mention to modify.  Is there anyone that can help me do as they have done to that theme to mine?

I know my way around Shopify but am not a seaoned coder

0 Likes
Thomas_Lang1
Shopify Partner
173 4 34

{% for variant in product.variants %}

 {{ variant.title }} - {{ variant.inventory_quantity }}

{% endfor %}

amandapanda1
New Member
1 0 0

I added this on line 191 of product-template.liquid

 

{% for variant in product.variants %}

Inventory: {{ variant.title }} - {{ variant.inventory_quantity }}

{% endfor %}

 

 

amandapanda1_0-1627600463823.png

 

0 Likes
Instinct_Windsp
Tourist
12 0 0
Can some code be added to only show those variants that have stock?
0 Likes