Navigation Menu Item to filter Collection suing 2 tags

Navigation Menu Item to filter Collection suing 2 tags

OmbreC
Visitor
2 0 2

Hi there,

I created the 'Outdoor items' collection based on several tags.

For the navigation, I would like to display only some of these tags.

 

If you look at the picture below, I'd like to be able to show 2 tags (Cocktail Table, Accent Table) from the 'Outdoor items' collection under the menu 'Cocktail & Accent Tables'.

 

The problem is that when I use 2 tags the menu only shows products tagged with both tags, rather than the products tagged with each. 

 

Is it possible to have the collection in the navigation to show both tags? 

 

I know I can create a collection 'Cocktail & Accent tables' but the navigation would make it a lot easier.

 

If anyone has come across this please let me know,

Thanks

 

Navigation Collection Filter Tag.png

Replies 3 (3)

LemmonsStore
Excursionist
22 0 28

We are trying to do the same thing, have you found if this is possible?

Digeo
New Member
11 0 0

Same here.

I found this Shopify dev document explaining how the AND operator is automatically applied when multiple tags are applied on a (collection) filter :

https://shopify.dev/docs/themes/navigation-search/filtering/tag-filtering

Digeo_0-1706983409769.png

If in the menu collection filter, you apply the comma or + operator between 2 tags

Digeo_1-1706983538476.png

it is translated to this URL and only resulting in products with both tags present :

Schermafbeelding 2024-02-03 om 19.08.54.png

 

The https://shopify.dev/docs/themes/navigation-search/filtering/tag-filtering doc however, reveals a feasible solution to override the default AND behaviour and turn it to the desired OR behaviour :

Digeo_2-1706984261072.png

https://shopify.dev/docs/themes/navigation-search/filtering/storefront-filtering

Digeo_3-1706984351129.png

This requires some development skills however.


If I find some time, I'll dive further into it.
In the meanwhile, the only other option is to create a dedicated collection where your conditional OR requirements or multiple tags can be foreseen like this

Digeo_4-1706984893588.png

and your menu item refers to this dedicated collection.

 

 

LemmonsStore
Excursionist
22 0 28

Thank you, after a few discussion with support I just went and reorganised the menus & collections, it doesn't actually appear that filtering the collections like it suggests is actually possible.