A screenshot of a storefront side-menu with options to filter by mineral type, mineral locale, and plant genus. Genus is expanded, showing values with check-boxes

How can I customize the product search menu?

You would think this is customizable under "menu" options, but what you actually want is Filters under Shopify's Search & Discovery app.

Some filters like price and availability are automatically applied to your storefront, but you can add custom fields to your heart's delight using the Add filter button in the upper right of this page. You have to create a custom field before you can add it as a filter though, so keep this tab open and start working in a new one.

Screenshot of the Filters page in the search and discovery app, with a list of options like category, availability, price, mineral type, mineral locale, and so on. There is a dark button to add a new filter in the upper right.

Step 1: ignore automatic metafields

Ignore whatever Shopify has been encouraging you to do regarding adding category metafields.

Shopify will try to create them for you while you are editing a product, and it may automatically populate some information. It will look something like this, THIS is what you want to ignore:

Screenshot of a section on the product edit view titled category metafields, with values like authenticity, crystal system, fossil type, and so on listed.
You are welcome to play with Shopify's metafields, I have just found them unwieldy and restrictive. If you do wish to use them, the second half of this process will still look the same.

Use your product tags wisely

Screenshot of the menu on the righthand side of the product edit view, where you assign the product type, vendor, collections, and tags, with tags circled.The easiest way to add a new category to the product filter is by using the product tags.

It is far easier to add new tag values compared to adding new values to a metafield if you use validation from a list of options. Tags are more conveniently located in the product view. I suggest reserving tags for something you expect to add to frequently; I use it for 'mineral type.' Once the field is added to your filter, all newly-added product tags will automatically update in your storefront's filter.

Tags can only be used for one filter category so if you have more than one filter to add, you'll have to create a new metafield.

Creating a custom metafield

Screenshot of the page for Metaobjects in the Shopify admin view. There is a dark button labeled "manage definitions" in the upper rightScreenshot of a page section from the custom data page, with a list of products, variants, collections, and so on. An arrow indicates "products" and says "this one"Go to Metaobjects in your admin side menu, then click the Manage definitions button in the upper right. This will open Custom data in your settings. Click into the very first option under metafield definitions, Products.

This is where you can 'define' characteristics for your products, such as color, brand, or size. Click Add definition to get started!

Adding a definition

Screenshot of the page to add a product metafield definition. The first field to complete is 'Name' followed by "Namespace and key," and "description." Below, "Single line text" has been selected and set to "list of values"
Give your definition a name and brief description ('namespace and key' will be automatically populated).

Where it says "Select Type" you will most likely want the option "Single line text," then select "List of values." This will give you the option to add as many values as you want. You might think you only want one value, but select this option anyway; once you have saved your definition, you will not be able to edit the type. I came to this realization the hard way when I realized I wanted to have nested locales, i.e., assign a mineral as being from the U.S., and also from the state of Arizona, and also a specific mine.

You can set validation rules or add list of potential values below, but I find the latter restrictive because you have to edit this page every time you have a new value to add. In most situations just completing the first box is enough to get started!

Add it to your filter

Head back over to the Filters tab you left open and click the Add filter button. Search for the definition you just created in the Select Source dropdown. If you want a different title/label used for the section in the filter, you can add it below.

Screenshot of the add filter view, the first section giving a drop-down menu to select a source, and the second line "Filter Label" where you can give the field the title you want customers to see

Now if you go back to your storefront and look at the filter... the edits aren't there? This is because you need still need to add corresponding values to your products.

Bulk edit values

I find the easiest way to update this is to select the products in question and open Bulk edit mode. Add a column for your definition, and begin entering values.

Screenshot of the bulk edit view with a list of products open, and with columns filtered down to the one product metafield to edit it.
A list of values in the filter under the category "Plant native to" that reads Madagascar, South Africa, then South Africa typoed with a q instead of an a on the end

Once saved, any values entered will automatically populate in your filter. This is where some risk arises: if you aren't using validation and a pre-entered list of values, you can end up with sloppy appearing values, like typos or words in all-caps. This is easy enough to fix by deleting the value from the offending products and re-adding it.

Add values in the product edit view

Once you have set up this feature, a box like this will appear below Shopify's auto-populating metafields. All you have to do is remember to enter values when creating a new product!

Screenshot of the box for product metafields on the product edit page, with three metafields listed, the first mineral locale completed as "indonesia"
Back to blog