You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
We are working on trying to show the "barcode" data from "ecom_orderitems" for selected orders in the "Ship Items" screen for each item to be shipped.
Can we modify what shows in the Ship Items screen from ...
apps / ecom / ECOM_OrderMan / ECOM_OrderMan.php ?
If so what lines of code would we need to modify after copying it over to Custom?
Thank you
Offline
The file you'd want to modify is {private}/apps/ecom/ECOM/includes/ordermanship.php. The ordered items are in the $itemsactive array, and the barcodes art in the $order['inventory'] array. You can access the barcode for an item using $order['inventory'][INVENTORY-ID], where 'INVENTORY-ID' is the 'xinvid' for the ordered item.
Why do you want barcodes there? Are you going to scan them off your screen into something?
Offline
We don’t want the barcodes font (ie; Code 39, Code 128, etc) to generate but rather the data from the item inventory record only. The reason we want this is for a couple reasons. First being that we have some bottled product that is assigned a manufacturer sku yet the only thing on the bottle is the UPC or barcode.
Second, by doing this we can start to play around with the idea of scan verification by opening a browser find field (ctrl f) and scan the barcode into that field to find a positive match highlighted on the ship screen to add another layer to help reduce picking errors.
Ultimately what we want to do at some point is build in scan verification as we discussed a few times in the past. This is kind of a workaround to give us a bit of inspiration as to how we can go about doing this.
I have a few other thoughts that we can discuss after seeing how the barcode data works out. 😊
Offline
This is where I inserted the code...
print '<td data-th="Item">'; print '<div class="kstrong">' . $this->xhtml_encode($itemname) . '</div>'; print '<td data-th="Barcode/UPC">' . $this->xhtml_encode($item['barcode']) . '</td>' . $eol; if (!(empty($item['itemopts']))) {
It seems to be working. Does the code look clean?
I also added a column header.
------
In further modding this form can I change the "notes" field to have multiple lines from an input type="text" to "textarea" so that when a customer prints out an invoice that long data strings don't overextend the page margins making the printable form look funny?
Could I change this...
print '<td data-th="Notes"><input type="text" class="itemnotes" id="itemnotes--' . $this->xhtml_encode($item['id']) . '" name="itemnotes[' . $this->xhtml_encode($item['id']) . ']" '; print 'value="' . $this->xhtml_encode($item['itemnote']) . '" title="Notes" /></td>' . $eol;
to this???
print '<td data-th="Notes"><textarea class="itemnotes" id="itemnotes--' . $this->xhtml_encode($item['id']) . '" name="itemnotes[' . $this->xhtml_encode($item['id']) . ']" rows="4" cols="30" title="Notes">' . $this->xhtml_encode($item['itemnote']) . '</textarea></td>' . $eol;
I also added an additional text box for recording serial or lot numbers where they are needed to be attached to the shipping record for warranty purposes. Hopefully everything is clean. I'm working on better formatting and indentation.
Thank you for your help
Offline
That looks really good. Great job. The only thing I'd question is whether or not you really need a textarea for notes. I haven't run into any issues with that seeing long strings causing issues, etc. But if you have, that works.
Offline
Thank you for your reply Nick.
For the extra field I added for recording Lot or Serial numbers how do I attach the information added into that field to record somewhere in the order record and possibly on the invoice if printed?
Thanks Again
Offline
You can add new columns using Raw DB Admin - just choose to Maintain the table and add your columns there. Add the same columns to both the ecom_orders and ecom_ordersarchive tables. Once you've done that, under the Order Manager for orders, you can use the Edit Order and Billing Info function to update the values for those fields. You can modify the ordersummary*.php includes to include the fields in your mails/invoices/summaries.
Offline
How do I attach the Lot Number field I created in the ship screen to these new columns to add the information. We will be adding the lot numbers and serial numbers from the ship screen but want it to store just like anything in the item notes field or tracking numbers would so we can look it up if needed?
Thanks
Offline
Thank you for getting back to me. Is there a way that I can connect the new field I've created in the ship screen so that the information I enter there will record in the Edit Order and Billing Info area from the ship screen in the same way that tracking numbers or item notes would? Going directly to Edit Order and Billing Info for every order that has many items with lot numbers would essentially require us to handle the items twice and take longer. I'll send you a screenshot so you can see what we have set up.
Offline
You sent me an email yesterday with a screenshot of what you're trying to do (which is on the orderitems level, not the order level). I provided instructions.
Offline
Thank you for getting back to me Nick. I'm reviewing it and work on it. Thanks Again
Offline