RE: Displaying Customer-No. in the Invoice/Packing Slip pages

Ajeh <[email protected]>
Newsgroups gmane.comp.web.oscommerce.devel
Message-ID <65ab0c3bd13378b3a4e2d2819f4f5925@osCommerce-Forums>
This message was sent from: Development
http://forums.oscommerce.com/viewtopic.php?p=164926#164926
----------------------------------------------------------------

You need to do a lookup for additional info.
[code]// BOF: WebMakers.com Added: Additional info for Orders
// Look up things in orders
$the_extra_query= tep_db_query("select * from " . TABLE_ORDERS . " where orders_id = '" . tep_db_input($oID) . "'");
$the_extra= tep_db_fetch_array($the_extra_query);
$the_customers_id= $the_extra['customers_id'];
// Look up things in customers
$the_extra_query= tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_id = '" . $the_customers_id . "'");
$the_extra= tep_db_fetch_array($the_extra_query);
$the_customers_fax= $the_extra['customers_fax'];
// EOF: WebMakers.com Added: Additional info for Orders
[/code]

Then add the parts you like from here above the payment rows:
[code]<?php
// BOF: WebMakers.com Added: show additional order info
?>
<!-- add Order # // -->
<tr>
  <td class="main"><b>Order # </b></td>
  <td class="main"><?php echo tep_db_input($oID); ?></td>
</tr>
<!-- Customers ID# // -->
<tr>
  <td class="main"><b>Customers # </b></td>
  <td class="main"><?php echo $the_customers_id; ?></td>
</tr>
<!-- add date/time // -->
<tr>
  <td class="main"><b>Date & Time</b></td>
  <td class="main"><?php echo tep_datetime_short($order->info['date_purchased']); ?></td>
</tr>
<tr>
  <td class="main"><b>Shipping Method:</b></td>
  <td class="main"><?php echo tep_get_orders_shipping_method($oID); ?></td>
</tr>
<?php
// EOF: WebMakers.com Added: show additional order info
?>
      <tr>
        <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
        <td class="main"><?php echo $order->info['payment_method']; ?></td>
      </tr>
[/code]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.