This topic is locked

Scan with mobile

9/19/2024 8:30:34 AM
PHPRunner General questions
Z
Zeljko author

Hi everyone,
If anyone can help me in following:
I would like to scan a standard product EAN13 barcode from mobile and store it to field in my web application. I open my web app, enter New product, but I don't know how to easily scan barcode of the product that I want to add to my items table.
Any advise is appriciated.

fhumanes 9/19/2024

Hello,
I have this example to scan bar codes with the mobile camera that I think is adjusted to what you need.
https://fhumanes.com/blog/guias-desarrollo/guia-32-lector-de-codigo-de-barras-2d/
Greetings,
fernando

HJB 9/19/2024
Z
Zeljko author 9/21/2024

fhumanes - thanks you, I will explore your project example and get back here with results.

HJB - I have put the code in Javascript OnLoad event of Add/Edit pages:

$(document).keyup(function(e) {

if (e.keyCode == 13)

{

$("#saveButton1").trigger('click');

}

});

Now, how do I change my text field "barcode" to accept / run camera scanning on my mobile?

Z
Zeljko author 9/21/2024

fhumanes:
I have successfully implemented your example into my project. Thank you for that - it is exactly what I needed.
Please just a small explanation more from you:

  • how can I change selected scan option from "code 128" to "EAN"?

I tried to change this part of code: "<option value="ean" selected="selected">EAN</option>"
but scanner does not recognize simple EAN code and I have to still change the option manually to something else then select EAN again - then it works...
What am I doing wrong?
EDITED:
I solved it! disregard the question from above.
At this moment I am struggling with the size of camera screen...

HJB 9/22/2024

img alt

My personal advice, bless yourself by pre-drawing your XMAS gift to get the above mini scanner
into your hands, to connect same via Bluetooth to your mobile or PC to own a maximal freedom.

Not only the fact that most smartphones own TWO cameras (one at the front, one at the rear) which
can slow down productivity, but all other methods in mind own 3 different processes to get solved,
plus not to forget the essential "carriage return" to get the barcode into the text field of your appplication.

I won't say, it cannot be done through other methods, yet if you want to have a scenario like this:

Automatic detection of most barcodes and immediate and smooth take-over into your app, say. your
cursor points to that very entry field where the barcode should be shown by text and bingo, one scan
action only and you'r done (time is money).

Z
Zeljko author 9/24/2024

Hello all again.
I have made it working, not looking exactly as I want, but I'll deal with GUI later.
New idea appeared - when I get barcode in my field, is it possible to search it in google and get results in snippet code (like this camera window) and then I can easily copy product name and image???
Wild, isn't it hahahah. Thanks in advance for any advice.

HJB 9/24/2024

Integrate the Barcode Lookup API with your own application and get real-time access to product information.
Citing excerpt ex: https://www.barcodelookup.com/

Extreme wild..., hahaha to Google thoughts..., install fields into the PHPRunner app and use Rest API for
fishing of what you are looking for ...

fhumanes 9/26/2024

Hello,

Normally there are services, usually free or payment, that allow access to product/object data, provided that an international coding is used.

In this case, there is a service given by the EAN code, it facilitates product description and supplier.

https://www.ean-search.org/?q=662834501711

Greetings,
fernando