How to setup Metafield in version 1.3.0?
From version 1.3.0, the sections and blocks that display metafield content no longer read a fixed, hard-coded key. Each one now has a Metafield setting where you type the metafield in namespace.key format. You can keep the theme's default key, or point the setting at any metafield you like.
Why this is useful
1. Use the same block more than once on a page, each with different content.
Because the key is a setting, you can add the same block several times on one page and give each copy its own metafield. For example, one Highlights block can read custom.highlights while a second Highlights block on the same page reads custom.highlights_2, so each shows different content. With a fixed key, every copy would show the same thing.
2. Name the metafield to suit you.
Create the metafield under your own naming convention (useful for agencies and brands, for example mybrand.highlights) and point the setting at it, or simply keep the theme's default key and change nothing.
How it works
Each feature below has a Metafield setting: a text field where you enter the metafield as namespace.key, for example custom.highlights.
Example: two of the same block on one page
In Settings -> Custom data, create two metafields, for example
custom.highlightsandcustom.highlights_2, and fill each with different content on your product.On the product page, add two Highlights blocks.
Leave the first block's Metafield as
custom.highlights; set the second block's Metafield tocustom.highlights_2.Each block now shows its own content.
Example: rename for your brand
Create the metafield under your own name, for example
mybrand.compare_items.Open the Compare products section and set Compare items metafield to
mybrand.compare_items.The section now reads your metafield instead of the default.
Where the Metafield setting appears
Each row links to the page that shows how to create that metafield or metaobject. The default key is what the feature uses if you leave the setting unchanged.
Product blocks
Description
Short description metafield
custom.short_description
Highlights
Highlights metafield
custom.highlights
Key features
Key features metafield
custom.key_features
See it in action
Media lightbox metafield
custom.media_lightbox
Model size
Model size metafield
custom.model_size
Product sizing
Product sizing metafield
custom.product_sizing
Shop the look
Shop the look metafield
custom.shop_the_look
Sections
Shop similar product
Similar products metafield
custom.similar_products
Bought together products
Frequently bought together metafield
custom.frequently_bought_together
Complete the look
Complete the look metafield
custom.complete_the_look
Key ingredients
Info gallery metafield
custom.info_gallery
Compare products
Compare items metafield
custom.compare_items
Compare products
Ingredient highlights metafield
custom.ingredient_highlights
Sub collection
Subcollection metafield
custom.subcollection
Theme settings
Theme settings -> Product cards
Scrolling text metafield
custom.highlights_scrolling_text
Theme settings -> Cart
Collection empty metafield
custom.collection_empty
Last updated