How to Use Metafields in Shopify? Step by Step Tips

Although Metafield is a popular feature in Shopify, it can be difficult for new users to use. You can use it to customize the Shopify filter or add custom fields to product pages.

Shopify Help Center has detailed documentation that suggests hiring a professional web developer in order to add or display metafields.

It’s annoying, isn’t it?

This article is for small business owners who are trying to save money or have limited time for recruitment.

In just 10 minutes, you’ll be able to use Shopify metafields by yourself.

What is a Metafield?

Custom fields (or metafields) allow you to add additional information to your Shopify store that isn’t available in the Shopify Basic configuration.

You might want to add a manual pdf or specify the origin of your product. Metafields are required for these things.

You will need to complete the following information in order to create a metafield products

  • Namespace– A grouping metafields that prevent conflicts.
  • Key The metafield name.
  • Value– This is the value that has been assigned to each product. It will be displayed in the frontend
  • Description (optional). To help others understand the metafields.

Metafield Custom Fields

Shopify offers 8 Shopify metafields that you can use now.

Shopify Product Metafields

This is the most popular. It allows us to show additional information about each product on the product pages.

Metafields, for example, can be used to show tech specs such as this electronic store.

Shopify Variant Metafields

This metafield allows Shopify users to add additional information for each product variant.

Below is an example of variant metafields. Each color variant will have different information in the bike’s parameters.

Shopify Collection Metafields

Merchants can be more creative when creating collection pages with this newly released metafield.

A discount campaign is a great example of this. To create urgency, you can add a Metafields description for the sales details and another for the countdown.

Shopify Customer Metafields

Metafields for customer information are an amazing feature that allows you to create customer segments based upon specific customer details.

These metafield-based customer segments can be used as filters.

  • You can send targeted emails to certain customer groups. For example, customers who have viewed a product within the last 7 days.
  • Customers can set reminders on their account pages to remind them to check their orders.
  • To segment discount, define loyalty tiers.

Shopify Order Metafields

You may need additional information to place your orders in store for many reasons. Identixweb lists the following:

  • You can add a comment to your orders
  • Place the order according to priority
  • For express or normal delivery, mark the order
  • Rate the orders

These cases, and many more, allow you to use Shopify Order Metafields in place of third-party apps.

Similary – You can add metafields to Shopify Pages, Shopify Blogs, Shopify Blog Posts and Shopify Pages thanks to the most recent update of Online Store 2.0.

Metafields List

This is simply a Shopify enhancement that allows metafields store a list instead of one value in the past. This upgrade is not available for all content types.

The Shopify metafields accept the following list values: Color, Date/Date, Time, Dimension, Weight and Volume.

You’ll find a checkbox to allow you to add values as below.

Once the definition has been successfully created, you will be able to go to the section of your store where the metafield value is to be added. In this example, I created the Product Metafield. I will now go to a product, scroll down to Metafields section, and add the metafield value. This will allow me to add multiple value to the Recommended products metafield.

Many powerful applications exist for metafield lists, such as:

  • To cross-sell or upsell, add a section called Frequently Bought together using the Product reference metafields to Product page.
  • Use Page reference metafields to include popular pages such as policy page and size page
  • Create a list with ingredients to make a recipe using Text metafields
  • To insert files that customers can download, use the File reference metafields.

Metafield Limit

Shopify currently allows merchants to create as many as 100 metafield definitions.

We believe this should be sufficient for SMBs. If you have a large inventory and need to manage metafields, an app may be necessary.

How to use metafields within Shopify

These instructions were shown on Debut themes. These steps can be used for all themes.

Step 1: Create the definition of the metafield

These steps will allow you to create a metafield with Shopify configuration.

1. Go to Setting > Metafields
2. Select the Metafields type. This guide will demonstrate the “Products” metafields type.

3. Click Add Definition
4. Enter your name, namespaces and key. Then, choose the content type. Description is optional

Key & Namespace : As explained previously, the namespace acts as a name for your folder and the key is the metafields’ name. You can separate these two things using a full stop, such as “.”

It doesn’t matter what name, key, or namespace you choose. It won’t have any effect on anything. Its sole purpose is to help you manage other metafields and distinguish them from yours.

The following example shows “my_fields“, and “condition” as our key.

