All docs

Guides

Supplement Facts — Admin Setup

Required Shopify Admin metaobject configuration for the Supplement Facts section, including nutrient rows and serving size data.

Supplement Facts — Admin Setup

This document describes the required Shopify Admin configuration for the Supplement Facts system used by the theme section element-supplement-facts.

What the theme reads

The theme reads only these keys under the custom namespace:

  • custom.nutrient_rows (list of metaobjects)
  • custom.supplements_facts_title (single line text)
  • custom.serving_size (single line text)
  • custom.other_ingredients (multi-line text)
  • custom.view_label_text (single line text)
  • custom.view_label_link (URL)

Note: Shopify Admin-created definitions typically land in the custom namespace. Keys are derived from the Definition Name (spaces → underscores). Always verify the generated key after creation.

Render rule: the section renders nothing unless it can resolve at least one valid nutrient row (nutrient_name + amount_value).

Priority order (important)

If values exist in multiple places, the theme should resolve in this order:

  1. Product metafields (product.metafields.custom.*)
  2. Category defaults (product.category.metafields.custom.*)
  3. Otherwise: no Supplement Facts output

Admin setup checklist

1) Create metaobject: Nutrient row

  1. Shopify Admin → Settings → Custom data → Metaobjects
  2. Create a new metaobject definition: Nutrient row
  3. Add the fields below (names chosen so the resulting keys match what the theme expects).

Metaobject fields:

  • Nutrient name
    • Key must resolve to: nutrient_name
    • Type: Single line text
    • Required: Yes
  • Amount value
    • Key must resolve to: amount_value
    • Type: Single line text
    • Required: Yes
  • Daily value DV
    • Key should resolve to: daily_value_dv
    • Type: Single line text
    • Required: No

Compatibility note:

  • The theme may tolerate alternate DV keys (daily_value, percent_dv, dv), but daily_value_dv is the recommended key.

2) Create product metafields (custom namespace)

  1. Shopify Admin → Settings → Custom data → Products
  2. Add the metafield definitions below.
  3. Confirm that each generated key matches the expected custom.* key exactly.

Product metafield definitions:

  • Supplement facts rows
    • Key: custom.nutrient_rows
    • Type: List of metaobjects
    • Reference: Nutrient row
    • Purpose: provides the rows rendered in the label
  • Supplement facts title
    • Key: custom.supplements_facts_title
    • Type: Single line text
    • Purpose: optional heading override (theme may have a default)
  • Serving size
    • Key: custom.serving_size
    • Type: Single line text
    • Purpose: the serving size line in the label
  • Other ingredients
    • Key: custom.other_ingredients
    • Type: Multi-line text
    • Purpose: optional paragraph below the rows
  • View label text
    • Key: custom.view_label_text
    • Type: Single line text
    • Purpose: optional CTA label override
  • View label link
    • Key: custom.view_label_link
    • Type: URL
    • Purpose: optional CTA destination; link renders only if present

3) Create category metafields (Assigned to categories)

This enables category defaults (used when a product does not have per-product values).

  1. Shopify Admin → Settings → Custom data → Categories
  2. Add the same metafield definitions as in (2) (same names, same types, same keys).
  3. Restrict them using Assigned to categories (see step 4).

Category metafield definitions (same keys/types as products):

  • custom.nutrient_rows (list of metaobjects → Nutrient row)
  • custom.supplements_facts_title (single line text)
  • custom.serving_size (single line text)
  • custom.other_ingredients (multi-line text)
  • custom.view_label_text (single line text)
  • custom.view_label_link (URL)

4) Assign category metafields only to relevant product categories

Goal: ensure non-supplement products (e.g. trainers) do not get these fields and do not render the panel.

  1. In the category metafield definitions, use Assigned to categories to restrict these definitions to only the supplement-related categories.
  2. Confirm unrelated categories do not have these definitions assigned.

Practical effect:

  • For products in categories without these definitions, product.category.metafields.custom.* will be blank, so the Supplement Facts panel will not render.

5) Populate category defaults

  1. For each supplement-related category, open the category in Admin.
  2. Populate the category metafields:
    • Add entries to Supplement facts rows (custom.nutrient_rows).
    • Optionally set title / serving size / other ingredients and the link.

Use category defaults when:

  • Many products in the category share the same label.
  • You want one place to update the label for a whole category.

6) Override on a specific product when needed

Per-product values take priority over category defaults.

  1. Open the product in Admin.
  2. Populate any product metafields listed in step (2).
  3. If the product has its own custom.nutrient_rows, the theme uses those rows instead of category rows.

7) Validation steps

  • Confirm it renders on a supplement product:

    1. Open a product that has either product-level rows or category defaults.
    2. Verify the Supplement Facts panel appears and includes at least one row.
  • Confirm it stays hidden for non-supplement products:

    1. Open a product assigned to an unrelated category (e.g. trainers).
    2. Verify the category does not have the supplement metafield definitions assigned.
    3. Verify the panel does not render (and any tabs system does not create an empty tab).

Troubleshooting

  • Nothing renders

    • Confirm at least one Nutrient row exists with both nutrient_name and amount_value.
    • Confirm the metafield keys are exactly under custom.* as listed in “What the theme reads”.
  • Rows exist but still blank

    • Confirm custom.nutrient_rows is a list of metaobjects referencing the Nutrient row definition (not a different metaobject).
  • Category defaults not working

    • Confirm the category metafields are assigned to the product’s category via Assigned to categories.