Filter collection by product type

Tourist
12 0 2

Hello,

I have been scouring the forums and was hoping this might be my answer!

I was really hoping to organize or sort, I guess, by type as well, but I am not sure if this is the approach that I am looking for? I am still figuring out how to do all of this, and would appreciate any input. 

Example:

#1) I have a main collection that is Jewelry and sub-collections that are also the types that fit under the generic label of jewelry such as Rings, Earrings, Bracelets, etc.. I would like to have all the jewelry types to automatically pull into the jewelry collection without my having to manually put every product there or having to tag every product.

#2) On the main menu Jewelry Link, when a customer clicks on the button I would like it to take them to all of the available jewelry items on one page, organized by type, again without my having to manually organize them each time.

I hope this makes sense. I am trying to save a little work for myself in the long run, if possible. And, not have a bunch of messy filter menus allover. I have not officially launched my shop yet, trying to be organized from the beginning, so any tips would be great too.

http://store.hollycarterart.com/

Any suggestions?

Thanks,

Holly

0 Likes
Shopify Expert
19 0 2

Holly did you ever get this figured out?

I'm working with a client on something similar.

http://experts.shopify.com/aj-hauser
0 Likes
Tourist
12 0 2

The best solution I came up with was to create the product with the Type as having both the words for the main category and the subcategory that I wanted them in. As well as the subcategory in the title. I also created a Shopify collection for the main category with the condition product type contains or is equal to.

http://store.hollycarterart.com/collections/earrings/products/boomerang-earrings

Example: Product Title: Boomerang Earrings, Product Type: Earrings Jewelry

Auto Added into:

Collection: Jewelry, Condition #1: Product Type Contains Jewelry, Condition #2: Inventory stock is greater than 0

Collection: Earrings, Condition #1: Product Title Contains Earrings, Condition #2: Inventory stock is greater than 0

Collection: Collections, Condition #1: Product Tag Contains Collection, Condition #2: Inventory stock is greater than 0

Collection: All Products, Condition: Inventory stock is greater than 0

Tags: Collection Boomerang, Dangle, Sterling Silver, Women

(This particular product also is part of a collection of pieces that are similar, that I wanted people to be able to easily filter by that collection if they wanted to see other matching items. So I also tagged it with the tag Boomerang Collection and made a collection with the title: Collection, with a condition set that product tag contains collection.)

So now the Boomerang Earrings show up with all Jewelry pieces if the Jewelry link is clicked, as well as under Earrings, Collections, and under All products with it's tags Collections Boomerang, Women, etc. This way it can be found with multiple search words, but also not missed for those who don't use the search often or don't know what to search for, it will all be right there. 

Or, if the product would be in multiple main categories and/or subcategories, I made sure to put both the product name and the main and or subcategory in the product title. And, then the collections I created would have the condition product title contains or product type contains.

http://store.hollycarterart.com/collections/art-decor/products/planter-pocket-pendant

Example: Product Title: Wall Planter Pocket Pendant/Necklace, Product Type: Art Jewelry

Auto Added to:

Collection: Art & Decor, Condition #1: Product Type Contains Art, Condition #2: Inventory stock is greater than 0

Collection: Jewelry, Condition #1: Product Type Contains Jewelry, Condition #2: Inventory stock is greater than 0

Collection: Necklaces, Condition #1: Product Title Contains Necklace, Condition #2: Inventory stock is greater than 0

Collection: Planters, Condition #1: Product Title Contains Planter, Condition #2: Inventory stock is greater than 0

Collection: Wall Art, Condition #1: Product Title Contains Wall, Condition #2: Inventory stock is greater than 0

Tags: Art, Interior, Pendant, Planter

(This one is more complicated. I may have to find a better solution.)

 

I did this so that I wouldn't have to remember to always add things into the correct collections, hoping it would auto add and create less work for me. Also, this way I can have everything in my main and subcategories fall into the drop-down menu where I want them. It took a lot of thought and organization on my part because there were some words that messed up my system a bit, and had to really think about what other conditions might fix the problem.

I did a lot of creating, trying, and deleting products and collections before I worked it out. It is complicated, I made a form of my process so that I don't forget each time I create a new product. It has taken a lot of planning, but I hope it will make up the time in the long run.

It may not be ideal, but I think it will work for me for now. I am still working on it all though. I hope this makes sense and helps!

 

Now, if I can figure out how to organize/sort my main category pages (All Jewelry, All Products, etc.)  by collection(subcategory) without having to manually organize in the collection? Currently Shopify doesn't offer this option. Hmm..

0 Likes
Shopify Partner
2 0 1

This was used in a recent site i just made live:   http://www.jousun.com

