- Posts: 38
- Thank you received: 0
Inventory Tracking - Barcode Generator
So far the support has been amazing so I thought I would ask one more question. Hikashop is great for ordering but I still need another system for inventory management. Because I don't use Hikashop to sell products, I've heavily modified a few things to work best with what we're using it for.
Attached is a screenshot of what my invoices look like. I need the item number and the quantity only so everything else was removed.
To enter this order into the inventory management system, I have to sit and 10 key it all in. It doesn't take long but if there were bar codes there instead, it would make entering the the orders really fast; they could just be scanned in. First the item and then the quantity; the inventory management system moves on automatically. The attached invoice only has 3 items on it but I could have some long lists to enter.
I'll start the project anyway but has anyone already tried adding bar codes to your invoices? Maybe it's an idea for future Hikashop releases?
I'll probably use this bar code generator and modify it: www.barcodephp.com/download.php
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I think most could agree that it might help reduce order entering mistakes as I assume most users need to have an inventory management system of some kind.
Please Log in or Create an account to join the conversation.
What I have is a custom invoice with the item, the quantity requested and the item code. I want to generate a bar code under the quantity and under the item code.
Here is an example of the system working to generate one single bar code:
[Removed]
I need to dynamically create these bar codes. The image place holder is showing up but the image of the bar code itself is not.
Here is what I changed on invoice.php
Does anyone have any ideas?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
mydtvhs.com/barcode.txt
There is the text version.
I didn't write it (find solutions before you build them) but I can explain some of the options.
Originally the variables for the bar code were gathered via a $_POST but I knew what I wanted all of them to be so I got rid of everything except what needed to be 'bar codeized' (the product code or quantity).
You can set the scale, the colors, etc but I manually set most of those. Because the image is built using the external file, I thought it was an issue with passing the contents of the variable on to barcode.php. I've tried a DB, session variable, $_POST and $_GET but I still don't know what's wrong.
I'm very new to PHP still so I usually struggle my way through things and manage to figure it out.
As you can see from my original post, I've been working on this for a month.
Anyhow, thanks again for taking a look.
Please Log in or Create an account to join the conversation.
It's only in the error function but you would have to put it for successful images as well, otherwise the browser will not display the image.
The coding to pass the variable is great but if you have several images on a page it won't work as it will only display the last image's code several time. You should use the $_REQUEST variable instead of $_SESSION and instead of setting it directly in the view, you should add the parameter in the URL of the image:
echo "<img src='barcode.php?Genrate=Submit&file=&type=png&bdata=".$product->order_product_quantity."'>";
and then:
$barnumber = $_REQUEST;
Please Log in or Create an account to join the conversation.
I made the changes and the index.php test page I'm using to make sure the code still works will still generate a bar code but the invoice is failing.
Any idea where @header("Content-type: image/png"); should be placed for successful images? I tried in the invoice.php file just above the echo but that didn't change anything. I also tried it above $im=@imagecreatetruecolor($total_x, $total_y); at about line 266 but that didn't work. I tried it above $return = $bar->genBarCode($barnumber,png,''); at line 338 and nothing changed.
Ultimately this isn't an issue with Hikashop so I understand if you don't have another suggestion. I'm grateful for what I got. :0)
--Joel
Please Log in or Create an account to join the conversation.
You should make sure that your library is generating the barcode correctly by using directly the link in your browser:
barcode.php?Genrate=Submit&file=&type=png&bdata=test
That should display directly the image in your browser. That will allow you to more easily put traces in the code and understand where it's failing.
Please Log in or Create an account to join the conversation.
[Removed]
If I print this page and scan it to a text file, the scanner reads it ok.
I'll continue to look at it some more.
Thanks again! :0)
Please Log in or Create an account to join the conversation.
echo '<img src=" mydtvhs.com/administrator/components/com...ng&bdata='.$product- >order_product_quantity.'">';
Please Log in or Create an account to join the conversation.
Thank you, thank you, thank you! I have to change the height and a few minor things but I'm sure I can manage that. I also need to make sure it's generating the bar code correctly so the scanner can read it but it's nearly there.
--Joel
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Thanks for the link but unfortunately it couldn't help because it's a c# library, not a PHP one.
But, since the creation of this thread 2 years ago, we have made some improvements and some new tools.
HikaSerial embedded a barcode generator and a QRcode generator. His library could be use for the generation of such images with a little development.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
HI thereJerome wrote: Hi,
Thanks for the link but unfortunately it couldn't help because it's a c# library, not a PHP one.
But, since the creation of this thread 2 years ago, we have made some improvements and some new tools.
HikaSerial embedded a barcode generator and a QRcode generator. His library could be use for the generation of such images with a little development.
Regards,
Although i am not the common user of barcode,i've tried a free trial from a barcode generator.It turns out to be convenient to own a powerful barcode generator.Is it possible for HikaSerial to read a QRcode offline?
Thanks a lot.
Please Log in or Create an account to join the conversation.
HikaSerial is a web software, it is not a computer software.
Like I said the last time : It is not a C/C++/C#/Java/Objective-C/... program.
HikaSerial can generate QRCode (already)
HikaSerial can't read QRCode (and it will never have such feature)
So you can stop posting C# code and posting your commercial links to some C# libraries here (each of your message contain links so...).
I prefer not to, but if you continue I will have to ban you permanently and ban automatically every user who post a link to your website.
Hope it is clear enough.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.