Extending product details with metafields
In our Iridium theme demo that is focused on Wine and Alcoholic beverages we harness the power of Shopifys built in metafields to provide a wide range of filters and deeper more informative product details. Those details include Wine regions, Alcohol by volume (ABV) and taste notes, among many more.
Metafields allow you to add more detail to yoyr content. For instance for our demo we needed to create information fields for products that can be shown outside of the product description, for each of these we created a metafield. These metafields can be seen on the product pages and also on collection pages inside the product filters.
![](https://cdn.shopify.com/s/files/1/0225/2231/files/metafield--content_1024x1024.png?v=1721402270)
Setup of these additional fields is very simple with the following steps:
Creating the metafields
- In your main store admin on the bottom left of the screen click on Settings
- When the settings menu opens click on Custom data which will load your metafield definitions
- Click on Products followed by Add definition
- Add a name and a description. The namespace and key will be generated automatically based on the name of your metafield.
- Clock on Select type and choose Single line text
- Click Save
- Repeat the process for other product details that you want to add. For the purpose of our demo we created metafields for:
ABV, Body, Taste notes, Region, and Country, you may add as many as you need. You can add more at any stage.
Adding product specific details to the metafields.
Once you have created the metafields we need to add some content to them which will be displayed in your store. To do this we need to work within the products area of your store admin.
- If your settings window is open, close it and in the left sidebar click on Products
- Open a product that will use your new metafields, when the page loads scroll down to the pane named Product metafields here you will see all of the metafields that you have created.
- Add your content to each metafield and click save
- Once you have added the metafield content to your products we will not setup the theme to display them.
Showing metafields on the product page
The Forge Shopify theme has a product details section which is perfect for showcasing product information in a list format that is easy for customers to digest. This proves valuable in the themes flexibility to work in many industries with this area being used for product specifications, ingredients and more.
- In your store admin click on Online store followed by themes
- In the themes overview page next to the Forge theme click on Customize theme
- When the theme editor opens navigate to a product page.
- Once inside the product page editor in the left sidebar you will see the Product details section.
- Inside the product details section click on Add block and choose Richtext
- Once added click on the Richtext block that you have just added which will allow you to edit its content. First add a label, this will be shown on the left of the product details section.
- To add content click on the Connect dynamic source icon
which will show a list of the product metafields that you have created.
- Select the metafield that corresponds to your label, you will see the content now includes the metafield with the dynamic source icon.
- When done click the back icon at the top of the block and add additional rich text blocks to place more metafields into the product details area.
You will see these metafield richtext blocks appearing on the screen in the product details section. Click save in the theme editor when done.
Setting up metafields within product filters
If you want your customers to be able to filter products on a collection page by these metafields you will need to add Shopifys search and discovery app.
- When installed open the Apps section of your Shopify admin and click on filters followed by Add filter
- Click on the source field and a dropdown will appear showing all product data that can be used for filters. Under product metafields select each of the values that you would like to appear in your collection filters and save.
This will now allow you to show extended details on your product pages along with the additional functionality of being able to filter by those features. Our support team will be happy to assist if you have any questions or are struggling with this tutorial.