Originally written by Bryce Jackson, last updated Jan 21, 2026, on the Swan Retail knowledge base (SRS).
Part of: Barcodes
Find an inner prefix product code from 12 digit barcode
This is the priority order of processing a 12 digit barcode to get a product code, if not found the next check is attempted
check first 6 digits (UPC-A standard 2PPPPPxCCCCz) Torex - drop first digit and then read 4 digit barcode
Find an inner prefix product code from 13 digit barcode
This is the priority order of processing a 13 digit barcode to get a product code, if not found the next check is attempted
check first 7 digits (EAN-13/UPC-B standard 02PPPPPxCCCCz) check first 6 digits (non-standard for EAN-13/UPC-B but used in legacy till) Torex - drop first two digits and then read 4 digit barcode
Item Price for applying a price embedded barcode
Get the item price for a given barcode. This is calculated by taking the weighted price and mutliplying by the price metric
Weighted Price for weight embedded barcodes
Get weighted item price. If barcode prefix starts with 28 or 02,then 5 digits barcode are
considered to be the weighted price of the item. Everything else is 4 digit prices
Price is found inside square brackets of barcode below
12 Digit Barcodes
using the 28 GS1 Prefix standard on a non-standard barcode (from legacy till) which checks digits 7-11 for 5 digit price 28XXXX[PPPPP]C using the 2 GS1 prefix standard on a UPC-A standard barcode which checks digits 7-12 for 4 digit price 2PPPPPx[CCCC]z
13 Digit Barcodes
using 28 GS1 standard on a EAN-13/UPC-B barcode 28PPPPP[CCCCC]z. 5 digit cost price using 02 GS1 standard on a EAN-13/UPC-B barcode 02PPPPP[CCCCC]z. 5 digit cost price using 20 GS1 standard on a EAN-13/UPC-B barcode 20PPPPPx[CCCC]z using 21 GS1 standard on a EAN-13/UPC-B barcode 21PPPPPx[CCCC]z using 22 GS1 standard on a EAN-13/UPC-B barcode 22PPPPPx[CCCC]z
Price Metric for price embedded barcodes
Price metric is multiplied with the embedded barcode price to come up with the actual price of
the item. eg embedded barcode price = 0275 and barcode prefix = 21 (price metric = 10)
therefore actual item price =0275*(1/10)=2.75
12 digit barcode
Checking for a UPC-A barcode which is 12 digits. prefix of 2 denotes Price embedded
This is the priority order of processing a 12 digit barcode to get a price metric, if not found the next check is attempted
using the 22 GS1 Prefix standard on a non-standard barcode (from legacy till) which checks first 6 digits for product code [22XXXX]VPPPPC * Price metric is to multiply by 1 using the 2 GS1 prefix standard on a UPC-A standard barcode which checks first 7 seven digits for product code [2PPPPP]xCCCCz * Price metric is to multiply by 0.01
13 digit barcode
This is the priority order of processing a 13 digit barcode to get a price metric, if not found the next check is attempted
using 02 GS1 standard on a EAN-13/UPC-B barcode 02PPPPPCCCCCz * Price metric is to multiply by 0.01 using 20 GS1 standard on a EAN-13/UPC-B barcode 20PPPPPxCCCCz * Price metric is to multiply by 0.01 using 21 GS1 standard on a EAN-13/UPC-B barcode 21PPPPPxCCCCz * Price metric is to multiply by 0.1 using 22 GS1 standard on a EAN-13/UPC-B barcode 22PPPPPxCCCCz * Price metric is to multiply by 0.01 using 28 GS1 standard on a EAN-13/UPC-B barcode 28PPPPPCCCCCz * Price metric is to multiply by 0.01
Variable measure barcodes - GS1 UK
Items with weight or price inclusive set to W (WEIGHT) will now have the quantity calculated using the embedded price, given a 13 digit barcode prefixed with prefixed with 02 or 20.
The individual price shall be set to the selling price on the stock branch level, which is expected to be the price per unit of measure (e.g. Kilograms). The total price will be set to the barcode’s embedded price. The quantity will then be calculated using the embedded price / selling price.
Items with this setting cannot have their quantity amended.
Items with this setting will have a different price override behaviour than usual. Instead of inputting the new individual price, the operator is now expected to enter the total price of the item. The quantity will remain the same. The individual price (unit price) is updated in line with new total price.
Examples
2090010612342
Item has a primary barcode of 209001 set in SRS.
Embedded price would be £12.34
Given a selling price of £16.00, the calculated quantity would be 0.771 (to 3 d.p.).
0290010612342
Item has a primary barcode of 029001 set in SRS.
Embedded price would be £612.34 .
Given a selling price of £16.00, the calculated quantity would be 38.271 (to 3 d.p.).
Quantity for weight embedded barcodes
Barcode must be 13 digits for EAN-13/UPC-B standard on the GS1 variable weight prefix. Accepted GS1 variable weight prefixes 23, 24 and 25. 23XXXXXVWWWWC Weight based /1000. 24XXXXXVWWWWC Weight based /100. 25XXXXXVWWWWC Weight based /10
This is calculated by taking the weighted quantity and multiplying by quantity metric
Weighted quantity is found in square brackets of barcode below
EAN-13/UPC-B barcode weight embedded. 23XXXXXV[WWWW]C. 24XXXXXV[WWWW]C. 25XXXXXV[WWWW]C
Quantity Metric for applying weight embedded barcode
Get the quantity metric that is used to calculate the total mass of the weighed item for a
given barcode
EAN-13/UPC-B 23XXXXXVWWWWC. Weight based /1000 * Quantity metric is multiply by 0.001 EAN-13/UPC-B 24XXXXXVWWWWC. Weight based /100 * Quantity metric is multiply by 0.01 EAN-13/UPC-B 25XXXXXVWWWWC. Weight based /10 * Quantity metric is multiply by 0.1
Weighted Price for weight embedded barcodes
Get weighted item price. If the barcode prefix starts with 28 or 02, then 5 digits barcode are
considered to be the weighted price of the item. Everything else is 4 digit prices
Price is found inside square brackets of barcode below
12 Digit Barcodes
using the 28 GS1 Prefix standard on a non-standard barcode (from legacy till) which checks digits 7-11 for 5 digit price 28XXXX[PPPPP]C using the 2 GS1 prefix standard on a UPC-A standard barcode which checks digits 7-12 for 4 digit price 2PPPPPx[CCCC]z
13 Digit Barcodes
using 28 GS1 standard on a EAN-13/UPC-B barcode 28PPPPP[CCCCC]z. 5 digit cost price using 02 GS1 standard on a EAN-13/UPC-B barcode 02PPPPP[CCCCC]z. 5 digit cost price using 20 GS1 standard on a EAN-13/UPC-B barcode 20PPPPPx[CCCC]z using 21 GS1 standard on a EAN-13/UPC-B barcode 21PPPPPx[CCCC]z using 22 GS1 standard on a EAN-13/UPC-B barcode 22PPPPPx[CCCC]z
Further notes
The till conforms to following barcode standards:
GS1/EAN-13/UPC-B which is a 13 digit barcode
GS1/UPC-A which is a 12 digit barcode (only on price embedded)
When reading a barcode the till will still first check for an existing barcode listed on an item already held on the till database.
Thereafter it will check if the barcode meets the standards below:
Price Embedded Barcode:
12 digit barcode which has prefix of 2
13 digit barcode which has a prefix of either 02,20,21,22 or 28
Weight Embedded Barcode:
13 digit barcode which has a prefix of either 23,24 or 25
Thereafter it will look for a 6 or 7 digit barcode that is listed on an item using the embedded product code
Product code (barcode) searched for on any item is shown in bold below
7 digit check on 13 digit barcode
GS1/EAN-13/UPC-B
02PPPPPCCCCCz
20PPPPPxCCCCz
21PPPPPxCCCCz
22PPPPPxCCCCz
23PPPPPxCCCCz
24PPPPPxCCCCz
25PPPPPxCCCCz
28PPPPPCCCCCz
6 digit check on 13 digit barcode
In the legacy till there is a non-standard product code check for the first 6 digits on a GS1/EAN-13/UPC-B barcode format so this has also been included in the new till.
But this lookup will only occur when the 7 digit check above does not find an item (note that this lookup does not include weight inclusive barcodes)
GS1/EAN-13/UPC-B
02PPPPPCCCCCz
20PPPPPxCCCCz
21PPPPPxCCCCz
22PPPPPxCCCCz
28PPPPPCCCCCz
6 digit check on a 12 digit barcode
(does not include weight inclusive barcodes)
GS1/UPC-A
2PPPPPxCCCCz
If an item has not been found with a 6 or 7 digit barcode that matches from above, then this functions ends here.
Weight Embedded barcode:
Only on 13 digit barcode
The weight price uses the associated selling price from item.
The weight quantity is found using the bold characters as follows:
23PPPPPx1111z divides by 1000 Example quantity 1111 / 1000 = 1.111
24PPPPPx1111z divides by 100 Example quantity 1111 / 100 = 11.11
25PPPPPx1111z divides by 10 Example quantity 1111 / 10 = 111.1
Price embedded barcode:
The price quantity is defaulted to a single unit
The price is found using the bold characters as follows:
12 digit barcode
non-standard barcode with a 28 prefix from a 6 digit product code check is validated first so we can get the 5 digit price if applicable
28PPPP11111z divides by 100 Example price 11111 / 100 = 111.11
GS1/UPC-A
2PPPPPx1111z divides by 100 Example price 1111 / 100 = 11.11
13 digit barcode
GS1/EAN-13/UPC-B
02PPPPP11111z divides by 100 Example price 11111 / 100 = 111.11
20PPPPPx1111z divides by 100 Example price 1111 / 100 = 11.11
21PPPPPx1111z divides by 10 Example price 1111 / 10 = 111.1
22PPPPPx1111z divides by 1 Example price 1111 / 1 = 1111
28PPPPP11111z divides by 100 Example price 11111 / 100 = 111.11
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article