Shopify search by barcode: how shoppers can find products by GTIN, UPC or EAN
Some shoppers don't search by product name. They have the box in their hand, or a reorder list from their own system, and they type the number under the barcode.
Pharmacies, beauty stores, book shops, hardware stores and anyone selling to trade buyers see this often. The question is simple: does your Shopify store find the product when someone types its barcode?
The short answer: yes for the full code, only partly for a piece of it.
Where Shopify stores the barcode
Every product variant has a Barcode field. In your Shopify admin, open a product and look in the Inventory section. For products with variants, select the variants, open the menu and choose Edit barcodes to enter a number for each one (Shopify Help Center: Understanding barcodes).
Shopify's help page describes the common types:
- GTIN is the umbrella term for internationally recognized product identifiers. A GTIN has 8, 12, 13 or 14 digits.
- UPC (GTIN-12) is used for consumer products, usually in North America.
- EAN (GTIN-13) is used for consumer products, usually outside North America.
- ISBN identifies a book edition. It has 10 or 13 characters.
Whatever the type, it goes into the same Barcode field. That field is what store search reads.
What Shopify's native search does with barcodes
Shopify's online store search includes variant barcodes in its searchable fields, together with title, description, product type, tags, vendor, variant title and SKU (Storefront search behavior).
Here is how matching works, according to that page:
- A shopper who types the full barcode finds the product.
- A partial barcode matches only the first 3 to 10 characters. Shorter or longer partial searches don't match.
- Characters from the middle or end of a code don't match, unless they form a complete segment separated by hyphens, slashes or spaces. Barcodes are usually one block of digits, so in practice the end of a barcode does not match.
- Typo tolerance does not apply to SKUs and barcodes. That is good: a mistyped barcode should not return a different product.
So if a variant's barcode is 012345678905:
| Shopper types | Found? |
|---|---|
012345678905 |
Yes, the full code |
0123456 |
Yes, the start of the code |
78905 |
No, the end of the code |
Where this goes wrong in real stores
Shoppers type the end of the code
People often read the last digits, or a supplier's list shows a shortened code. Native search returns nothing for the end of a barcode.
UPC and EAN versions of the same number
Shorter GTINs are often padded with leading zeros to 14 digits when systems exchange product data (GS1: required GTIN format). So the same 12-digit UPC can show up on a supplier list or a shopper's reorder sheet with one or two extra zeros in front. If your feed stored the barcode as 00012345678905 and a shopper types the 12-digit 012345678905 printed on the box, it is not the full code and it doesn't line up from the first character, so native search does not find it.
Barcodes missing on some variants
Search can only match what is in the field. Products imported from a supplier feed sometimes have the barcode on the first variant only, or in a description instead of the Barcode field.
How to check your own store
- Export your products from the Shopify admin and look at the barcode column. Count the variants with an empty barcode.
- Pick three products. On your storefront, search each full barcode. All three should be found.
- Search the last 5 digits of each barcode. With native search, expect no results.
- If your barcodes came from a supplier feed, check whether some are stored with extra leading zeros, then search one of them without those zeros.
If step 2 fails, fix your data first. If steps 3 or 4 fail and your customers search by code, read on.
Free options
Fill in every variant's barcode
This is the cheapest fix, and every tool that reads your product data benefits from it, not only search. Use a bulk edit or a CSV import to fill gaps.
Add the form shoppers use as a tag
If shoppers search a short form of a code, add it as a product tag. Tags are searchable. This works for a handful of best-sellers, not for a full catalog.
Look at what shoppers actually type
In your Shopify admin reports, look at online store searches that returned no results. If many of them are long numbers, barcode search is costing you sales. We explain how to read that list in How to find and fix searches with no results.
When to use a search app
If shoppers search by fragments of codes every day, a search app that indexes codes differently is the practical fix.
That is what we built SearchSure for. It replaces your store's search box and lets shoppers find a product by any part of a SKU or barcode, including the last digits. Because any part of the code matches, a shopper who types a 12-digit UPC also finds a product whose barcode is stored with extra leading zeros. (The reverse is not true: if the shopper adds zeros your stored code doesn't have, it won't match.) Codes are matched exactly, without typo correction, and an exact SKU or barcode match is shown first.
A few things to know before you install:
- Your theme's search page and filters stay as they are. An optional block on the search page shows products the theme's own search missed.
- If SearchSure does not answer within 1.5 seconds, the search box goes back to Shopify's own search.
- The Free plan covers up to 300 products. Pro covers up to 10,000 products for $9.99 every 30 days, with a 7-day free trial.
You can install SearchSure from the Shopify App Store and test it with the same barcode searches from the checklist above.
If your codes are SKUs rather than barcodes, the same rules apply with slightly different limits. See Shopify SKU search not working?
SearchSure is a Shopify app by Deplonic. Questions: weus@weuscnc.com