Using Both Storefront Filtering & Tag Filtering

Ceri-Waters
Shopify Partner
97 4 25

Hiya,

So we're in a situation where we we need to use both Storefront Filter and Tag Filtering.

To re-iterate, Storefront Filtering is described here:
https://shopify.dev/themes/navigation-search/filtering

And Tag Filtering is described here:
https://shopify.dev/themes/navigation-search/filtering/tag-filtering

Both have advantages/disadvantages in my opinion, which is why we're programming in a filter that uses both. When using them on their own it's fine, but in combination only the tag filtering seems to kick in.. here is our URL Structure:
/collections/all/generalcolour-black?sort_by=manual&filter.v.price.gte=100&filter.v.price.lte=300

Now in theory, this should return any products with the tag "GeneralColour: Black" and a price that is between 100 and 300. However, we only get products with the tag, and not the pricing range.

Any ideas? Is this intentional?


As to why I'd want to do this..  the client in question has ALOT of unique colours, so to avoid an over-complex filter we use "General Colour Groups" via tags, with the approach of GeneralColour: <Colour>. There's also a lot more filter choices than the basic 3 Variation Option choices, such as: Features, Materials and Sizing.

Now I know that MetaFields is a choice, but there's a problem here.. you can only do one to one values, you can't do one to many. So what I mean by this is a single product could have e.g. 3 GeneralColour Filter Options, because it's available in "Red, Black, Blue" - so if the customer chooses any of these they all return the product. With MetaFields you can only use the types "single_line_text_field", "number_integer" and "number_decimal" so I'd only be able to give the choice of a Single Colour Group for the product, and not many.. The same applies to Materials and Features because they're often one to many.

Metafields are also a lot slower in the API, and the client in question has 7 Stores which have their Stock synced with one another via an App.


As to why we want to use Storefront Filtering too, the answer is native price filtering. Currently we have a work-around using tags, and also a manual filtering choice (whereby products are excluded page by page) but neither aproaches are perfect, tags requires a lot of admin and manual filtering is slow.

Thanks in Advance,
Ceri.

 

 

 

Replies 3 (3)
Ceri-Waters
Shopify Partner
97 4 25
Ceri-Waters
Shopify Partner
97 4 25
tkenalas
New Member
1 0 0

@Ceri-Waters wrote:

Hiya,

So we're in a situation where we we need to use both Storefront Filter and Tag Filtering.

To re-iterate, Storefront Filtering is described here:
https://shopify.dev/themes/navigation-search/filtering

And Tag Filtering is described here:
https://shopify.dev/themes/navigation-search/filtering/tag-filtering

Both have advantages/disadvantages in my opinion, which is why we're programming in a filter that uses both. When using them on their own it's fine, but in combination only the tag filtering seems to kick in.. here is our URL Structure:
/collections/all/generalcolour-black?sort_by=manual&filter.v.price.gte=100&filter.v.price.lte=300

Now in theory, this should return any products with the tag "GeneralColour: Black" and a price that is between 100 and 300. However, we only get products with the tag, and not the pricing range.

Any ideas? Is this intentional?


As to why I'd want to do this..  the client in question has ALOT of unique colours, so to avoid an over-complex filter we use "General Colour Groups" via tags, with the approach of GeneralColour: <Colour>. There's also a lot more filter choices than the basic 3 Variation Option choices, such as: Features, Materials and Sizing.

Now I know that MetaFields is a choice, but there's a problem here.. you can only do one to one values, you can't do one to many. So what I mean by this is a single product could have e.g. 3 GeneralColour Filter Options, because it's available in "Red, Black, Blue" - so if the customer chooses any of these they all return the product. With MetaFields you can only use the types "single_line_text_field", "number_integer" and "number_decimal" so I'd only be able to give the choice of a Single Colour Group for the product, and not many.. The same applies to Materials and Features because they're often one to many.

Metafields are also a lot slower in the API, and the client in question has 7 Stores which have their Stock synced with one another via an App.


As to why we want to use Storefront Filtering too, the answer is native price filtering. Currently we have a work-around using tags, and also a manual filtering choice (whereby products are excluded page by page) but neither aproaches are perfect, tags requires a lot of admin and manual filtering is slow.

Thanks in Advance,
Ceri.

 

 

 


In your specific case, are you using product options / variants for the colors? It should appear as a filter option if so.

But yes, in general there's a need for either storefront filtering to be more robust, or for custom solutions mixing tags + storefront to be feasible in the interim.