Printing the UPC Number & Barcode

omgchrisomgchris Member Posts: 6


I copied this template

i changed:

<img class="ean8" src="/barcode.php?type=label&amp;number={{ Label.Item.systemSku }}&amp;ean8=1&amp;noframe=1">
					<img class="ean" src="/barcode.php?type=label&amp;number={{ Label.Item.systemSku }}&amp;noframe=1">


<img class="ean8" src="/barcode.php?type=label&amp;number={{ Label.Item.upc}}&amp;ean8=1&amp;noframe=1">
					<img class="ean" src="/barcode.php?type=label&amp;number={{ Label.Item.upc }}&amp;noframe=1">

My intention with the modification is to print the "UPC" field/number from the UPC field in lightspeed products.

It almost works. It's adding another digit to the end. When I scan the barcode, it wont find anything because the scan gun is also including the extra digit in to the search field.

The UPC or (barcode/digits) on our products are 12 digits long. To me, a lay person this is a UPC/Barcode but I'm told its an EAN.. okay.

I only use the "UPC" field in our lightspeed account and in that field is the barcoded number displayed on all our products, and almost all other products in a normal retail place.

I would really appreciate some help removing that last digit.

Otherwise, the scannable barcode could be the system ID, as long as the 12 digital number/upc, is the same that is displayed in the UPC field when editing a product.

We need to match physical products UPC with the UPC on the tag, so the number should match exactly. As for scanning, we just need that product to be searchable via scan gun which currently we cannot.

If I could have summed this up better I apologize I just want to include as much info as possible.

Thank you!

Best Answer


  • omgchrisomgchris Member Posts: 6

    Anyone there? I need some help, I shouldn't have to hire a developer to print a standard upc.

  • gregaricangregarican Member Posts: 500 
    edited June 25

    An EAN is different than a UPC. The former is 13 digits, while the latter is 12 digits. I wonder if the referenced class="ean" and class="ean8" is properly handling a different value compared to what it would be expecting?

  • gregaricangregarican Member Posts: 500 
    edited June 25

    Just paste this into a plain text file, save it with an HTML extension and see what happens.

    <img class="ean" src=";number=210000004030&amp;noframe=1">

    <img class="upc" src=";number=21000000403&amp;noframe=1">

    There is a class="upc" that should work for you in the case of the second barcode. 🙂 And there are ways you can configure a barcode scanner to ignore these extra digits (i.e. - the check digit).

    And there is a reference Lightspeed provides on how to do this as well!

    Post edited by gregarican on
  • omgchrisomgchris Member Posts: 6

    Thank you, I've tried this before though and it still adds this additional digit to the end, making what the barcode scanner prints in to the search field, return no results due to the extra digit.

    I understand the barcode scanner can be programmed this way but we're trying to follow some standards, our vendors all use different barcode scaners etc and we need to print just the normal barcode/upc without the digit, so they and we, don't have to re program our barcode scanners.

  • gregaricangregarican Member Posts: 500 

    You need to perhaps look at some reference materials on how these barcode symbologies work. Here's a reference in terms of the UPC-A barcode symbology --> Although the values are 12 digits long, only the first 11 digits are user-assignable. The last digit is a check digit and validates the first 11.

    While you can program a scanner to ignore that final check digit when reading a barcode, a barcode itself cannot be readily forced to drop the final digit since that in and of itself helps define the standard it's printing (e.g. - UPC-A requires 12 digits to be valid).

  • omgchrisomgchris Member Posts: 6

    Thanks again, I have read this and formatted to UPC-A, the one I want.

    When using that websites tool, I get it working without issue.

    Trying in lightspeed, it wont work.

  • gregaricangregarican Member Posts: 500 
    edited June 25

    Back in 2018 when first launching Retail we had issues scanning our existing tags. Here are a couple of links to videos demonstrating the issues:

    From what I remember there was a difference between the iPad's POS scanning them versus scanning them in the Retail Manager area of iPad POS. Our barcodes weren't UPC or EAN. Just a shorter ALU. But they still wouldn't scan for accurate lookups in Retail Manager.

    It boiled down to the actual make/model of the barcode scanner from what I recall. We had to implement Zebra CS4070 models for Retail and then things "just worked."

  • omgchrisomgchris Member Posts: 6

    Thanks, the videos didn't quite help though.

    The issue is the output of the scannable bar-code (and numerical) is outputting with an extra digit programmed in to the scannable area, and when scanned, that extra digit is included in the field which the bar-code is scanned in to, search field, or anything else, this is on ipad, PC, etc

    When I use {{OrderLine.Item.upc}} in the purchase order template, it outputs the UPC which I want.

    When I wrap that like:

    <img class="upc" src="/barcode.php?type=label&amp;number={{OrderLine.Item.upc}}&amp;upc=1&amp;noframe=1">


    <img class="upc-a" src="/barcode.php?type=label&amp;number={{OrderLine.Item.upc}}&amp;upc-a=1&amp;noframe=1">

    That is now taking {{OrderLine.Item.upc}} and outputting it incorrectly, with the extra digit.

    Something in the class or url paramters is not right, and i can't find a reference to how to format this html properly for lightspeed to output the right UPC

    I don't think this has anything to do with the scanner. I can use a third party generator and it works fine, but then i don't want to pay for commercial use for that generator when I'm certain lightspeed can do this for me.

  • gregaricangregarican Member Posts: 500 

    I see what you're getting at now. If Lightspeed won't help you and you are somewhat of a developer, you could "roll your own" barcode generator and deploy it to a public host where you could reference it in the template. Or perhaps you could find a truly free resource that's already out there.

    If you need a custom developer, there's a gentleman named Brett Gordon that owns Hyperspace ( He might be able to whip something up for you.

    Good luck!

  • omgchrisomgchris Member Posts: 6

    I was thinking about contacting Brett actually. Just hoping I don't need to bother him with something that should be easily and readily available in lightspeed resources. I mean I want to include scannable UPC barcodes in my purchase orders, seems like PO's 101 and yet I can't do it without looking outside.. Thanks for trying to help Gregarican.

  • gregaricangregarican Member Posts: 500 

    If for some unknown reason this isn't possible natively within Retail's UI, then you could create a separate app for generating PO's. Utilizing the Retail API. Then you could include something like this to generate the barcodes for each PO line item --> I suspect that Brett might lead you in a similar direction if this indeed isn't possible natively within Retail. Good luck!

Sign In or Register to comment.