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.
|