Hierarchy of collections vs tags

larryvee
New Member
2 0 1

HI folks,

this may be solved already. Indeed, I've seen it solved on other sites. Here's an example

Problem

If I have a collection for "Red Wines", then within that, if I select "France" from the filter in that collection, I still get regions or grapes which don't apply to France. 

 

shopify-filters.png

Now, Shopify doesn't have a hierarchy of tags, as far as I can see.

Design intent

So, in picking France, I should only see filters for French regions (others shouldn't display).

How do I best go about this? Is it moving to collections rather than tags for filtering on product lists?

 

 

Oakleafinfoway
Shopify Partner
308 6 21

Hello @larryvee 

Welcome to the Shopify Community!

This is Jay here from Oakleaf Infoway. We would love to help you with the filters of the product and make it run seamlessly within the hierarchy

Here I am a registered partner with Shopify and having more than 5 years of experience and we have expertise in Shopify customization, Desing Enhancement. Small tweaks, Store development, Third-Party app configuration, and many more.

Please add me over skype for instant communication.

Skype ID- live:.cid.2ca82125d1edaa5f
Email ID: jay@oakleafinfoway.com

Team, *Oakleaf Infoway*
- Was my reply helpful? Please *Like* and *Accept* Solution.
- Want to customize and improve your store? Hire us.
- Feel free to contact us on Skype: live:.cid.2ca82125d1edaa5f/
Email ID: info@oakleafinfoway.com
0 Likes
larryvee
New Member
2 0 1

Thanks Jay, as we're only getting started, we're cash-strapped until we have the basics working so I'm looking for a technical tips that I can implement myself. 

A friend has suggested an app that could help us solve the issue, if I can't do it myself.

0 Likes
Quyen_Beo
Explorer
58 7 12

In your example, it's using this app to build the filter: https://apps.shopify.com/product-filter-search 

So if you are not familiar with code, you should use that app.

 

If you're familiar with code or trying to do this your self:
On your screenshot I see you already have the filter showing. If you make that without using any app and only customize the default filter-by-tag function of Shopify, after filtering by a tag, it will point to a sub page/URL of current collection.
Eg: on collection-wine when clicking on tag-france it will redirect to collection-wine/tag-france

So on that sub page, you can check the variable collection.all_tags. It will contains all tag that belongs to products on that sub collection.
After that you can check each tag on the Grape list compare with collection.all_tags then hide the tag if collection.all_tags doesn't contain it.

Was my reply helpful? Please Like and ✔️ Accept Solution. This mean alot to me
Nancy_Drake
Trailblazer
162 9 16

Hi @larryvee 

You can refer to Shopify tutorial for filter by product tag https://shopify.dev/tutorials/customize-theme-filter-collections-with-product-tags. However, it’s not possible to apply more than one filter within the same group. You can try some third party filter app such as Collection Filter & Search Bar, Filters & Instant Search to set up dynamic product filtering that shows the relevant filters based on the viewing products.

0 Likes