v2.1.0 is now available in the Plugins: http://www.zen-cart.com/downloads.php?do=file&id=1083
v2.1.0 is now available in the Plugins: http://www.zen-cart.com/downloads.php?do=file&id=1083
I am finally found most of what I was looking for! Thank you! two questions.
1) I would like to display all statuses at once.
1) I would like to make orders display descending on the page.
Can someone please provide the code changes for this. It can be for either invoices or packing slips.
Thank you!
It'll be a small edit to /YOUR_ADMIN/includes/templates/tpl_all_invoices.php (for the invoices). Locate the lines that read:
and make the following changes:Code:<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <?php $sql = "SELECT orders_id FROM ".TABLE_ORDERS." WHERE orders_status = ".$orderStatus; $pending_orders = $db->Execute($sql); while (!$pending_orders->EOF) {
That will select ALL the orders from your store and print them in descending order-id order.Code:<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <?php $sql = "SELECT orders_id FROM ".TABLE_ORDERS." ORDER BY orders_id DESC"; $pending_orders = $db->Execute($sql); while (!$pending_orders->EOF) {
Last edited by lat9; 15 Apr 2014 at 06:52 PM. Reason: Changed ascending to descending, per OP request
How do I make the admin/all_invoices.php select both pending and processing statuses at the same time? Ideally this would just be a default setting. Delivered and updated don't even matter to me. But I do need to see pending and processing on the same report simultaneously.
Thank you.
Make a change similar in nature to the change I identified in post #21:
Code:<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <?php $sql = "SELECT orders_id FROM ".TABLE_ORDERS." WHERE orders_id IN (1,2) ORDER BY orders_id DESC"; $pending_orders = $db->Execute($sql); while (!$pending_orders->EOF) {
That didn't work due to a typo but it set me on the right path. Here is the fix in case anyone else is ever interested.
Code:<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <?php $sql = "SELECT orders_id FROM ".TABLE_ORDERS." WHERE orders_status IN (1,2) ORDER BY orders_id DESC"; $pending_orders = $db->Execute($sql); while (!$pending_orders->EOF) {
Last edited by southshorepizza; 17 Apr 2014 at 11:03 PM. Reason: I forgot to adjust the original code. It's fixed now.
Sorry 'bout that!I'm glad I was able to point you in the right direction.
This isn't really doing what I need it to do. On the admin/all_invoices.php how could I make the drop down box give me all statuses or mutliple statuses? I have the template_all_invoices.php to refresh and I can clear them off when orders are complete. However when a new order comes in with a status different than the one chosen on admin/all_invoices.php it will not show up automatically.
I tried duplicating the array but that didn't work. Another report (sales report) has a similar feature where status "doesn't matter" I haven't figured out how to make that work though.
Taking a quick look at the code, there are no core file overwrites and I check before using the v1.5.0+ functions. The code should work, it just won't integrate into your v1.3.9h admin's menu structure so you'll need to enter its address directly into your browser:
yourhost.com/YOUR_ADMIN/all_invoices.php
yourhost.com/YOUR_ADMIN/all_packingslips.php
If it doesn't work in a ZC 1.3.9h environment, just remove the files copied (the full file list is in the readme).