How can the “in stock” and “sold out” only show to products we track inventory?
@Aiman19 hey, thanks for posting here.
it is code example.
{% if product.available %}
{{ product.title }} - In stock
{% else %}
{{ product.title }} - Sold out
{% endif %}
i hope it will help you to show soudout or in stock on product card or page.
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