Jump to content
Sign in to follow this  
Peper

QRCode in admin invoices

Recommended Posts

There is a app that adds qrcode to invoice and packingslip https://apps.oscommerce.com

Anyone knows what data this qrcode is suppose to show on scan?

For me only gives:

BEGIN:VCARD
FN:
END:VCARD

Was hoping it gives the order url at least

Anyone using this?


Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites
Quote

BEGIN:VCARD
FN: QR-not works
END:VCARD
$datos  = 'BEGIN:VCARD' . "\n";               // Información Tratata como Tarjeta - para soportar saltos de línea
  foreach ($array as &$dato) {
      $datos .= 'FN:' . $dato . "\n";
  }

Means it not take anything from your DB.
as that lib comes from http://phpqrcode.sourceforge.net/

There is already enough to say about comparability.
perhaps a NEW lib:
https://github.com/endroid/qr-code

Share this post


Link to post
Share on other sites

example: https://github.com/endroid/qr-code/blob/master/tests/QrCodeTest.php
take a look at the url:
 

$messages = [
            'Tiny',
            'This one has spaces',
            'd2llMS9uU01BVmlvalM2YU9BUFBPTTdQMmJabHpqdndt',
            'http://this.is.an/url?with=query&string=attached',
            '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111',
            '{"i":"serialized.data","v":1,"t":1,"d":"4AEPc9XuIQ0OjsZoSRWp9DRWlN6UyDvuMlyOYy8XjOw="}',
            'Spëci&al ch@ract3rs',
            '有限公司',
        ];

especially:
 

'http://this.is.an/url?with=query&string=attached',

 

Share this post


Link to post
Share on other sites

Hello @fridgebox

Thanks for replying.

"You cannot say it not work, just like that." - indeed not working for me.
I switched to another app though and is working generating urls as expected.

However what i want to accomplish is not so easy after careful examination of the entire operation.

What i need to do is print packaging slip, on there is added qr code
At packaging station we need to take down serial numbers(multiple) for items whether scanned or manually typed in
This is currently been done by writing them down on the packaging slip manually

To speed up the process i was thinking to add a 2d scanner to scan the bar codes for the items.

However when human intervention comes into play with digital errors can be made ie like selecting and scanning serials into wrong order, accidentally delete an order and so
The packaging staff does not need to have full access to an order - just edit comments, add serials and save.

This is now where the hard part comes in.
without further human intervention apart from holding scanner in hand and scanning qr code codes:
scan qrcode on packing slip to open order for adding comments(action=edit)
once open scan serials
when done scan second code on packing slip to save comments(&action=update_order)
rinse and repeat

This sequence stomped me - scanning qrcode browser opens order address, focus curser to comments, save part, then back to address bar 

I'm not sure if there are any users here that uses a much simpler approach - if so pls advice.


Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites

@Peper First of all i put you to the winning team.

The process you describe are my favorites. "Custom works".
It looks like you running a warehouse. (i once worked in such, and i have a good perspective in order handling).

It took me a a few days to understand your question.
I could not put it in a "normal" store set-up.
And after i figured out , you had a reason to ask this question.

yet i still not really figure where your problem is now.
The QR seems to be solved.


But i not get your additional problems.

Share this post


Link to post
Share on other sites

I think i understand, you want a sequence when scan, then EDIT (if required), SAVE the EDIT to the order?
I not understand "writing serials", why someone write a serial?
On WHAT this serial is based?
Why the system cannot generate that serial? (MPN, Manufacturer Product Number, (just for internal uses, later you can let it register as an official MPN, but not need for internal purposes)).

Just quickly from what i understand is you want or already using osC for a kind of warehouse system.
Am i correct?

Share this post


Link to post
Share on other sites

@fridgebox

Most serials can be scanned, but some is just like 5 digits code

This problem is the update button: <?php echo tep_draw_button(IMAGE_UPDATE, 'disk', null, 'primary'); ?>

In order.php - im stuck with the update button to convert to qrcode

 


Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites

adding comments is this link http://127.0.0.1/edge/admin/order.php.php?page=1&oID=12346&action=edit

