How to let users sort a catalog by custom metafield values?

Hi all,

I have a collection which contains products with custom metafields.

Most of the metafields contain numerical datatypes. I want to let users sort and filter the catalog by these metafields.

However, I am not sure how to achieve this.

Link to catalog: https://www.viralboost.io/collections/accounts

Is there anyone that can help me out with this?

Hi @vboost ,

Please go to Online Store > Navigation > Collection and search filters > Add filters.

You can add filter here, it will display fine:

Thanks for your suggestion.
This is the outcome of your solution:

  1. Is it possible to change this filter to a continuous filter? Like the Price filter:

  1. This still won’t allow me to use these metafields to sort the products. Is there a solution to achieve that?

Thanks in advance!

Hi @vboost ,

1: This is not possible, Shopify only supports it filter like regular fields. If you want to edit like price, you can just install app for it.

2: This is not possible, Shopify does not support sort for Metafields.

=> The results shown are best for Metafields if you don’t want to install the app. If you want to satisfy conditions 1 and 2, you can refer to the app: https://apps.shopify.com/product-filter-search or https://apps.shopify.com/product-filter-and-search

Hope it is clear to you.

1 Like

Hello,

You cant use the Shopify standard filter and search to sort by metafields. This app https://apps.shopify.com/ultimate-search-and-filter-1 will definitely help you sort your products by product metafields and variant metafields. Also it helps show the correct variant information when sorting.