Docs
Free ON WEBFLOW.IO DOMAINS

How to display Shopify metafields in Webflow

Shopify Metafields allow merchants to extend product data by attaching custom, structured fields to products, variants, collections, and other Shopify resources. These fields are commonly used to store additional information such as product specifications (e.g., wheel size for a bicycle) or metadata (e.g., publication date for a book).

Shopyflow provides a streamlined mechanism for rendering these metafields within Webflow. By leveraging Shopyflow’s sf-* attribute system, you can bind Webflow elements to specific Shopify metafield values. The metafields you create in your Shopify store can be displayed both in the Buy Module and in the Cart Item components. Follow the below guide to learn how to create and display metafields in your storefront.

IMPORTANT: Available only in Shopyflow version 1.0.5 and above. Make sure you update your Shopyflow version both in Webflow and in Shopyflow Dashboard.

Supported metafields by Shopyflow

Shopyflow currently supports the following product metafields:

  • Single line text
  • Multi-line text
  • Rich text
  • Image (using File metafield)
  • Integer
  • Decimal
  • Date
  • Date and time
  • Dimension (also as list)
  • Volume
  • Weight
  • True or false
  • Color
  • URL (also as list)
  • Money
  • Link (also as list)
IMPORTANT: Metafields are not synced to Webflow CMS. They are dynamically loaded from Shopify on page load.

Metafield displayer structure

Metafield displayer is made of 2 components. An outer wrapper called --Metafield Wrapper and the --Metafield component itself.

Metafield Wrapper

Metafield Wrapper is the outer wrapper element that takes the sf-metafield-wrapper attribute with no value needed. It groups the label with the the metafield displayer element and hides them both if the current product doesn’t have the metafield value.

Metafield

There are below two types of metafields available in Shopyflow

Product Metafield Displayer

Product Metafields are assigned to the products in Shopify and they can be displayed using the sf-show-metafield attribute with the {Metafield Key} assigned as the value.

Variant Metafield Displayer

Product Metafields are assigned to the products in Shopify and they can be displayed using the sf-show-variant-metafield attribute with the {Metafield Key} assigned as the value.

Metafield Key and Namespace

Shopify uses namespace and key pairs to identify your metafields.

{Metafield Key}

Metafield Key is the unique identifier for your metafield that is set when adding the metafield definition.

{Namespace}

Namespace is the identifier that groups the metafields. In Shopify the default namespace is custom and Shopyflow also by default assumes your namespace to be custom. If you for some reason use a different namespace you can declare your custom namespace by using the sf-change-namespace attribute in your metafield component

No items found.
No items found.
No items found.