It determines the format for the metafields’the values. In this case, we chose the text format. You have additional options to configure each format, but this is not mandatory.

5. To successfully create a metafield definition, hit Save

Note:

  • To make Shopify work, you must pin the metafield in the top right corner of the image. It’s automatically pinned when you create a new account.
  • You can create new metafield definitions using third-party Shopify Metafield Apps from the app’s dashboard.

Step 2: Add value in the product setting

You now need to create value for the metafields that have been created in each product. There are two ways to do this:One by one, add metafieldsBulk metafields can be added

One by one, add metafields

1. Shopify admin: Go to Products > All Products > and select the products you wish to add additional information using metafields.
2. Scroll down to the section of the product settings page.
3. Metafields can be used to add value.

This could prove to be a time-consuming process if you have many products to add metafields to. We will show you how to add metafields bulk.

Bulk metafields can be added

1. You must first be able to This URL format should be entered in your browser

store-name.myshopify.com/admin/bulk?resource_name=Product&edit=metafields.namespace. key:vaule_format

You must change namespace. You will need to change key:vaule_format according to the metafields key definition and name space. This information can all be taken directly from the metafield definition that you just created.

Keep going with the previous example. If we wish to modify the metafield Condition in bulk, then we must enter the URL.

store-name.myshopify.com/admin/bulk?resource_name=Product&edit=metafields.my_fields.condition:text

2. Once you have entered the URL, the bulk editor screen will appear. This allows you to add multiple product values simultaneously.

While you will still need to fill every value for each product it is much quicker than going to each one and adding them one by one.

Another option: You could also consider using a Shopify App for bulk editing Metafields.

Metafields Guru, for example, will allow you to edit 1000 products free of charge. Bulk editing is an expensive feature in all apps, so it’s important to weigh the benefits and costs to your business before you decide to purchase one.

These apps are more affordable if you have over 1000 products to edit multiple times or need to bulk-edit metafields.

Step 3: Show Metafields in your Shopify Store

Shopify customers now have 2 options to display metafields in their front-end with the release of Online Store 2.0

  • Add code to themes. Works with all versions of the theme.
  • Only available for OS 2.0 themes: Use theme editors

We will demonstrate how to display metafields on product pages using the example shown below.

Adding code to themes allows you to show product metafields

1. Copy/remember this line from Metafields Setting. We will soon use it.

2. Go to Online Shop > Themes > Actions> Edit codes

3. In the Section Folders, find product-template.liquid

4. The following code can be added to the template files using the line that we have copied.

It will look something like this in our example:

Condition: product.metafields.my_fields.condition

These lines are added to the Debut theme right after the description. These lines can be added to any page on the product pages. You don’t have to know exactly where you should add it. Just try it out and then preview the front-end to see what happens.

5. Save and go to any product page to view the results.

Themes editors allow you to show product metafields

This method is only compatible with OS 2.0 themes. We will show it using the Dawn theme.

1. Go to Online Shop > Products > Themes. In the current themes choose Customize
2. Choose Default Products Page Template or Product Page Template

3. The control panel to the left contains the Product information panel > Add Text block. Drag the block to wherever you like.4. Click the Text block > Click on the icon to add metafields.

To give the metafield a title, you will need to add text before the block metafield.

5. Hit Save, and you’re done. You can add another metafield by following the same steps.

Practical use of Shopify metafields

Additional information displayed in an attractive style

This is the core functionality of metafields. It allows shop owners to add information to Shopify that doesn’t belong on the product page. You can create a beautiful interface that displays all information, such as image slides and tabs.

Customers will have a better shopping experience. A better shopping experience leads to higher conversion rates.

Metafields allows you to filter, site search and sort.

Search by Metafield or Filter is one of the most requested features when someone searches for a Shopify App.

Metafields are an app that supports this feature. Your customer will find nearly anything they need in your store quicker using all information about your products.

Let’s look at this furniture store. They have a filter that allows customers to find out if the products have storage capability or not. Metafields are better than tags and product descriptions to present the attribute of this product.

Last words

It can be difficult to learn how to use Shopify metafields. It is possible to use metafields in Shopify in a number of important ways.

We hope you’ve learned how to use Shopify metafield after reading this article.