The Dynamic Variant Metafields feature allows you to display the value of a Shopify variant metafield inside your Badges or Highlight Boxes. This is useful when different variants of the same product have unique information, such as care instructions, dimensions, materials, or specifications.
Unlike product metafields, variant metafields automatically update when a customer selects a different product variant.
Example: If a customer switches from Red to Blue, the badge or highlight will automatically display the metafield value for the selected variant.
How to Display a Variant Metafield
Use the following dynamic data field format in your Badge or Highlight:
{{primebVariantm.namespace.key}}
Replace:
namespacewith your Shopify variant metafield namespace.keywith your Shopify variant metafield key.
Example
Suppose your Shopify variants have the following metafield:
| Namespace | Key | Value |
|---|---|---|
|
| Machine Wash Cold |
To display this value, add the following dynamic data field to your badge or highlight:
{{primebVariantm.instructions.wash}}
The badge will display:
Machine Wash Cold
If the customer selects another variant with a different metafield value, the badge updates automatically.
Important Notes
- Dynamic Variant Metafields are available for Gold plan users only.
- The displayed value updates automatically whenever a customer selects a different product variant.
- If your subscription is downgraded from the Gold plan, badges or highlights using Dynamic Variant Metafields will stop displaying until you upgrade again.