flix Posted December 16, 2011 Share Posted December 16, 2011 I'd like to alter the date structure in order order confirmation mails that go to custimers, and the confirmations that shop employees receive. At the moment, they're in the format: 2011-12-16 I'd like them to look like this instead: 16-12-20011 In order order_conf.html in the mail folder and neworder.html in the mailalerts folder, it looks like it's {date} that's determining the format, but does anyone have any idea how to alter this? Link to comment Share on other sites More sharing options...
bellini13 Posted December 16, 2011 Share Posted December 16, 2011 (edited) You would have to edit the classes/PaymentModule.php file. The following code formats the date using 'Y-m-d H:i:s' '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)($order->id_lang), 1), You can use this URL for a reference on date formatting options http://php.net/manual/en/function.date.php This should be what you want '{date}' => Tools::displayDate(date('d-m-Y H:i:s'), (int)($order->id_lang), 1), Edited December 16, 2011 by bellini13 (see edit history) Link to comment Share on other sites More sharing options...
flix Posted December 21, 2011 Author Share Posted December 21, 2011 Thanks for your reply. I changed the date display line in PaymentModule.php just as you described, but it hasn't changed the date orde, so it's a bit of a puzzle. Are you sure the date order in paymentmodule.php relates to shop emails? Link to comment Share on other sites More sharing options...
bellini13 Posted December 21, 2011 Share Posted December 21, 2011 it only relates to the order confirmation email, which is what you referenced in your first post. Link to comment Share on other sites More sharing options...
flix Posted December 22, 2011 Author Share Posted December 22, 2011 Oh. The order confirmation emails shop employees receive (which I also referenced in my original post) still have the original date order, so it would seem PaymentModule.php doesn't apply to them, either way. Link to comment Share on other sites More sharing options...
bellini13 Posted December 22, 2011 Share Posted December 22, 2011 the mail that goes to employees is from the mailalerts module. this appears to use the language configured date format. if you are using v1.4.6.2, then go into the backoffice, and edit your language to revise the date format. Note: This will change the date format for the entire store for that language. If you only want to change the date in the mailalerts, then you will have to revise the module to not use the Tools::displayDate function Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now