A question from a Luddite here.
I have Barcode Scanner and Barcode Scanner+
I have a simple job.
I want to scan a product to open a webpage.
The webpage looks like this:
https://www.website.com/product.php?sku=1234567890123
1234567890123 is the retail barcode on the product.
It's a very simple website, all the catalogue pages are ordered by UPC / EAN.
All of them take the form
https://www.website.com/product.php?sku=
I have tried entering ( and saving ) that address as my " custom " web search.
It won't open directly.
I am just getting the home page.
I can copy and past the barcode into the search bar on the page, but this is really tricky.
Is there anyway I can just open the unique page, determined by my scan ?
Sure it must be something simple.
Kind Regards and Many Thanks !
Matt
(https://github.com/zxing/zxing/wiki/Scanning-From-Web-Pages)
Custom search URL
Separately, users can specify a custom search URL to invoke when a barcode is scanned with the Android app Barcode Scanner. When set under Settings, a Custom Search button will appear. The search URL can contain two placeholders: %s for the barcode content, %t the type, and %f for the format. For example, http://example.org/?q=%s&format=%f&type=%t might invoke, on a scan, a URL like http://example.org/?q=10359050900&format=EAN_13&type=PRODUCT
So in your case :
https://www.website.com/product.php?sku=%s
Also check your logs what is coming in. it might be that a non UPC/EAN barcode or an invalid barcode is send to the website and it reacts to it by sending you to the front page instead of an error page.
Hi Bas,
Thank you very much for taking the time to help.
Yes, I did put the " %s "in the custom webpage.
No luck though.
The thing is that on PlayStore there have been regular apps utilising zxing scanner for this very url
There are 3 on there at the moment. I have used all of them, but have found them unreliable, hence I thought I could just use " custom scan " in zxing myself, rather than the apps which just complicate the scan by taking the data and then presenting it within an app in a different format. Just opening the webpage would do the job.
The URL is
https://uk.webuy.com/product.php?sku=
ie
https://uk.webuy.com/product.php?sku=5030930104047
there is also a graphics lite version at
https://uk.webuy.com/quickie/product.php?sku=
ie
https://uk.webuy.com/quickie/product.php?sku=5030930104047
I have tried both with %s to no avail.
Maybe there is something else I am missing ?
Kind Regards
Matt
I get the error 'invalid value' when I try to add the example url.
That was unexpected.
So maybe someone else knows what is going on.
I'll have a look later tonight.
Best regards,
Bas
--
You received this message because you are subscribed to the Google Groups "zxing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zxing+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On my desktop, or even in a phone browser, if I use the URL
https://uk.webuy.com/product.php?sku=
and then just drop / paste / type in a barcode at the end of it, it does open up the page.
Hence I thought that doing this with a scan would work the same way.
I note that although I add the barcode i.e.
https://uk.webuy.com/product.php?sku=12345
the page opens up firstly as
https://uk.webuy.com/product.php?sku=12345
then the URL corrects itself with some text after the barcode number, which I do not understand, not being a programmer. Maybe that has some relevance.