I'm currently using shopify's theme mr. parker, and it has a filtering by tags snippet. I'm trying to re-purpose this filter collections by tags snippet to instead filter by the product size variant. So how it currently works is that the snippet will look at the product's tags and will the filter tags options from the themes collection admin menu and show it as a filter drop down on the collections page. It works great for tags, but now I want it to filter by the product variant's size instead.
{% 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 looking.