openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
http://openfoodfacts.github.io/openfoodfacts-server/
GNU Affero General Public License v3.0
660 stars 389 forks source link

Disable NOVA + Nutri-Score on OFF if category = Non food products #1577

Open teolemon opened 5 years ago

teolemon commented 5 years ago

What

VaiTon commented 5 years ago

I think this has been done. @teolemon @stephanegigandet

CharlesNepote commented 5 years ago

It's not fixed, see https://world.openfoodfacts.org/category/non-food-products/nova-groups

vanshikaarora commented 5 years ago

Hey @teolemon @VaiTon if no one is working on this issue. Can I please take this up?

stephanegigandet commented 5 years ago

Hi @vanshikaarora, sure, go ahead. It has been fixed for NOVA, but not for the Nutri-Score

Nova fix is at: https://github.com/openfoodfacts/openfoodfacts-server/blob/master/lib/ProductOpener/Food.pm#L4995

Thank you!

VaiTon commented 5 years ago

Hey @vanshikaarora sure you can! All contributions are well accepted here! I would say good luck with it! 😆

vanshikaarora commented 5 years ago

Hey @VaiTon @stephanegigandet @CharlesNepote , how to check whether it is a non-food product, is there a specific category tag for non-food products?

VaiTon commented 5 years ago

Yep, see https://world.openfoodfacts.org/category/non-food-products

vanshikaarora commented 5 years ago

Yep, see https://world.openfoodfacts.org/category/non-food-products

@VaiTon in the class CategoryName the field name would return Non food products right?Or is there a different feild with the value Non food products?

VaiTon commented 5 years ago

Yep, see https://world.openfoodfacts.org/category/non-food-products

@VaiTon in the class CategoryName the field name would return Non food products right?Or is there a different feild with the value Non food products?

I think that should be right but @stephanegigandet could definitely answer correctly.

hangy commented 5 years ago

I believe, it should be possible to check for that category with has_tag($product_ref, 'categories', 'en:non-food-products').

vanshikaarora commented 5 years ago

Hey, I have solved this Issue here https://github.com/openfoodfacts/openfoodfacts-androidapp/pull/2686. Kindly review :)