How do I show allergen icons and diet badges on my product page?
On this page
Icons, badges and the layout of the Food information block are set in the app, on the Storefront page. The preview on that page shows how the block looks in your store.
Show allergen icons
- In the app, open Storefront.
- Under Content display, turn on Show allergen icons.
- Click Save. You will see a confirmation.
Each allergen group the product contains (selected allergens and the “Contains” statement) appears as an icon with its name; a specific cereal or nut is named in the written line, not as a separate icon. “May contain” allergens get no icon. The written “Contains” line stays, because the label must always list allergens in words. Icons are off by default.
Add diet badges
- In the app, open Food labels and click the product.
- Under Allergens and diet, in Diet, select every claim that applies: Vegan, Vegetarian, Gluten-free, Lactose-free or Organic.
- Click Save, then Publish under Publishing in the right-hand column, so customers see the change.
- Open Storefront, turn on Show diet badges and click Save.
Diet is optional. Products without a diet claim show no badges. Badges are off by default.
To set diet for many products at once, add a diet column to your CSV file and separate several claims with |, for example vegan|gluten_free. Allowed values are vegan, vegetarian, gluten_free, lactose_free and organic. Files without a diet column still import and keep each product’s stored diet.
Choose a template
On the Storefront page, pick one under Template:
- Table: every section is visible and the nutrition information is in a table.
- Accordion: each section (Ingredients and allergens, Nutrition information, Other information) opens and closes on its own.
- Compact: allergen icons and diet badges on top, ingredients visible, and nutrition and other information in sections.
- Information cards: every section open, in cards that use one or two columns depending on the available width.
For Accordion and Compact, choose whether Open the first section is on (under Content display). A section with no content is not shown. Under Appearance, use Accent color to set the color of icons, badges and section arrows. For styles, colors and custom CSS, see customizing the food label widget.
Put the block on your product page
Click Add block on the Storefront page, add the Food information block to the product template and click Save in the theme editor. Changes you save on the Storefront page apply to the block without editing the theme again. The heading and the colors are set on the same page.
Diet claims are your responsibility
The app shows the claims you select and does not check them. Make sure each claim is true and follows EU rules before you select it. For example, “gluten-free” may only be used when the product meets Regulation (EU) No 828/2014, which allows up to 20 mg/kg of gluten. Rules for “organic” and for “vegan” or “vegetarian” claims can also differ by country.
Troubleshooting
- Icons or badges don’t appear: check that Show allergen icons or Show diet badges is on and that you clicked Save on the Storefront page. Badges also need a diet selected on the product’s label.
- A badge or icon name is in the wrong language: edit the wording under Translations. Diet names are in the Diet badges group.
- The first section does not open: Open the first section only applies to the Accordion and Compact templates.
- The block looks different from the preview: the preview uses the sample label or the product you select, with the default text and border colors. Colors set on the block in the theme editor still apply in your store.