airolg Posted February 22, 2004 Posted February 22, 2004 I really appreciate the print order function, which I use for packing the order, but it doesn't print out the date nor does it show on the invoice screen. I always have to leave the screen to go back to the orders to find the date ordered. I think it's an important part that's been overlooked. Can anyone help me figure out how to add it? I've learned enough to be dangerous and know it is on the file printorder.php, but everything I've tried hasn't worked. Is it even possible? Thanks
radders Posted February 22, 2004 Posted February 22, 2004 Where does that file come from? I can't find it on my system. If it is any help, batch order centre incudes the date on the invoice
TerryK Posted February 22, 2004 Posted February 22, 2004 Are you using an older version of osC? With osC2.2-MS2, the print orders are generated by /catalog/admin/invoice.php. Somewhere in my travels yesterday, I found a post with instructions, but don't recall where it was. Here are the changes I made though, which may help you. Look for: require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); include(DIR_WS_CLASSES . 'order.php'); $order = new order($oID); ?> Replace with: require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $customer_query = tep_db_query("select customers_id, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); $customer = tep_db_fetch_array($customer_query); $ship_date_query = tep_db_query("select date_added from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . (int)$oID . "' and orders_status_id = '3'"); // 3 is the status id for me that represents shipped status your id may be different $ship_date = tep_db_fetch_array($ship_date_query); $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']); $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'"); include(DIR_WS_CLASSES . 'order.php'); $order = new order($oID); ?> Then, where I wanted the code displayed on the page, I added: <?php echo tep_date_long($ship_date['date_added']); ?> That displays the date in this format: 22 February, 2004. (I changed the format in /catalog/admin/includes/languages/english.php to 'February 22, 2004'.) To do that, look for: define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() Change to: define('DATE_FORMAT_LONG', '%B %d, %Y'); // this is used for strftime() HTH, Terry Terry Kluytmans Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like: Add order total to checkout_shipment Add order total to checkout_payment Add radio buttons at checkout_shipping (for backorder options, etc.) Duplicate Table Rate Shipping Module Better Product Review Flow * If at first you don't succeed, find out if there's a prize for the loser. *
airolg Posted February 26, 2004 Author Posted February 26, 2004 Thanks so much! I'll see if I can get it to work using that bit of code. I truly appreciate your taking the time to help. Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.