Zen Cart Logo
Forums / Managing Customers and Orders / How do I add a purchase order field to the admin orders page?

How do I add a purchase order field to the admin orders page?

Locked

Views: 1,359

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
30 Sep 2009, 6:41 AM
#1
kbascombe avatar

kbascombe

New Zenner

Join Date:
Jun 2009
Posts:
30
Plugin Contributions:
0

How do I add a purchase order field to the admin orders page?

I've added a 'Purchase Order Number' field to the checkout process as I need to provide a way for customer to record their own reference number for their order.

I followed the instruction from this thread and it worked great.

However, now I need to show this field on the order page in the admin area. And the instructions on that thread only describe how to add it to the customers page and I can't work out how to do the same sort of thing for the orders page. Can anyone help me out with step by step instructions?

Thanks!

1 Oct 2009, 1:48 AM
#2
kbascombe avatar

kbascombe

New Zenner

Join Date:
Jun 2009
Posts:
30
Plugin Contributions:
0

Re: How do I add a purchase order field to the admin orders page?

I understand the following bits of code would need to go in the catalog/admin/orders.php file... I just don't know where to put them, as the instructions mentioned above all refer to the admin customers page...

1
$purchase_order_number = zen_db_prepare_input($_POST['purchase_order_number']);

2
'purchase_order_number' => $purchase_order_number,

3
c.purchase_order_number,

4

<tr> <td class="main"><?php echo 'Purchase Order No:'; ?></td> <td class="main"> <?php if ($processed == true) { echo $cInfo->purchase_order_number . zen_draw_hidden_field('purchase_order_number'); } else { echo zen_draw_input_field('purchase_order_number', $cInfo->purchase_order_number, zen_set_field_length(TABLE_ORDERS, 'purchase_order_number', 15)); } ?> </td>

Can anyone help with this?