How to use Shopify Product Variant Metafield in PageFly

About Product Variant Metafield ElementClick to copy

If you’re dealing with many products and diverse variants, each needing specific information displayed, using the product variant metafield element will serve your needs perfectly. It’s a powerful solution for targeting customers effectively and optimizing your store’s conversion rate. With just 3 steps you can display elements on your online store: creating a variant metafield with Shopify, configuring elements, and finally, publishing your page.

Note: To use this element, you must ensure that the product has at least a variant.

If you don’t have PageFly yet, you can install it for Free here.

You can refer to this article from Shopify for more information about the metafields .

How To Create Variant Metafield With Shopify?Click to copy

This is a 3-step tutorial that creates variant metafields: creating definitions, adding values to metafields, and displaying it on your page.

  1. Create A Variant Metafield DefinitionClick to copy

  • Step 1: From Shopify Admin, go to Setting > Custom data > Variants.
  • Step 2: Click Add definition and fill in the fields including: Name, Namespace and key (optional), Description (optional).
  • Step 3: Click Select type > Select the content type that best matches your metafield from the list > Set validation rules and additional configuration.

There are two types of variant metafield values: One value and list of values.

  • One vale: is just one piece of data, like a string of text, a number, or a date.
  • List of values: is a collection of single values. This could be a list of colors, for example.
  • Step 4: Click Save. You can organize variant metafield by pinning variant metafield definitions.

How to use Shopify Product Variant Metafield in PageFly

  1. Add Values To Variant MetafieldsClick to copy

  • Step 1: From Shopify Admin, go to Products > Click a Product > Click a Variant you want to add more content.
  • Step 2: In Metafields, add the content you want to display following the content types.
  • Step 3: Click Save.

Repeat the steps above to add values to your metafield in other product variants.

How to use Shopify Product Variant Metafield in PageFly

Display Product Variant Metafield Element On Your PageFly PageClick to copy

  • Step 1: From PageFly editor, click on Elements icon> go to “Shopify” tab” > in “Product” category > Product variant metafield > Drag and drop element to the editor canvas.

How to use Shopify Product Variant Metafield in PageFly

  • Step 2: Select element > Go to General Tab > Content > Select Product source and Variant metafield definition. If you add the Variant metafield into a Product details element, the Product source will be set to auto.

Adding A Variant Metafield To Your Shopify Product Using PageFly

  • Step 3: From Variant metafield definition > Click Select definition > Select a variant metafield definition in modal > Click Select.

How to use Shopify Product Variant Metafield in PageFly

How To Configure Product Variant Metafield Element With PageFly?Click to copy

General ConfigurationClick to copy

From PageFly editor > Inspector > Click General tab > Config Content parameter group of element:

Product source:
  • Auto: If the Product variant metafield element is nested inside the Product details element.
  • Auto (by default) or Custom: If the Product variant metafield element is nested outside the Product details element and on the Product page.
  • Custom product: If the Product variant metafield element is not nested inside the Product details element and is on a non-product page.
 

How to use Shopify Product Variant Metafield in PageFly

Variant metafield definition

This parameter specifies which part of your store a variant metafield applies to and what values the variant metafield can have.

How to use Shopify Product Variant Metafield in PageFly
Show label

This is the name of the variant metafield shown by default.

How to use Shopify Product Variant Metafield in PageFly
Label position

The position of the label can be on the left (by default) or above the values.

How to use Shopify Product Variant Metafield in PageFly

You can also get further information about ATTRIBUTES, VISIBILITY, ANIMATION parameters here.

Note: Drag and drop Product variant metafield element into a product detail in the product list adds it to all products in the list. Elements will have the same definition but different values.

Styling ConfigurationClick to copy

The Styling configuration for Product Variant Metafield element will follow the PageFly element styling here.

How To Configure Variant Metafield Label And Value In PageFlyClick to copy

Product variant metafield element includes two sub-elements: Variant metafield label and Variant metafield value.

Variant Metafield Label ConfigurationClick to copy

This sub-element configures the name of the variant metafield. If not specified, it defaults to the name of the variant metafield definition.

General ConfigurationClick to copy

From PageFly editor > Inspector > click General Tab > Variant metafield label > Type the label of variant metafield.

Adding A Variant Metafield To Your Shopify Product Using PageFly

Styling ConfigurationClick to copy

The Styling configuration for Variant Metafield Label element will follow the PageFly element styling here.

Variant Metafield Value General ConfigurationClick to copy