or <?php echo tep_href_link(orders.php?page=1&'. 'oID=' . $_GET['oID'] . 'action=edit'); ?>

what is the to save link: ???

@fridgebox

Edited by Peper

Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites

Look.........
when goto action=edit
Assume you use a tablet or computer to "EDIT" the order.
You cannot "SAVE" an edit with your QR scanner.
It must be on a machine (unless it exist handscanner allow you to type).
But as long as you do a $_POST and hit "ENTER" regardless if on a machine or a handscanner what have QWUERTY keyboard......... this should not be a problem.

 

Share this post


Link to post
Share on other sites

@Peper you know how to........... you just confused.
In your case everything is a <form ..........>
So a switch:
 

if (tep_not_null($action)) {
    switch ($action) {
      case 'qr_device_insert':

Should solve your problem, ofcourse you have to generate the qr code.
But from START untill the END.
You can put any QR-Code in any order at ALL stages.
For THAT you can use the oscommerce  orders_status.php
(that is how i would do it)

Edited by fridgebox

Share this post


Link to post
Share on other sites

You need a link:
http://127.0.0.1/edge/admin/order.php.php?page=1&oID=12346&action=qr_device_insert

you should first tell me how you make an edit, what is your idea.
let try to go step by step in your process.
- guy order (he get a QR)
- order goes in processing ( QR changed in processing( means different URL from the QR))
- at some LEVEL the guy who work with the order makes a comment. ( THE QR changes to this specific ORDER_STATUS level )
.... i assume the guy who comment at that level use a computer or tablet to edit the comment ( you can even have multiple comment stages if you want..... but that is not the case now).
- then the order goes in LEVEL 2 ( the gut scan the NEW generated code (as guy on level 1 made a comment)
- guy 2 scan and see something wrong with the package ( he choose on his machine/tablet an option and makes a comment (this is where the multiple comments idea come from)...and he MARK the order/product as a NEW order STATUS)......
 

Is this kind of the sequences you looking for....
I might not be spot on.,.... but i just to try to think with you!.

Share this post


Link to post
Share on other sites

So on the packingslip there is a different qr code that will take me to edit order and add serials - works

then finished scan the screen which is easier, there will be the save button also.(makes life simpler)

This qrcode on screen needs to be scanned to save order once serials were entered

1.JPG


Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites

I try to explain you...........
it does NOT matter on what page.
You need to code these sections into
-orders.php?oId=222&order_status=qr-code-1
orders.php?oId=222&order_status=new-qr-code

 

I do not understand your "Serials question".
I think if i am correct you use a secondary "monitoring system " yet you could just use oscommerce's order_status.php.

And setup the serials on that.
It is not hard.
I just assume you already made a system and you cannot adopt it.
 

so go back to the drawing table.

Share this post


Link to post
Share on other sites

My idea is your "status history" will have a LIST
- stage 1 (qr-code-X)
- stage 2 (qr-cody-y)
- stage 3 (qr-code-z)
etc etc.
So you see multiple QR codes with different Url's related to the order status.
Like that you can monitor the stages the order went true. ( as an admin)
The guy who process the order........ he just see
-the ITEM
-previous comments
- an empty comment box and a dropdown to put the item into a "order status" OR "Item order STATUS" 

The guy on the END read all comments and steps.............
And finalize the order for shipping.

That is exactly how you want it!

Share this post


Link to post
Share on other sites

ONLY you  ( the admin/end guy) see:
-Notify costumer
-Append Comment

The guy on level 1,2,3,4,5 ETC
only put comment FOR YOU. (internal comment)
As you is the one who FINALIZE the order.

If something WRONG.............. that is NEXT step.
But you decide if the order pass or not.
or some items ship or not.
or some items have to be payed for or not.

is that not the whole point?

Share this post


Link to post
Share on other sites

No, not that way

Just product serials to be added before packaging

I added below so that url ends with orders.php?page=1&oID=12339&action=qr_device_insert

the updating and insert into database not happening - page refresh though to bring me back to orders.php?page=1&oID=12339&action=edit_order (showing all previous orders list)

  case 'qr_device_insert':
          $oID = tep_db_prepare_input($_GET['oID']);
	          $comments = tep_db_prepare_input($_POST['comments']);
			  
        $order_updated = false;
        $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
        $check_status = tep_db_fetch_array($check_status_query);
          tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, date_added, comments) values ('" . (int)$oID . "', now(), '" . tep_db_input($comments)  . "')");

          $order_updated = true;
  

        if ($order_updated == true) {
         $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
        } else {
          $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
         }
	        tep_redirect(tep_href_link('c.php', tep_get_all_get_params(array('action')) . 'action=edit_order'));
	
      break;

 


Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites

what exactly is serials?
I think i miss your point, we not understand each-other.
i do not need:
 

        $check_status_query = tep_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");

i only require the order id.
 

I not understand your EDIT and SCAN.
if want to EDIT............... at some point you have to press ENTER.
AFTER if scan AGAIN..... the previous comments must be listed.
I have no clue anymore what you try to achieve.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×