title: Shopify Filter Collection by Size Variant
body: <p>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.  </p>
  
  <pre><code>{% if settings.sort-dropdown-a-check %}
  &lt;li class="clearfix filter"&gt;
  {% assign tags = settings.sort_a  | replace: ' ,', ',' | replace: ', ', ',' | split: ','%}     
  &lt;p&gt;{{ settings.sort-a }}&lt;/p&gt;
  &lt;select class="styled-select coll-filter"&gt;
    &lt;option value=""&gt;All&lt;/option&gt;
    {% for tag in tags %}
    {% if current_tags contains tag %}
    &lt;option value="{{ tag | handle }}" selected&gt;{{ tag }}&lt;/option&gt;
    {% elsif collection.all_tags contains tag %}
    &lt;option value="{{ tag | handle }}"&gt;{{ tag }}&lt;/option&gt;
    {% endif %}
    {% endfor %}
  &lt;/select&gt;
  &lt;/li&gt;
  {% endif %}
  </code></pre>
  
  <p>Thanks, for looking.</p>