In the twig template of the product listing, I want to display a special badge if the tag „nachhaltig“ (German word) is assigned to the product.
I have double-checked if the tag is assigned to the product, but the code inside the if statement does not appear.
{% if product.tags.contains(‚nachhaltig‘) %}
{% endif %}
I suspect that instead of using the German word, I need to use the tag ID or something similar. However, I couldn’t find any information about it online, or the information I found didn’t bring me closer to the solution.
Does anyone have any ideas?
Thanks!