Forums / Setting Up Categories, Products, Attributes / Best practice for food allergens

Best practice for food allergens

Views: 1,839

Results 1 to 7 of 7
2 Jul 2025, 2:22 AM
#1
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Best practice for food allergens

Hi All,

In the UK when selling food you need to highlight allergens as per the Food Standards Agency guidance view them here . Currently most stores that offer food ordering don't display the allergens and just use text such as 'Please contact the store for advice'. I want to raise the bar and make this a new normal when ordering with any of my Zen Cart stores.

I am looking at product attributes, however this appears to be directed at color size cost etc. These would just be advisories but need to be displayed clearly and **must **be searchable. Ideally with search options to remove products that contain Celery as an example. There are 14 allergens that must be highlighted.

Ideally the allergens would be tick boxes when adding new products. Each allergen also requires a description as well as a title.

Example:

Celery
This item includes celery, celery stalks, leaves, seeds or the root called celeriac.

I am looking for some suggestions on how best to achieve this or if others have done this previously.

In the past I have achieved this by using inline code directly in the product description. However this is problematic for a few reasons and requires HTML knowledge to get going. It is also restricting the store owners from adding products without technical help.

Open to suggestions.

Zen Cart v2.1.0

2 Jul 2025, 4:04 AM
#2
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: Best practice for food allergens

SpaceMonkey:

Hi All,

I am looking at product attributes, however this appears to be directed at color size cost etc. These would just be advisories but need to be displayed clearly and **must **be searchable. Ideally with search options to remove products that contain Celery as an example. There are 14 allergens that must be highlighted.

I actually think product attributes can work for you.

Create each allergen as a dropdown which only has one value - ie the description of the allergen.

These are searchable and will show on each product as you specify.

2 Jul 2025, 4:09 AM
#3
royaldave avatar

royaldave

Zen Follower

Join Date:
Aug 2013
Location:
Perth, WA, AU
Posts:
285
Plugin Contributions:
1

Re: Best practice for food allergens

that said i am unsure if zencart has existing functionality (or a plugin) to search on not containing...

if you visit this page on my site -

https://www.funkyballoons.com.au/zencart/index.php?main_page=product_info&cPath=815&products_id=12486

you'll see i've put a bond on that item using the method I described. Ignore the price amount, if it's $0 then no price will display.

You can also search on bond and you'll see the products i've done this to.

2 Jul 2025, 9:19 PM
#4
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: Best practice for food allergens

Thanks royaldave.

I will have some further testing later and look a little closer. I see what you are referring to with the Bonds section. Some products may realistically contain 6 allergen warnings and have selection options also (ie meat choice and size). It is important that these remain as advisories and not selections and obviously they don't affect the price.

Thanks again and I will post an update when I have tested a little further.

3 Jul 2025, 12:11 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Best practice for food allergens

You could also try using "display only" attributes. These are listed on a product's detailed-information page (e.g. product_info) but don't carry over to the shopping cart.

Note, too, that attributes' text information doesn't come into play when searching (by default). That's something that could be added via custom code.

7 Jul 2025, 2:53 AM
#6
spacemonkey avatar

spacemonkey

Zen Follower

Join Date:
Nov 2013
Location:
Dorset, UK
Posts:
124
Plugin Contributions:
0

Re: Best practice for food allergens

Hi Lat9

lat9:

You could also try using "display only" attributes. These are listed on a product's detailed-information page (e.g. product_info) but don't carry over to the shopping cart.

Assuming as per your site: Perfect at this stage. Definitely a way forward without any core changes. Attachment 21001

Going to look closely at this today. Fingers crossed. :cool:

lat9:

Note, too, that attributes' text information doesn't come into play when searching (by default). That's something that could be added via custom code.

I think it should be simple enough to work that one out. I remember working on the search operators a few years back.

Ok, plan exists (in my head at least) testing this week and will let you both know how I get on.

Thank you for sharing

7 Jul 2025, 12:09 PM
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Best practice for food allergens

That display on my site is custom code, not attributes ... unfortunately.