Filter products by variants' tags I want to set up a product filter system based on variants' tags. I encounter two difficulties. 

1. Outputting all variants' tags from a group of products.

&lt;!-- Relation does not work --&gt;
{% set products = craft.commerce.products.type('Custom').find() %}
{% set variants = craft.commerce.variants.relatedTo(products) %} 

{% for pattern in craft.tags.group('patternSwatch').relatedTo(variants) %}
    &lt;a href="?pattern={{ pattern.name | url_encode }}"&gt;{{ pattern.name }}&lt;/a&gt;
{% endfor %}

&lt;!-- This works but returns tags from ALL products' variants --&gt;
{% for pattern in craft.tags.group('patternSwatch').relatedTo(craft.commerce.variants) %}
    &lt;a href="?pattern={{ pattern.name | url_encode }}"&gt;{{ pattern.name }}&lt;/a&gt;
{% endfor %}


2. Filter product based on the multiple variants' tags

&lt;!-- This works, but what about filtering by multiple tags? --&gt;
{% set pattern = craft.request.getParam('pattern') %}
{% set tag = craft.tags.group('patternSwatch').title(pattern).first() %}
{% set variants = craft.commerce.variants.relatedTo(tag) %}

{% for v in variants %}
    {{ v.product.slug }}
{% endfor %}
Personally I would use categories for a 'facetted search' filter you describe, as categories are less likely to get out of control. e.g. If tags are seldom re-used then a search for a tag may only produce a single result.

This plugin may help you: https://github.com/iainurquhart/FacetedNav_CraftPlugin

If you're going to use tags then I suggest making use of Craft's search functionality as this will allow you to submit the tag as a search term and also display any entries which contain the word/tag in ANY field of the entries within Craft.