Ok guys,
I figured I would post everything again to have it in one post. This should be everything EXCEPT the ability to edit the P.O. Number by either side. Can't have it all. These changes will place the P.O. Number field into the checkout process and will show the P.O. Number on "My Account" order list, "My Account" single order view, admin orders list, admin invoice, admin packing slip, and admin edit pages.
Zen-Cart CORE files that needs to be edited. This will make upgrading a lot harder in the future.
/admin/includes/classes/order.php
/admin/orders.php
/admin/invoice.php
/admin/packingslip.php
/includes/classes/order.php
/includes/modules/pages/account_history_info/header_php.php
/includes/modules/pages/checkout_confirmation/header_php.php
customize the following pages for you individual templates, copy them out of the default template.
tpl_account_default.php
tpl__account_history_info_default.php
let's start editing.
Admin changes
/admin/includes/classes/order.php
line 37 added ", po_number" to the query
line 78 added ", 'po_number=>$order->fields['po_number']"
/admin/orders.php
line 402 added " P.O. Number: <strong><?php echo $order->info['po_number']; ?></strong>" before the "</td>"
line 674 added "<td class="dataTableHeadingContent" align="center">P.O. Number</td>" a whole new table cell.
line 718 added ", o.po_number" to the query
line 730 added ", o.po_number" to the query
line 742 added ", o.po_number" to the query
line 798 added "<td class="dataTableContent" align="left"><?php echo $orders->fields['po_number'];?> </td>" a whole new table cell.
/admin/invoice.php
line 143 added " P.O.Number: <strong><?php echo $order->info['po_number']; ?></strong>" before the "</td>"
/admin/packingslip.php[/B]
line 137 added " P.O.Number: <strong><?php echo $order->info['po_number']; ?></strong>" before the "</td>"
Customer side changes
/includes/classes/order.php
line 54, added ",po_number"
line 123 added ",'po_number' => $order->fields['po_number']"
line 353 added ",'po_number' => (isset($_SESSION['po_number]) ? $_SESSION['po_number'] : '')"
line 615 added ",'po_number' => $_SESSION['po_number']"
/includes/modules/pages/account_history_info/header.php
line 37 added ",o.po_order"
line 66 added ",'po_number'=>$orders->fields['po_number']"
/includes/modules/pages/checkout_confirmation/header_php.php
line 47, added "if(isset($_POST['po_number'])) $_SESSION['po_number'] = zen_db_prepare_input($_POST['po_number']);"
template changes
tpl_account_history_info_default.php
line 95-97 add a whole new table cell between status date and order status "<th scope="col" id="myAccountStatusPONumber">P.O. Number</th>"
line 104-105 add another table cell between date_added and status name "<td><?php echo $order->info['po_number'];?></td>"
tpl_account_default.php
line 30-32 add a whol new table cell between order_number and shipped to "<th scope="col">P.O. Number</th>"
line 43-45 add another line betwwn orders_id and order address "<td width=""><?php echo $orders['po_number']; ?></td>"
hope this takes care of it.
Have fun
Granville [granville (at) kirkhamsystems.com]
Kirkham Systems, Inc.