Using Metafields on Labels

Using Metafields on Labels

Using Metafields on Labels

Metafields let you display custom product data on your labels — such as material, country of origin, care instructions, or any other custom field you've set up in Shopify.


What Are Metafields?

Metafields are extra data fields you can add to products and variants in Shopify. They are organized by namespace and key (e.g., custom.material).
BarcodeMan supports two types:
  • Product metafields (METAFIELD_PRODUCT) — same value for all variants of a product
  • Variant metafields (METAFIELD_VARIANT) — different value per variant


How to Add a Metafield to Your Label

    Open your template in the Template Editor
    Add a new Text element
    In the properties panel, set "Link to" to METAFIELD_PRODUCT or METAFIELD_VARIANT
    A dropdown will appear showing your available metafields
    Select the metafield you want to display
    Position and style the element as needed
Note: The app may take a moment to load your metafield list. Wait for the "Fetching metafields..." loading to complete.


Displaying Images from Metafields

If you have a metafield that stores an image URL (e.g., a certification logo):
    Add an Image element to your template
    Set "Link to" to METAFIELD_PRODUCT or METAFIELD_VARIANT
    Select the metafield that contains the image URL
    The image will be pulled from the URL and displayed on the label


Troubleshooting

Metafield shows blank on the label

Possible causes:
    The metafield has no value set on that specific product — check in Shopify Admin → Products → [Product] → Metafields
    You selected a product metafield but the data is on the variant level (or vice versa)
    The metafield namespace/key was changed or deleted in Shopify

Metafield list won't load

    Refresh the page and try again
    Make sure you have at least one product with metafield values defined
    Check your internet connection

Wrong metafield value showing

Make sure you selected the correct metafield (check the namespace and key). Product metafields and variant metafields are listed separately.


Tips

  • Create your metafield definitions in Shopify Admin → Settings → Custom data before trying to use them in BarcodeMan
  • Use descriptive metafield names so they're easy to find in the dropdown
  • Test with one product first to make sure the correct data appears