This sub-element configures the values of the variant metafield. Depending on your selected content type of variant metafield definition, a relevant parameter group will be available with variant metafield value.

General ConfigurationClick to copy

PageFly currently supports 15 content types:

Date and time

You can use this type to add launch event dates or product release dates.

Adding A Variant Metafield To Your Shopify Product Using PageFly
Date

This type can be used to add product expiration dates or order delivery dates.

Adding A Variant Metafield To Your Shopify Product Using PageFly
Dimension

The Dimension type can be used to add box heights or product lengths, such as the length of a scarf.

Adding A Variant Metafield To Your Shopify Product Using PageFly
Volume

You can use the Volume type to add the volume capacity of a water bottle.

Adding A Variant Metafield To Your Shopify Product Using PageFly
Weight

An example for using the Weight type is to add the weight of a product or ingredient.

Adding A Variant Metafield To Your Shopify Product Using PageFly
Decimal

This type can be used to add a carat weight for jewelry.

 

There are no special settings for this type.

Adding A Variant Metafield To Your Shopify Product Using PageFly

Integer

The Integer type can be used to add a page count for books.

There are no special settings for this type.

Adding A Variant Metafield To Your Shopify Product Using PageFly

Multi-line text

The Multi-line text type can be used to add shipping notes or return policies.

There are no special settings for this type.

Adding A Variant Metafield To Your Shopify Product Using PageFly

Single line text

The Single line text can be used to add short notes and announcements.

There are no special settings for this type.

Adding A Variant Metafield To Your Shopify Product Using PageFly

Rich text

The Rich text type can be used to add long-form stories about your brand or product, including styling.

 

 

There are no special settings for this type.

Adding A Variant Metafield To Your Shopify Product Using PageFly

True or false

This type can be used to add whether an option is available, such as whether an item can be engraved.

Adding A Variant Metafield To Your Shopify Product Using PageFly
Color

Color type can be changed to match the color of each product variant.

Adding A Variant Metafield To Your Shopify Product Using PageFly
Rating

The Rating type can be used to add an audience score or a star rating for a product.

Adding A Variant Metafield To Your Shopify Product Using PageFly
URL

The URL type can be used to add a link to book reviews or product videos that are hosted on a specific website.

  • Link to URL: Makes the link clickable

Adding A Variant Metafield To Your Shopify Product Using PageFly

  • Text link: Enter the anchor text you want to display for the link

Adding A Variant Metafield To Your Shopify Product Using PageFly

Money

The Money type can be used to track product cost details, such as distributor cost or ship to warehouse cost.

Adding A Variant Metafield To Your Shopify Product Using PageFly

Note: List of values have all parameters of One value and the following parameters:

Marker type (exclude Color type) Adding A Variant Metafield To Your Shopify Product Using PageFly
Marker position (exclude Color type) Adding A Variant Metafield To Your Shopify Product Using PageFly
Items spacing Adding A Variant Metafield To Your Shopify Product Using PageFly
Text indent (exclude Color type) Adding A Variant Metafield To Your Shopify Product Using PageFly

Styling ConfigurationClick to copy

The Styling configuration for Variant Metafield Value element will follow the PageFly element styling here.

Common IssuesClick to copy

The Product Variant Metafields Element Not DisplayClick to copy

This happens due to a few reasons:

  • The product being displayed has no variants
  • You are not select Variant metafield definition to show
  • The product source of the element is “Custom product,” but you haven’t selected a product to customize.

The Product Variant Metafields Element Display The Message “No Values”Click to copy

Because your variant metafield definition has no value. To resolve this message go to Shopify Admin > Products > Variants > Metafield > Define values.

Deleting Variant Metafield DefinitionClick to copy

  • If you select “Delete definition field only”, the element is still displayed normally in live view, but there is no variant metafield label if you don’t customize it.
  • If you select “Delete field and its saved values”, content will no longer be visible anywhere.

Frequently Asked QuestionsClick to copy

What is the difference between Product Metafield and Product Variant Metafield?

  • Product variant metafield can be used to store details related to a particular variant, like if we have Red and Green variants we can have different information for each variant.
  • Product metafield can be used to store details related to the product and it will be the same for all the variants of that product.

Additional ResourcesClick to copy

Thank you for your feedback!

Navigate this category

Could not find the answer
to your question?

Chat with us
Get 20% off TinyIMG and PageFly to build a mobile commerce store from our ebook 📱📈 Get It Now