To display a product tag on Shopify products, like a “Coming Soon”, “Sale” or “Pre-Order” tag, we need to use a simple liquid snippet in our template. Usually, we want to display that TAG within a collection, so it is easilly visible when a user browses through all products. Depending on the theme, you will need to put that snippet in product.liquid, collection.liquid or a similar snippet/template.

{% if product.tags contains 'Out of stock' %}
Out of stock
{% endif %}

To have the wording appear on the collection page, you will need to tag your product with: “Out of stock” (without the parenthesis).

You can then assign a class or ID to that section and edit it visually with CSS.

Write a comment