Setting up filters based on variant options, tag prefixes and metafields on Shopify

Introduction

At the outset, you have several default filters based on product details, such as product type, collection, price, vendor, etc., and variant options, such as color and size. However, you can make your own filters, if you require more flexibility than what default ones offer. The new filters can be based on:

Filters by variant options

To create filters by variant options in your Shopify store, follow these steps:

  1. Go to the Smart Search & Filter control panel > Filters section > Settings tab.
  2. Type option names separated by commas into the Option names field. The option names are case-insensitive.

    Setting up filters based on variant options, tag prefixes and metafields on Shopify

  3. Select or clear the Export option only for available product variants setting. If you select it, the filters will have values from available variants only. If you don’t, it will have values from all variants.
  4. Apply the changes.
  5. Click the link at the top or the Force re-indexation button in the sidebar to start the indexation.

That’s it. After indexation is complete, you can take a look at your new filters in the Smart Search & Filter control panel > Filters section > General tab and in the Search Results Widget in the storefront. They will have the same names as the values in the Option name field.

Filters by tag prefixes

The tag prefix is the first part of the product tag, with the “_” symbol at the end. For example, if you have tags like Color_red, Color_green, Color_blue, the “Color_” part is the tag prefix. In this case, you can create filters with the Color name and values: red, green, blue.

To create filters by tags based on tag prefixes on Shopify, follow these steps:

  1. Go to the Smart Search & Filter control panel > Filters section > Settings tab.
  2. Type the one tag prefix or multiple tag prefixes separated by commas into the Create filters by tag prefix field. The tag prefixes are case-insensitive.

    Setting up filters based on variant options, tag prefixes and metafields on Shopify

  3. Apply the changes.
  4. Click the link at the top or the Force re-indexation button in the sidebar to start indexation.

That’s it. After indexation is complete, you can take a look at your new filters in the Smart Search & Filter control panel > Filters section > General tab and in the Search Results Widget in the storefront. They will have the same names as the values in the Create filters by tag prefix field, without the “_” symbol.

Tip

If you use the filters by tag prefixes, we recommend you hide the default tag filter.

Filters by metafields

Important info

The app supports Shopify product metafields only, product variant metafields are not supported.

Creating filters by metafields

You can create filters based on the Shopify Metafields. To do that, follow these steps:

  1. Go to the Smart Search & Filter control panel > Filters section > Settings tab.
  2. Type the metafields into the namespace.key format separated by commas in the Metafields field. The metafields are case-insensitive.

    Setting up filters based on variant options, tag prefixes and metafields on Shopify

    You can see the namespace.key format of your product metafields in the Shopify Admin Panel > Settings > Metafields > Product:

    Setting up filters based on variant options, tag prefixes and metafields on Shopify

  3. Apply the changes.
  4. Click the link at the top or the Force re-indexation button in the sidebar to start indexation.

After indexation is complete, you can take a look at your new filters in the Smart Search & Filter control panel > Filters section > General tab. They will have the same names as the values in the Metafields field.

Setting up filters based on variant options, tag prefixes and metafields on Shopify

Next, you should rename these filters, since they are displayed in the namespace.key format by default.

Setting up filters based on variant options, tag prefixes and metafields on Shopify

That’s it. Now you can take a look at your new filters in the Search Results Widget in the storefront.

Setting up filters based on variant options, tag prefixes and metafields on Shopify

Adjusting numeric filters by metafields

If the metafields based on which you’ve created filters have the Number (integer, float) content type in Shopify settings, they will be created as a slider, like the price slider, by default.

Important info

  • Numeric filters by metafields will appear as sliders only for metafields added in the Shopify settings.
  • The negative numbers of the integer filters by metafields will not be displayed on the storefront.

You can adjust the slider filters’ steps from 1 which is auto to 50, and decimals for the float metafields. To do so, follow these steps:

  1. Go to the Smart Search & Filter control panel > Filters section > General tab.
  2. Click the Manage slider filter link next to the filter you’d like to adjust.

    Setting up filters based on variant options, tag prefixes and metafields on Shopify

    The editing page will be open.

  3. Optionally, change the Slider steps setting.

    Setting up filters based on variant options, tag prefixes and metafields on Shopify

  4. Optionally, change the Decimals setting if you are adjusting the filter with float content type.
  5. Apply the changes.

Converting numeric filters by metafields into the select filter

If you don’t want the numeric filter by metafields to be a slider, you can convert it into the select filter. To do so, follow these steps:

  1. Go to the Smart Search & Filter control panel > Filters section > General tab.
  2. Click the Manage slider filter link next to the filter you’d like to convert into the select filter.

    Setting up filters based on variant options, tag prefixes and metafields on Shopify

    The editing page will be open.

  3. Click the Convert to select button in the top-right corner.

    Setting up filters based on variant options, tag prefixes and metafields on Shopify

  4. Apply the changes.

That’s it. The filter is now shown with the options list on your storefront.

Converting numeric filters by metafields into the slider filter

You can adjust the numeric filter by metafields as a slider if you’ve converted it into the select filter. To do so, follow these steps:

  1. Go to the Smart Search & Filter control panel > Filters section > General tab.
  2. Click the Manage filter link next to the filter you’d like to convert into the slider filter. The editing page will be open.
  3. Go to the Settings tab, and then click the Convert to slider button in the top-right corner.

    Setting up filters based on variant options, tag prefixes and metafields on Shopify

  4. Apply the changes.

That’s it. The filter is now shown as a slider on your storefront.

Enjoying your experience with Searchanise?

We’d appreciate it if you could take some time to leave a review.

Updated on June 21, 2022

Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support
Back to top