Smart Collection Filters Based on Tags

Highlighted
Shopify Partner
2 0 0

Hi,

I have a Smart Collection that has the following rules:

  • Product Tag is equal to France
  • Product Tag is equal to Spain
  • Product Tag is equal to Ireland

I want to display filters on the collection page template based on these tags ONLY.

The issues is that I have matching products that also have other tags assigned to them (eg Caravan, Motorhome, Boat). When I output {{collection_all_tags}} it displays all tags that apply to any matching products:

France, Spain, Ireland, Caravan, Motorhome, Boat.

I ONLY want to show the collection tags that, that collection has been set-up to filter by. eg France, Spain, Ireland.

Is this possible?

Thanks,

PS. It needs to be dynamic.

0 Likes
Highlighted
Shopify Expert
2684 67 827

Hi Alexander, 

no, you can not tell how this smart collection was formed. You'd need to pass this data somehow to the template code -- you may use metafileds for this, or pull this data from, say, collection title or description...

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com!
My post solved your problem? Like it!
I am away till Feb-15.
0 Likes
Shopify Partner
2 0 0

Hi Tim,

Thanks for your reply. I thought this might be the case but hoped there was a better liquid solution. We will go down the metafields route for this.

If anyone else has any ideas for this I would love to hear them. Or if anyone from Shopify is reading a liquid refference of {{smart_collection_tags}} that returns only the tags used to build the smart collection would be hugely useful for building larger collections with filterable options.

Thanks

Alex

0 Likes
Highlighted
New Member
12 0 0

Just read your requirements and our Ultimate Filter + Search can easily do that. You only need to add Tags to the filter in the app. Then you can copy the URL in the address bar when those filters are selected and paste it to where you want.

0 Likes