Bluestcat Posted September 7, 2006 Share Posted September 7, 2006 Could some kind soul please tell me how to add the order date to the invoice and packing slips? We are happy with them as we have modified them, but would really like to have the order date on them. Is this possible or do I have to start all over and download a contrib? Thanks, Kimber Link to comment Share on other sites More sharing options...
jasonabc Posted September 8, 2006 Share Posted September 8, 2006 Open /admin/invoice.php. After include(DIR_WS_CLASSES . 'order.php'); - insert this code: //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'], 5, 2) . '/' . substr($date['date_purchased'], 8, 2) . '/' . substr($date['date_purchased'], 0, 4); Then add this new row in between your shipping and payment rows: <tr> <td colspan="2"> <table border="0"> <tr> <td class="main"><b><?php echo 'Order Date: '; ?></b></td> <td class="main"><?php echo $date_purchased; ?></td> </tr> </table> </td> </tr> Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix Link to comment Share on other sites More sharing options...
Bluestcat Posted October 7, 2006 Author Share Posted October 7, 2006 Open /admin/invoice.php. After include(DIR_WS_CLASSES . 'order.php'); - insert this code: //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'], 5, 2) . '/' . substr($date['date_purchased'], 8, 2) . '/' . substr($date['date_purchased'], 0, 4); This doesn't work and gives the following error. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource Any ideas. Thanks, Kimber Link to comment Share on other sites More sharing options...
jasonabc Posted October 7, 2006 Share Posted October 7, 2006 I have seen these errors on older versions of OSC. What version are you running? Are you are sure you added that code I gave you correctly (it was copied and pasted from a fully functioning, order date including invoice page)... Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix Link to comment Share on other sites More sharing options...
Bluestcat Posted October 7, 2006 Author Share Posted October 7, 2006 I have seen these errors on older versions of OSC. What version are you running? Are you are sure you added that code I gave you correctly (it was copied and pasted from a fully functioning, order date including invoice page)... Yes, I cut and pasted your code following the insertion directions. I am using osCommerce 2.2 Milestone 2, Update 051113 Thanks for your help! Kimber Link to comment Share on other sites More sharing options...
Bluestcat Posted October 7, 2006 Author Share Posted October 7, 2006 Wait a minute ... Are you are sure you added that code I gave you correctly (it was copied and pasted from a fully functioning, order date including invoice page)... My invoice page was just the standard invoice page with osCommerce, which didn't include the order date. I modified the page the way that the client wished and wanted to add the order date to it. Was your code for a different invoice page, other than the standard osCommerce supplied one? Thanks, Kimber Link to comment Share on other sites More sharing options...
jasonabc Posted October 13, 2006 Share Posted October 13, 2006 Nope - started life as the stock invoice page from the latest OSC milestone. Check your PM. Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix Link to comment Share on other sites More sharing options...
Chris.A Posted December 20, 2006 Share Posted December 20, 2006 The only problem I see on my invoice is no date given between the / / . I t look like this: Order Date: // Please advise. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.