Out of stock display

Out of stock display

3 0 6

How can the "in stock" and "sold out" only show to products we track inventory?

Replies 2 (2)

Shopify Partner
502 43 80

@Aiman19   hey, thanks for posting here.
it is code example.

    {% if product.available %}
      <p>{{ product.title }} - In stock</p>
    {% else %}
      <p>{{ product.title }} - Sold out</p>
    {% endif %}

i hope it will help you to show soudout or in stock  on product card or page.

- A thirsty developer passionate about supporting the community. If you'd like to, you can  

Buy me a Coffee.

- Your Shopify Solution Specialist Get a Quote at



Chat On Whatsapp

Crafting exceptional e-commerce experiences to elevate your online presence. Let's build your success story together!
3 0 6

Thank you, where do I paste this code please? 

Also, just to clarify, I have the "in stock" & "sold out" showing now but I only want them to show to products we checked the "Track inventory" on the back end. 


for e.g. This one is correct (because the "track inventory" is checked



But this one shouldn't show it