Page 1 of 1

[HOW TO] - Add timestamp to order history 1.5.x

Posted: Mon Sep 13, 2010 1:54 pm
by Gilmore
OK...here's the edit to add the Time to your Order Date! I didn't realize it was so simple till I grep'ed date_format_short
So here we go! This will only edit the timestamp in the Admin section. You can edit the same file in catalog/ if you wish to do this to the customer side.

In admin/languages/english/english.php

Find:

Code: Select all

 $_['date_format_short']       = 'd/m/Y';
Add this below it:

Code: Select all

$_['date_format_shortTS']       = 'd/m/Y - g:i:s A'; //Displays date - time  01/01/2010 - 12:00:00 AM
For more information on setting the date function in php, you can refer to this page
http://php.net/manual/en/function.date.php

Now you will need to edit this file to change the Date Ordered from just a date to a timestamp.
/admin/controller/sale/order.php <-- Let's you see it on the Order History and Order page
/admin/controller/common/home.php <-- let's you see it on the Dashboard
/admin/controller/sale/customer.php <-- Let's you see it on the Customer page

Find all instances of date_format_short and change it to date_format_shortTS. Do this to the pages in the admin where you would want more than just the date.

The pages in the /admin/ that use date_format_short are...

/admin/controller/sale/order.php
/admin/controller/catalog/review.php
/admin/model/sale/order.php
/admin/controller/localisation/currency.php
/admin/controller/report/sale.php
/admin/controller/common/home.php
/admin/controller/user/user.php
/admin/controller/sale/customer.php
/admin/controller/sale/coupon.php


I hope all can enjoy this simple edit!!!

Gil

Re: [HOW TO] - Add timestamp to order history 1.4.8b

Posted: Thu Sep 30, 2010 5:20 am
by yiyinlah
Will this modification work in 1.4.9.1? :)

Thanks!

Re: [HOW TO] - Add timestamp to order history 1.4.8b

Posted: Thu Sep 30, 2010 9:36 am
by Gilmore
Should! Since all you are changing is the php date in the language file. It doesn't effect the code.

Re: [HOW TO] - Add timestamp to order history 1.4.8b

Posted: Thu Sep 30, 2010 5:47 pm
by yiyinlah
Hi! Thank you!

But, how do I edit it in the customer's side?

Re: [HOW TO] - Add timestamp to order history 1.4.8b

Posted: Fri Oct 01, 2010 2:53 am
by Gilmore
I haven't tested, but I looked and it appears to do it Customer side, then you would edit the corresponding files in the catalog folder instead of admin. Take a look and compare.

Gil

Re: [HOW TO] - Add timestamp to order history 1.4.8b

Posted: Sat Mar 12, 2011 11:14 pm
by tim21701
Gilmore thanks!

But, as shown Cyrillic (Russian) date?
Image

help me please!

Re: [HOW TO] - Add timestamp to order history 1.4.8b

Posted: Thu Sep 22, 2011 1:36 am
by spitos
Thanks Gil ;)