I am currently using the mr store theme. parker, and it has filtering on label fragments. I am trying to redo these filter collections by label fragments instead of filter by product size variant. So, how it works is that the fragment will look for product tags and mark the filter tags from the themes collection administration menu and show it as a filter on the collections page. It works great for tags, but now I want it to be filtered by the size of the product variant.
{% if settings.sort-dropdown-a-check %}
<li class="clearfix filter">
{% assign tags = settings.sort_a | replace: ' ,', ',' | replace: ', ', ',' | split: ','%}
<p>{{ settings.sort-a }}</p>
<select class="styled-select coll-filter">
<option value="">All</option>
{% for tag in tags %}
{% if current_tags contains tag %}
<option value="{{ tag | handle }}" selected>{{ tag }}</option>
{% elsif collection.all_tags contains tag %}
<option value="{{ tag | handle }}">{{ tag }}</option>
{% endif %}
{% endfor %}
</select>
</li>
{% endif %}
Thanks for watching.
otasi source
share