Discussion Forums

d
Topic
Posts:
1
7 months ago

Creating Price Filter with Shopify's Example Shows all Collections in Drop Down

I was following this tutorial on shopify http://wiki.shopify.com/Filtering_a_collection_with_more_than_one_product_tag_drop-downs

They made a nice demo here... http://satterfield-pfeffer5655.myshopify.com/collections/all

this demo has a price filter drop down, yet the example does not explain how to add it. I followed the suggestions and made smart collections with the price variants that I want to use, but when I add the code in for price, it shows all the collections in the drop down and not just the prices...

see my probelm http://solve-it.accurateclick.com/collections/all the last drop down i want to only show the price smart collection links...

 

<li class="clearfix filter">
  Price:
  <select class="coll-picker">
    <option value="all">All</option>
    {% for c in collections %}
    {% unless c.handle == '3' %}
    {% if collection.handle == c.handle %}
    <option value="{{ c.handle }}" selected>{{ c.title }}</option>
    {% else %}
    <option value="{{ c.handle }}">{{ c.title }}</option>
    {% endif %}
    {% endunless %}
    {% endfor %}
  </select>

How can i change that?

 

 

i
Replies
Posts:
1
7 months ago

I charlie It's Raphael

You can add an "if"

{% if c.title == '$0 to $10' % | c.title == '$10 to $20' c.title == '$20+'}

So it's only gonna show the categories you wanna show.

I already made the changes on the website.

Posts:
6
2 months ago

Hi there , I am trying to add this filter system w/ the same theme to my page. I have it laid out properly and filter but the problem I am running into Is that when I select a filter it reverts back to "All" right away. It doesn't stay on the filter and let me add multiple filters ... IE Red + Brand Name ... as soon as I pick a filter it changes 100% to that one.  How do I fix this ?

Posts:
2
about 1 month ago

Hi There,
I am having a similar issue can somebody help me with this?
Here is the code I have setup:
<form action="" class="navigation">
     <div class="category-selector-wrapper">
<label>Browse by Price:</label>
<div class="category">
<select class="navigationSelector">
<option value="/collections/all">All</option>
{% for col in collections %}
<option value="{{ col.url }}"{% if collection.handle == col.handle %}{% endif %}>{{ col.title }}</option>
{% endfor %}
</select>
</div>
</div>
........
Cheers Steve

Posts:
1
about 1 month ago

Does anyone know how to turn off tag filters altogether for specific collections?

I don't need a shredder filter for accessories: http://www.shredders-uk.com/collections/shredder-oil

Cheers

Log in or sign up for an account to reply.