How to filter products in the Shopify admin by metafields?
With the Shopify summer editions now available, a highly awaited feature has been introduced to the Shopify admin. You can now easily filter our products that have a specific metafield value assigned.
To start using this filtering option, you just need to edit your metafield definition, and you’ll be able to use it in no time. This article will show you what you need to do and how you can start using metafields to filter our products in the Shopify admin.
Creating a metafield definition and enabling filtering in the admin
Before delving into the process of editing your metafield definition, we will assume that you’ve already established a metafield definition. If you’re unsure about how to go about this, you can refer to one of our previous articles on How to display additional product information on your store? Use integrated Shopify metafields. (Themes 2.0. and vintage themes). This article provides comprehensive guidance on setting up metafields from scratch.
Let’s consider an example where we’ve created a metafield definition named “Material”. This particular metafield definition is the single-line text type and serves to store information about the primary material used in making the product.
Assuming you have a metafield definition already in place, let’s explore the steps necessary to enable the use of a metafield for filtering in the admin section.
- Within the Shopify admin interface, navigate to Settings -> Custom data -> Metafields -> Products.
- Choose the specific metafield definition for which you wish to enable filtering.
- In the “Features” section, mark the checkbox labeled “Use as filter in admin”.
- Be sure to save the changes you’ve made.
Keep in mind that the you can use only the following types of metafield definitions for filtering in admin:
- Single line text
- Single line text (list)
- True or false
Other metafield definitions are not currently supported for this purpose.
Filtering products from Shopify admin
- If you haven’t assigned the metafield and its value to products, please do so.
- Now, go to the Shopify admin -> Products.
- Click on the Search and Filter icon.
- Click on “Add filter” and scroll down to Metafields. You should see your metafield definition there.
- Click on the metafield definition and select its value(s) from the dropdown menu.
- Products that have the metafield value(s) assigned will be filtered out.
And there you have it! I hope this feature will streamline the process of filtering products with specific metafield value(s) assigned, making it a more straightforward task for you.
Do you want to learn more about the latest updates coming with the summer editions of Shopify?
One great announcement is the introduction of a new feature that empowers merchants to create custom pages powered by metaobjects.