Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support EAN-13 for variable prices #1288

Open
SantosSi opened this issue Jul 9, 2018 · 7 comments
Open

Support EAN-13 for variable prices #1288

SantosSi opened this issue Jul 9, 2018 · 7 comments

Comments

@SantosSi
Copy link
Contributor

SantosSi commented Jul 9, 2018

What

  • Support EAN-13 for variable prices. This allows the solution to avoid duplicates of the same product with different prices. Can (optionally) also be done for variable weight barcodes.

Steps to reproduce

Expected behavior

Observed behavior

  • No decoding.

Part of

@teolemon
Copy link
Member

teolemon commented Jan 13, 2019

price: 02, 22, 24, 26, 28

L'indicatif est 02, révélateur d'un article à prix variable. Les caractères 3 à 7 indiquent le fabricant, le distributeur, ou encore si l'article est de type « Fruits et légumes ».
Les caractères 8 à 12 indiquent le prix de l'article. Ici, il est de 45,75, car on suppose que l'unité de prix sélectionné en préférences est centimes (457,5 si la préférence est sur décimes).

weight: 21, 23, 25, 27, 29.

le poids compris dans le code entre le 8ème et le 12ème caractère.

@teolemon
Copy link
Member

@stephanegigandet for LDC

@hangy
Copy link
Member

hangy commented Feb 3, 2019

Barcode decoded into its elements. Was able to find an explanation only in German: https://www.selectline.ch/pdf/EAN-13%20fuer%20variable%20Gewichts-%20und%20Preiseinheiten.pdf

The mentioned document (GTIN: 7612345001807) says that this is valid for Switzerland. I don't know about international use, but the document seems like it could be out of date, because it refers to "VMN-13" as a term used for the 20-29 prefix range. According to WR 16-301, the term VMN (variable measure
number) had only been used in the glossary, and has been deprecated in 2013.
According to the current GS1 Specs (valid: Release 19), the same prefix range is reserved for Restricted Circulation Numbers within a geographic region. Thus, unfortunately, it looks like there is no general standard for decoding variable prices from barcodes.

@hangy
Copy link
Member

hangy commented Feb 3, 2019

Other countries

Notice from the Swedish website:

A variable weight number is national, which means that a Swedish variable weight number can only be used in Sweden.

@SantosSi
Copy link
Contributor Author

SantosSi commented Feb 3, 2019

My suggestion for the optimum solution as follows.

  • If a country was added: Parse the barcode as unique in that country, dropping the variable weight/price part according to the rules there.
  • If the country was not added to the product, check the similarity of the product, e.g. name (could be different in another country/language) and/or type:
    • if similar, it should be the same product with a different weight or price,
    • if not similar, it should be a different product, assuming a barcode from a different country.

@ItsJustRuby
Copy link

+1 for the weight-based use case for this. Here in Switzerland, this system is used a lot for meat & meat products, and even branded pre-packaged cheeses, e.g. https://world.openfoodfacts.org/code/216419800xxxx (at time of writing, this page shows 30 results, all of which are different size chunks of the same mild Gruyère).

@ItsJustRuby
Copy link

ItsJustRuby commented Mar 27, 2023

(This part is off-topic)

Related to the variable-barcodes tag on this issue, I could not find a ticket for a similar issue (multiple barcodes mapping to the same product) yet, so my apologies if this is a duplicate issue:

Several Swiss supermarket chains use a system where they reduce products in price (in order to reduce food waste) by covering up the barcode with a custom variant. As an example:

Without knowing the technical specification, the barcode appears to contain a prefix (27) followed by the EAN-13 and more data (including the price of CHF 2.45 encoded as 245 at the end).

https://world.openfoodfacts.org/code/27xxxxxxxxxxxxxxxxxxxxxx contains more examples of this for the Swiss supermarket Coop.
Similarly, Migros uses the prefix 31 as seen in the picture (but not scanned barcode) for https://world.openfoodfacts.org/product/7610745672252 , other examples at https://world.openfoodfacts.org/code/31xxxxxxxxxxxxxxxxxxxx .

It would be great if instead of creating duplicate products, these scanned barcodes would instead map to the same product.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To discuss and validate
Status: Backlog
Development

No branches or pull requests

4 participants