AllergenBadge is installed
Show allergens and dietary suitability on your product pages.
- 1
Create the product metafields
Open Settings > Custom data > Products and add these single-line text metafields:
Open metafield settingscustom.allergens,custom.dietary(optionallycustom.allergen_notes). - 2
Fill in each product
On a product, set
allergenswith a comma-separated list of the allergen codes below (e.g. milk, eggs, gluten) anddietarywith the dietary codes (e.g. vegetarian, nut_free). Useallergen_notesfor free text such as "May contain traces of nuts." - 3
Add the block to your theme
In the theme editor, open a Product template, click Add block, and choose Allergens & Dietary. Save. The badges appear automatically per product.
Open Theme Editor
Allergen codes
gluten | Cereals containing gluten |
crustaceans | Crustaceans (prawns, crab, lobster) |
eggs | Eggs |
fish | Fish |
peanuts | Peanuts |
soya | Soya (soybeans) |
milk | Milk (dairy) |
tree_nuts | Tree nuts (almond, hazelnut, walnut…) |
celery | Celery |
mustard | Mustard |
sesame | Sesame seeds |
sulphites | Sulphur dioxide / sulphites |
lupin | Lupin |
molluscs | Molluscs (mussels, squid, oysters) |
Dietary codes
vegan | Suitable for vegans |
vegetarian | Suitable for vegetarians |
gluten_free | Gluten-free |
dairy_free | Dairy-free |
nut_free | Nut-free |
organic | Certified organic |
halal | Halal |
kosher | Kosher |