Hi there,
First of all I must say that Im not a coder. So I have no basic skills what so ever.
However, in my online store each product is tagged with a label.
For example Mark_Gant, Mark_Oakley, Mark_Diesel and so on.
I have some problems to get the filtering function to work as I want on the production page.
I found a code-snippet that seems to work halfway. But I need it to show every product that is tagged “Mark_”
regardless of which brand comes after.
This shows all products that is tagged Mark_Gant for example:
{% assign show_tags = “Mark_Gant” | split: “,” %}
{% for tag in collection.all_tags %}
{% unless show_tags contains tag %}
{% continue %}
{% endunless %}
But I want every brand to appear in the “filter by”-list.
It should be something like this?
{% assign show_tags = “Mark_*” | split: “,” %}
{% for tag in collection.all_tags %}
{% unless show_tags contains tag %}
{% continue %}
{% endunless %}
But of course it doesn’t work.
Of course I can define which tags to filter:
{% assign show_tags = “Mark_Oakley, Mark_Diesel, Mark_Rayban” | split: “,” %}
but it will be lots of tags in that code (100+).
How can I define to show every product that is tagged Mark_*?
Hope you get it. Once again. Im a total rookie with this.
Thanks in advance.