How to add Custom Shopify Filters

Posted by: Amit P,
On January 30, 2016

We have introduced shopify custom filters. We can filter products by adding tags to the products. Following are some filters which are dependent and interrelated:

Category Filter: Through this filter, We can select particular category for our products. We can call single collection’s products through this filter. We can set this filter on collection page. By this useful filter, we can display products of any particular collection or all.
Brand Filter: We can select any Brands of category’s product. After selecting Collection, we can select products brand through brand filter. We can make tags of particular brands at back-end and call those tags in it. For example we have the brands Puma, Fastrack, Nike etc.
Prize Filter: We can have price filter for any particular price interval. For example we can have products range between $10-$100. Through this filter we can fetch the products according to price which seems easy for the customers to choose. We need to make tags of price interval for the products which lie in any particular interval.
Material Filter: We can filter products according to the material, Once we have category filter and brand filter selected. We can specify material in the tags for product result. Once we have variant material for the products, we can tag the material name in the product from back-end.

Comments

  1. I have created size by and price rangel but it is not working.Any suggestion or help will help to sort this.
    The code i used is:-
    Size-

    {% assign tags = ‘34,36,38,40’ | split: ‘,’ %}
    Size

    All

    size-34
    size-36
    size-38
    size-40
    {% for t in tags %}
    {% assign tag = t | strip %}
    {% if current_tags contains tag %}
    {{ tag }}
    {% elsif collection.all_tags contains tag %}
    {{ tag }}
    {% endif %}
    {% endfor %}

    Price-Range
    {% assign tags = ‘Under £5, £15-£100, £100-£250, £250-£750, £750-1000£, £1000’ | split: ‘,’ %}
    Price Range

    All

    Under £5

    £15-£100

    £100-£250

    £250-£750

    £1000
    {% for t in tags %}
    {% assign tag = t | strip %}
    {% if current_tags contains tag %}
    {{ tag }}
    {% elsif collection.all_tags contains tag %}
    {{ tag }}
    {% endif %}
    {% endfor %}

  2. After spending alots of hours in building filter by size, color and price, i was unable to build it. can you help me out on this

Leave a Comment