How do I add tags to certain products on product pages, (like few left in stock, or sold out, or new)
Here is a example:
Hi @Zotic,
Please follow the steps below:
- Step 1: Add tags for products, eg 'few left in stock'.
- Step 2: Please go to snippets > card-product.liquid file, at line 90 and add the following code:
If you want to add a 'new' label, you can add the following code:
{% if card_product.tags contains 'few left in stock' %}
<span class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}">few left in stock</span>
{% endif %}
{% if card_product.tags contains 'new' %}
<span class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}">new</span>
{% endif %}
Hope it helps!
I typed the code in, and added the tag when I edited the product, but did not show up!
Hi @Zotic,
Please send your site and if your site is password protected, please send me the password. I will check it.
User | RANK |
---|---|
261 | |
90 | |
57 | |
46 | |
45 |