After review a whole bunch of "Out of date" posts.  Seriously, i don't understand what the point for out of date posts to be made public.... but anyway, I've got a solution for this "Display products in collection, organized by type".  Anyway, here are some stupid requirements to get it working:

  1. You have to create a collection that would hold all products.  Basically make a collection that checks for price that is greater than zero (used on bold below).  
  2. Pagination needs to be set at a number greater than your total products in the system

The code basically does the following:

  1. Loops through a collections product types
  2. Then, loops through ALL products, and picks out the product type that matches the collection
  3. With the product selected, it LOOPS again, all the collections the current product belongs to
  4. Matches the products collection title with the current collection title
  5. Display the item...
  6. Voila!

NOTE:  "if collection.handle" identifies this as viewing the collection, anything else is displayed in a different way "i.e. product types, vendor...etc"... i got this if thing from a different post, forgot which one though:

{% if collection.handle %}
      {% assign sorted_by_type = collection.products | sort: 'type' %}

      {% for product_type in collection.all_types %}
      <div class="products clearfix collection">
          {% assign the_type = product_type %}
          <h2>{{ the_type | link_to_type }}</h2>
          {% paginate collections.all.products by 2000 %}
            {% for product in collections.all.products %}

              {% if product.type == the_type %}
                {% for testcol in product.collections %}
                  {% if testcol.title == collection.title %}
                        {% include 'product-loop' %}
                  {% endif %}
                {% endfor %}
              {% endif %}
            {% endfor %}
          {% endpaginate %}
      </div>
      {% endfor %}
    {% else %}
      {% paginate collection.products by 8 %}

        <div class="products clearfix collection">
            {% for product in collection.products %}
              {% include 'product-loop' %}
            {% endfor %}

            {% if collection.products.length == 8 %}
              <div class="product tell-us">
                  <div class="image">
                      <a href="/pages/contact-us"><img src="{{ 'tell-us.jpg' | asset_url }}" /></a>
                  </div>
                  <div class="name">&nbsp;</div>
                  <div class="variant-title">&nbsp;</div>
                  <div class="pack-count">
                      &nbsp;</div>
                  <div class="price">&nbsp;</div>
              </div>
            {% endif %}
        </div>

        {% if paginate.pages > 1 %}
              <div class="load-more">
                <a href="{{ paginate.next.url }}" data-current_page="{{ paginate.current_page }}" class="btn btn-success btn-load-more button-jousun" data-loading-text="Loading..."><i class="fa fa-refresh"></i> Load More</a>
              </div><!-- .load-more -->
        {% endif %}

      {% endpaginate %}
    {% endif %}

Shopify Partner
2 0 1

I just updated the code to allow for sorting by product type within vendor:

<section class="bodycontent">
    <div class="header">
      <div class="divider-jousun"></div>
      <h1>{{ collection.title }}</h1>
      <div class="divider-jousun"></div>
    </div>

    {% if collection.handle %}
      <!-- sorting by product type within collection (with titles) -->
      {% assign sorted_by_type = collection.products | sort: 'type' %}

      {% for product_type in collection.all_types %}
      <div class="products clearfix collection">
          {% assign the_type = product_type %}
          <h2>{{ the_type | link_to_type }}</h2>
          {% paginate collections.all.products by 5000 %}
            {% for product in collections.all.products %}
              {% if product.type == the_type %}
                {% for testcol in product.collections %}
                  {% if testcol.title == collection.title %}
                        {% include 'product-loop' %}
                  {% endif %}
                {% endfor %}
              {% endif %}
            {% endfor %}
          {% endpaginate %}
      </div>
      {% endfor %}

    {% else %}
      <!-- sorting by product type within vendor (with titles) -->
      {% assign sorted_by_type = collection.products | sort: 'type' %}

      {% for product_type in collection.all_types %}
      <div class="products clearfix collection">
          {% assign the_type = product_type %}
          <h2>{{ the_type | link_to_type }}</h2>
          {% paginate collection.products by 5000 %}
            {% for product in collection.products %}
              {% if product.type == the_type %}
            {% include 'product-loop' %}
              {% endif %}
            {% endfor %}
          {% endpaginate %}
      </div>
      {% endfor %}
    {% endif %}

</section>

 

0 Likes
Tourist
3 0 1

do you know if there is a way to specify which tags you want to show in the list? perhaps by specifying the tags, specifying which tags to exclude? or would creating a menu of tags work?

0 Likes
New Member
1 0 0

No need to add code. Just type this in your URL bar and you can use the address for a link. Replace yourwebsite.com with your domain name and replace "my type" with the name of your product type. Be sure to leave a space if you have one in your product type.
https://www.yourwebsite.com/collections/types?q=my type

0 Likes