How to Create Custom Filter Groups in Collection Sidebar Based on Metafields

Solved

How to Create Custom Filter Groups in Collection Sidebar Based on Metafields

CW6
Tourist
5 1 0

Hello! We just updated to Shopify 2.0 (District theme, 4.3.0). I am attempting to create organized lists of filters of alike (but separate) metafields that can be filtered on when the metafield = true. This way, customers can then use them to find products that fit their needs.

 

Here is a link to the collection page: https://www.rareroots.com/collections/all

 

The 'Availability', 'Light Exposure', and 'Bloom Color' are fine. Here is how I need to format the rest of these filters, in collapsible drop-downs:

 

Special Features:

□ Black Walnut Friendly

□ Clay Soil

□ Coastal Conditions

□ Deer-Resistant

□ Drought-Tolerant

□ Evergreen

□ Native to North Amer.

□ Rabbit-Resistant

 

Growing Zone:

□ Zone 2

□ Zone 3

□ Zone 4

□ Zone 5

□ Zone 6

□ Zone 7

□ Zone 8

□ Zone 9

□ Zone 10

□ Zone 11

 

I have not been able to use the search and discovery app to format this, so I'm thinking I will need to code something into the liquid. Unfortunately, I have not been able to make much headway.

 

Has anyone been able to format their own custom filters, or have any idea where this portion of the code can be found? Thank you!

Accepted Solution (1)
CW6
Tourist
5 1 0

This is an accepted solution.

Hi. It is not possible to group the metafields on the sidebar in the way that I was hoping. I ended up having to use tags instead and pay for a third-party app to display the results page and sidebar the way I wanted. It was disappointing, but I made it work.

The free Search & Discovery app was no help at all to me. I hope this information helps you.

View solution in original post

Replies 7 (7)

pawankumar
Shopify Partner
601 86 104

Hi,
Can you please let me know which issue you are facing with 'search and discovery' app ?
Thanks!

- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: thepkpawankumar@gmail.com
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan
CW6
Tourist
5 1 0

Hi! Essentially, I would like to be able to group metafields into subcategories, and I do not see a way to do this in the app.

search and discover.PNGcurrent filters.jpg

pawankumar
Shopify Partner
601 86 104

What do you mean by grouping here ?
Do you mean to combine data from 2 metafields into single filter ?
If yes, I think, you can create another metafield that quality for both metafields setting and then use new metafield as filter

- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: thepkpawankumar@gmail.com
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan
CW6
Tourist
5 1 0

I want to group them like this:

 

Special Features:

□ Black Walnut Friendly

□ Clay Soil

□ Coastal Conditions

□ Deer-Resistant

□ Drought-Tolerant

□ Evergreen

□ Native to North Amer.

□ Rabbit-Resistant

 

Growing Zone:

□ Zone 2

□ Zone 3

□ Zone 4

□ Zone 5

□ Zone 6

□ Zone 7

□ Zone 8

□ Zone 9

□ Zone 10

□ Zone 11

 

I was initially hoping to use a single filter for each, as you suggest. I tried it with the single line metafield, which will let you preset a list of choices:

 

2.PNG1.PNG

 

The problem is that when I then go to the product, I cannot select multiple choices from this list. It will only let me select one instead of checking multiple, and many plants are drought-tolerant AND deer-resistant AND rabbit-resistant. Many are hardy to Zone 4 AND 5 AND 6, etc. I've hit a wall there.

 

3.PNG

 

So then I went with true/false instead and hoped I could group them. Thank you for looking at this with me.

lbmedia1
Excursionist
37 3 4

Hey!! Did you ever find a solution to this? I'm trying to do the same thing! Thanks!

CW6
Tourist
5 1 0

This is an accepted solution.

Hi. It is not possible to group the metafields on the sidebar in the way that I was hoping. I ended up having to use tags instead and pay for a third-party app to display the results page and sidebar the way I wanted. It was disappointing, but I made it work.

The free Search & Discovery app was no help at all to me. I hope this information helps you.

Adrianwhite
Shopify Partner
3 0 0

You could create a product hierarchy with a Category Metafield with those values. Instead of having separate metafields for each you create a metafield list with those values. This would allow them to be grouped together is search. 

 

Category Metafield with single value drop down list (Label "Special Features:" is search and discovery app) 

□ Black Walnut Friendly

□ Clay Soil

□ Coastal Conditions

□ Deer-Resistant

□ Drought-Tolerant

□ Evergreen

□ Native to North Amer.

□ Rabbit-Resistant