Project / Support Center
Welcome, Guest. Please login or register. May 30, 2023, 10:39: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Open Source Topics  |  OS Commerce  |  Topic: Add the date and order number to the invoice and packing slip 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: Add the date and order number to the invoice and packing slip  (Read 11560 times)
admin
Guest
« on: September 04, 2006, 11:53: AM »

add this to the invoice.php and packingslip.php files in the admin folder:



at line 21



  //get the date from the order table

  $date_resource = tep_db_query("select date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");

  //get the array from the result

  $date = mysql_fetch_array($date_resource);

  //get the date as a string from the result

  $date_purchased = substr($date['date_purchased'], 8, 2) . '/' . substr($date['date_purchased'], 5, 2) . '/' . substr($date['date_purchased'], 0, 4);



note: this will produce the date in the EUROPEAN format. To get the date in the US format,

replace the final line in the above code with:



  $date_purchased = substr($date['date_purchased'], 5, 2) . '/' . substr($date['date_purchased'], 8, 2) . '/' . substr($date['date_purchased'], 0, 4);



and at line 88



   <tr>

           <td class="main"><?php echo ENTRY_ORDER_NUMBER; ?></td>

           <td class="main"><?php echo $oID; ?></td>    

   </tr>

   <tr>

           <td class="main"><?php echo ENTRY_ORDER_DATE; ?></td>

           <td class="main"><?php echo $date_purchased; ?></td>    

   </tr>



In the invoice.php and packingslip.php files in the admin/includes/languages/[language] folder,

where [language] represents the language used.



define('ENTRY_ORDER_NUMBER', 'Order Number:');

define('ENTRY_ORDER_DATE', 'Order Date:');



if you are not using english obviously substitute the required language. Exact location

of these in the file is not really important - use whatever you are comfortable with.



This will place the order number and date in the bottom left corner of the invoice and

packing slip. They can be moved around the page as required.
Report to moderator   Logged
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Open Source Topics  |  OS Commerce  |  Topic: Add the date and order number to the invoice and packing slip « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!