Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How Do I Print The Date And Time On Invoices?


beachkitty85

Recommended Posts

This should be a very simple task, but it isn't (at least for me)! I want to show the date and time on all invoices. Here is the code from checkout_process.php for the invoice email:

$email_order .= EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG, strtotime($date_time)) . "\n";

This displays the date as Wednesday 13 June, 2007. It seems that I should be able to change the code to

$email_order .= EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_TIME_FORMAT, strtotime($date_time)) . "\n";

and use OSC's built in date + time format, but when I do this the date shows up as 06/13/2007 00:00:00. Thanks in advance!

Link to comment
Share on other sites

I used this code:

$email_order .= EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_TIME_FORMAT_LONG) . "\n\n";

and then defined DATE_TIME_FORMAT_LONG in english.php like this:

define('DATE_TIME_FORMAT_LONG', '%A %d %B, %Y %H:%M:%S');

Now it works like a charm! Thanks for your help.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...