Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

show order_id in admin->customers->orders


kenkja

Recommended Posts

Posted

In v2.3.3

 

Most of my customers quote an order number so I'm trying to get the admin to show the order id in the list of orders you see after clicking Customers -> Orders

 

so in admin->Includes->languages->english->orders.php

 

added this line after line 18

 

define('TABLE_HEADING_ORDER_ID', 'Order Id');

 

in admin->orders.php around line 324 found this code block

 

 <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	 <tr>
	 <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
		 <tr class="dataTableHeadingRow">
		 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
		 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
		 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>
		 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
		 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
		 </tr>

 

and changed to

 

 <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	 <tr>
	 <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
		 <tr class="dataTableHeadingRow">
		 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CUSTOMERS; ?></td>
		 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_ORDER_ID; ?></td>
		 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td>
		 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td>
		 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
		 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
		 </tr>

 

then again in admin->orders.php around line 358 found this code block

 

?>
		 <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $orders['customers_name']; ?></td>
		 <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td>
		 <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td>
		 <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td>
		 <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
		 </tr>
<?php

 

and changed to

 

?>
		 <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $orders['customers_name']; ?></td>
		 <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_id']); ?></td>
		 <td class="dataTableContent" align="right"><?php echo strip_tags($orders['order_total']); ?></td>
		 <td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td>
		 <td class="dataTableContent" align="right"><?php echo $orders['orders_status_name']; ?></td>
		 <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
		 </tr>
<?php

 

this gives me all correctly aligned table headings but does not fill the table with the order_id can anyone point me in the right direction to add this info the datatablecontent array.

 

thanks

 

ken

Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Posted

as you all know I'm a php numptyis it something to do with

 

$orders_query_raw

Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Posted

You have a typo: $orders['order_id'] needs to be $orders['orders_id'].

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

@@kymation

 

thanks jim

 

ken

Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Posted

@@Jack_mcs

 

Thanks have checked out the add on, it is a far more flexible solution to the problem, thanks.

 

As my old dad is always telling me "there's now't new under the sun, son", as usual he was right - you've just gotta know where to find this "now't new" stuff

 

regards

 

ken

Os-commerce v2.3.3

Security Pro v11

Site Monitor

IP Trap

htaccess Protection

Bad Behaviour Block

Year Make Model

Document Manager

X Sell

Star Product

Modular Front Page

Modular Header Tags

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...