OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Add Order Number and Customer ID to Invoice
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Tips and Tricks
DiscretionDesigns
I have a client that uses PeachTree and they need to have the Customer ID and Order Number on each invoice, here's what I did to achieve that. Very simple.

In admin/invoice.php around line 39 find:

CODE
<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', '204', '50'); ?></td>


Before </td> add:

CODE
<br>Order ID: <?php echo $oID;?>  <br /> <?php echo "Customer ID: " . $order->customer['id']; ?>


In admin/includes/classes/order.php around line 27 find:

CODE
$order_query = tep_db_query("select customers_name, customers_company,...


Add 'customers_id, ' after select so it reads:

CODE
$order_query = tep_db_query("select customers_id, customers_name, customers_company,...


In the same file find line 48 or so and find:

CODE
$this->customer = array('name' => $order['customers_name'],


Paste this in that line's place:

CODE
$this->customer = array('id' => $order['customers_id'],
                  'name' => $order['customers_name'],


Upload both files and done.
web-project
I done different way, without any sql mess in /classes/order.php file
RC Heli Pilot
QUOTE (web-project @ Nov 27 2007, 05:39 PM) *
I done different way, without any sql mess in /classes/order.php file


What was it that you did?

RCHP
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.