Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add Order Number and Customer ID to Invoice


DiscretionDesigns

Recommended Posts

Posted

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:

 

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

 

Before </td> add:

 

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

 

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

 

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

 

Add 'customers_id, ' after select so it reads:

 

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

 

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

 

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

 

Paste this in that line's place:

 

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

 

Upload both files and done.

Danielle Favreau

Designer and Developer

Posted

I done different way, without any sql mess in /classes/order.php file

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

  • 4 months later...

Archived

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

×
×
  • Create New...