Mark-UK Posted November 19, 2004 Posted November 19, 2004 I noticed when i get orders they are not numbered in my admin, I mean when i go to the print off invoice or packing slip sectionfor each order theres no order number there, can I set it so my oscommerce site gives every new order an order number. I dont mean each indivisual item in an order, ie if an order has 4 items in it i dont want an order number for each item just the collective order. Thanks Mark
ozcsys Posted November 19, 2004 Posted November 19, 2004 I noticed when i get orders they are not numbered in my admin, I mean when i go to the print off invoice or packing slip sectionfor each order theres no order number there, can I set it so my oscommerce site gives every new order an order number. I dont mean each indivisual item in an order, ie if an order has 4 items in it i dont want an order number for each item just the collective order. Thanks Mark <{POST_SNAPBACK}> There actually are order numbers assigned they are just not added to your invoice. You can use the following to add the order number and date to your invoice and packing slip. I do not remember where I got the code but I think it was in a contribution. Add the date and order number to the invoice and packing slip 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"><b><?php echo ENTRY_ORDER_NUMBER; ?></b></td> <td class="main"><?php echo $oID; ?></td> </tr> <tr> <td class="main"><b><?php echo ENTRY_ORDER_DATE; ?></b></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:'); The Knowledge Base is a wonderful thing. Do you have a problem? Have you checked out Common Problems? There are many very useful osC Contributions Are you having trouble with a installed contribution? Have you checked out the support thread found Here BACKUP BACKUP BACKUP!!! You did backup, right??
Mark-UK Posted November 19, 2004 Author Posted November 19, 2004 Excellent thanks, just 1 thing though. After the first bit of stuff i add and then you say to add these lines if i want USA format. Well AFTER that you say: and at line 88 <tr> <td class="main"><b><?php echo ENTRY_ORDER_NUMBER; ?></b></td> <td class="main"><?php echo $oID; ?></td> </tr> <tr> <td class="main"><b><?php echo ENTRY_ORDER_DATE; ?></b></td> <td class="main"><?php echo $date_purchased; ?></td> </tr> Do i enter this text on the same page a sthe first lot of code please. Could you explain for a thicky lol where to add the code again please so im sure i understand you, i appreciate it greatly thankyou. Mark
Recommended Posts
Archived
This topic is now archived and is closed to further replies.