Contributions
Batch Printing without Frames or PDF
Backup before doing anything.
This contribution allows you to batch print the orders on the orders.php screen. You can filter based on order status, and can then select/deselect orders for printing. Can batch update order status as well. Instead of using frames or a PDF, this contrib produces 1 invoice per page by using CSS page breaks.
This contribution is based on batch-invoice-printing-v1.1 by PandA.nl
Support: http://forums.oscommerce.com/index.php?showtopic=148791
Expand All / Collapse All
Display Order No. Column on batchprint_noPDF.php screen
What's great about this contribution is that you can just 'tick off' the orders and change their status.
I had a problem where at the end of the day I wanted I had 10 invoices in my hand for orders that had been
dispatched. I wanted it to display the order numbers...
This contribution adds a column on the batchprint_noPDF.php screen which lists your order numbers for each
order.
Instructions:
In batchprint_noPDF.php...
1. Find the column headings in these lines:
<td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
<td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_ORDER_TOTAL;
?></td>
<td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_DATE_PURCHASED;
?></td>
<td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_STATUS; ?></td>
Add this *AFTER*:
<td class="dataTableHeadingContent" align="left">Order No.</td>
Note: You should probably make it say
<td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_ORDER_NUMBER;
?></td>
and then add a DEFINE entry in your language file - but I'm lazy.
Step 2.
Find where it outputs the Order status for the order Status column:
<?php
if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) {
echo '<td id="defaultSelected" class="dataTableContent" onmouseover="rowOverEffect(this)"
onmouseout="rowOutEffect(this)" onclick="document.location.href='' .
tep_href_link(FILENAME_BATCHPRINT_NOPDF, tep_get_all_get_params(array('oID', 'action')) . 'oID=' .
$oInfo->orders_id . '&action=edit') . ''">' . "n";
} else {
echo '<td class="dataTableContent" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)"
onclick="document.location.href='' . tep_href_link(FILENAME_BATCHPRINT_NOPDF,
tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . ''">' . "n";
}
?><?php echo $orders['orders_status_name']; ?></td>
Add the output for the Order Number *AFTER*:
<?php
if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) {
echo '<td id="defaultSelected" class="dataTableContent" onmouseover="rowOverEffect(this)"
onmouseout="rowOutEffect(this)" onclick="document.location.href='' .
tep_href_link(FILENAME_BATCHPRINT_NOPDF, tep_get_all_get_params(array('oID', 'action')) . 'oID=' .
$oInfo->orders_id . '&action=edit') . ''">' . "n";
} else {
echo '<td class="dataTableContent" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)"
onclick="document.location.href='' . tep_href_link(FILENAME_BATCHPRINT_NOPDF,
tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . ''">' . "n";
}
?><?php echo $orders['orders_id']; ?></td>
And that's all!
The download contains the above text :)
See previous entry. Forgot one line change.
(Not Full Package)
Just created an Option to select whether you want to notify the customer of a status change or not.
NOT A FULL PACKAGE. UPDATE TXT FILE ONLY.
I found 2 errors with the code. I'm not a programming geek and it did take me nearly all day
Firstly: I found the layout did not display in Dreamweaver. This turned out to be a few <td> commands in the wrong place.
Secondly: the layout did not appear properly laid out in admin. It also gave an "error on page" at the bottom of the explorer page.
After a very long time of searching, I found a missing quotes on line 407.
Find line 407
<td class="dataTableContent" align="right"><?php echo tep_draw_checkbox_field('batch_order_numbers[' . $orders['orders_id'] . ']', 'no', '' , 'yes', 'onclick="CheckCheckAll(document.trackunread)'); ?></td>
Change to:
<td class="dataTableContent" align="right"><?php echo tep_draw_checkbox_field('batch_order_numbers[' . $orders['orders_id'] . ']', 'no', '' , 'yes', 'onclick="CheckCheckAll(document.trackunread)"'); ?></td>
There is however another issue with the general.js file. If you select or deselect all orders to print, it works fine. If you select one or more specific orders there is an error showing on line 48 of the general.js file. Perhahs a real geek can have a go to sort this. I have inluded the batchprint_noPDF file to replace existing.
Tired of printing one order at a time! Here's the solution.
Update the status of multiple orders at once and email the updated status to your customer
AND
At the same time you can print all the orders you selected to be updated.
Order status update now emailed!
Previous version basically updated the status of the order but wouldn't send out an email.
I added this to the contribution.
Don't need to change your original order.php file
Customer comments included on invoice if they exist.
Nicer invoices
Tested and works great for me, if you have trouble or encounter a problem please post at:
http://forums.oscommerce.com/index.php?showtopic=148791
1.This contribution fixes mouseover and onclick issues where individual rows could not be selected for edit, delete, invoice and packing slip functions.
2.There is also a fix for order status not being updated where
$autoupdatestatus = $HTTP_POST_VARS['autoupdatestatus'];
$autostatus = $HTTP_POST_VARS['autostatus'];
are now defined in catalog/admin/print_batch_process.php
3.If no order is selected the window now has text link to close window along with Error: no orders selected!
4.orders.php is automatically refreshed when confirm button is pressed
(via onload="top.opener.document.location.reload();" in print_batch_process.php)
Updated by 'bigjat69' of web-junkies 2008-02-25
This update will include date of order and customer comments on the invoice. I also made it more multilingual by changing hardcoded titles. Updated inctall instructions with regards to missing checkboxes on orders.php. For upgrade, just change print_batch_invoice.php and your language/print_batch_invoice.php.
Full package. Screen shot included.
This update moves the tick boxes so that they are on each order line, instead of creating a new underneath orders on the orders.php page.
It also enables you to export ticked orders address's to a csv so that you can mail merge the csv in a word document to create your labels.
Backup everything before you try this out!
Backup before doing anything.
This contribution allows you to batch print the orders on the orders.php screen. You can filter based on order status, and can then select/deselect orders for printing. Can batch update order status as well. Instead of using frames or a PDF, this contrib produces 1 invoice per page by using CSS page breaks.
This contribution is based on batch-invoice-printing-v1.1 by PandA.nl
Support: http://forums.oscommerce.com/index.php?showtopic=148791
Note: Contributions are used at own risk.