How to make GS1 QR codes for your PrestaShop products
Packs you print today will still be on shelves when retail checkouts start reading 2D barcodes at the end of 2027. This guide shows how to export your EAN-13 and UPC fields from PrestaShop with one SQL query and turn each one into a print-ready GS1 QR code.
DLCode · Updated · 6 min read
Your GTIN goes in the EAN-13 or UPC field
A GTIN is the number printed under your UPC or EAN barcode. PrestaShop has an EAN-13 or JAN barcode field, a UPC barcode field and an ISBN field for each product.
Each combination, such as a size or color, has its own EAN-13, UPC and ISBN fields. Give every combination its own GTIN.
A GS1 QR code needs a real GTIN with 8, 12, 13 or 14 digits. If you do not have GTINs yet, see How to get a GTIN for your products in the US.
Export your barcodes with the SQL Manager
The SQL Manager runs read-only queries on your shop database and exports the result as a CSV file. Use it to get every product and combination with its barcode.
- In your back office, go to Advanced Parameters > Database > SQL Manager.
- Click Add new SQL query.
- Name the query, such as DLCode barcodes, and paste the query below.
- Save the query.
- In the list of queries, click the Export icon next to it. A CSV file downloads.
SELECT p.id_product, pa.id_product_attribute, pl.name, p.reference, p.ean13, p.upc, p.isbn, pa.reference AS combination_reference, pa.ean13 AS combination_ean13, pa.upc AS combination_upc, pa.isbn AS combination_isbn
FROM ps_product p
LEFT JOIN ps_product_lang pl ON (p.id_product = pl.id_product)
LEFT JOIN ps_product_attribute pa ON (p.id_product = pa.id_product)
WHERE pl.id_lang = 1 AND pl.id_shop = p.id_shop_defaultChange 1 to the ID of the language you want for product names. If your tables do not start with ps_, change the prefix to match. The List of MySQL Tables section on the same page shows your table names.
PrestaShop separates the columns with semicolons by default. Keep the file as it is.
Upload the file to DLCode
- In DLCode, go to Import.
- Choose your PrestaShop export file and click Import.
- DLCode adds each product and combination with a barcode, up to your plan limit.
- Open a product and download its print file.
For a combination, DLCode reads its own EAN-13, then UPC, then ISBN. For a product without combinations, it reads the product fields in the same order. The combination reference is added to the product name.
Rows with no barcode are left out. A barcode that is not a valid GTIN is skipped, and the import report shows its row number. DLCode checks the length and the last digit of each GTIN.
Each print file has the barcode and the QR code side by side, 4 mm apart. Files come as SVG, PDF, EPS and PNG, with no watermark. For sizes and quiet zones, see Print specs for a QR code next to your UPC or EAN.
Send each scan to its product page
The PrestaShop file has no full product page links. After import, each code opens a hosted page on dlcode.org with the product name, and the brand if you filled it in.
To send shoppers to your store, add a link to each product in DLCode. Copy the address of the product page from your live store and paste it in. The link must start with https://.
You can change the link at any time. The printed code stays the same, and the change applies from the next scan.
A checkout scanner that reads 2D barcodes takes the GTIN from the code. A phone camera opens the link.
What Sunrise 2027 means for your PrestaShop products
Sunrise 2027 is the GS1 US goal for US retail checkouts to read 2D barcodes, such as GS1 QR codes, by the end of 2027. Packs you print now will still be in stores then, so add the QR code in your next print run instead of paying for a second one later.
During the transition, GS1 recommends printing both the UPC or EAN and the QR code. Keep your current barcode on the package and add the QR code next to it. See Sunrise 2027: how to add a GS1 Digital Link QR code to your packaging.
Get your PrestaShop codes printed this week with DLCode
Turn your whole PrestaShop catalog into print-ready GS1 QR codes from one export file.
- Import every product and combination from one PrestaShop export.
- Get the barcode and GS1 QR code side by side in SVG, PDF, EPS and PNG, with no watermark.
- Point each code at its product page in your store, and change it any time with no reprint.
- Recall one lot, and get a free domain for your codes, with any paid pack.
Start free for 10 products with no card. Paid packs are a one-time payment: $249 for 25 products, $499 for 100 and $1,490 for 1,000. Hosting and unlimited scans are included through December 31, 2030, with no subscription.
Export your products today and have print files before your next run. Start free, see DLCode for PrestaShop stores or See pricing.
Checklist
- Every product and combination has its own GTIN from GS1 in the EAN-13 or UPC field.
- No barcode field holds an internal code or a reference.
- You saved the query in the SQL Manager and exported it as CSV.
- You uploaded the file to DLCode and checked the import report for skipped rows.
- Each product in DLCode links to its product page on your live store.
- You printed a proof and scanned it with more than one phone.
Sources
- SQL Manager · PrestaShop documentation
- Managing Products · PrestaShop documentation
- Database structure (db_structure.sql) · PrestaShop on GitHub
- Default configuration (configuration.xml) · PrestaShop on GitHub
Get your QR code
Get a print-ready file with your barcode and a GS1 Digital Link QR code side by side. 10 products free, and pack features free for 30 days. No card. Then pay once from $249.