Hello! Seeking for some coding(?) help.. I am using Dawn theme version 8. (the one which came just before 9).
The site has products which are only available in the local store and are only for showcasing. That for I’ve made a template and applied it for those products and their product pages (disabled add to cart options etc.).
I then ran into trouble when I wanted to add a custom text to those products in the collection grid.
It is in finnish and it is supposed to say “Myymälätuote” on top of the tagged products.
The tag I am using right now is “myymalatuote”.
To the problem itself.
The text appears in the right place but it is applied to all products instead of the ones that it is supposed to.
I have been applying the code into: card-product.liquid and here is the code I’ve tried to get working.
{% for product in products %}
{% if product.tags contains ‘myymalatuote’ %}
Myymälätuote
{% endif %}
{% endfor %}
Here is an image of the page and how the texts appear:
And here is an image of the code in card-product.liquid:
Edit:
Here is also image showing that I’ve tagged Testituote (test product):
tldr: need the “Myymälätuote” text only applied to the products tagged as “myymalatuote” instead of all of them.
Tried changing product / products to collection etc. didn’t work. Just did the same thing (shows up on all of the products).
Help appreciated!