Post by Gilmore » Mon Sep 13, 2010 1:54 pm

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
Last edited by Gilmore on Fri Jan 06, 2012 2:25 am, edited 1 time in total.

Thanks!

Gilmore


User avatar
Active Member

Posts

Joined
Thu Aug 12, 2010 7:33 am

Post by yiyinlah » Thu Sep 30, 2010 5:20 am

Will this modification work in 1.4.9.1? :)

Thanks!

I'm using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by Gilmore » Thu Sep 30, 2010 9:36 am

Should! Since all you are changing is the php date in the language file. It doesn't effect the code.

User avatar
Active Member

Posts

Joined
Thu Aug 12, 2010 7:33 am

Post by yiyinlah » Thu Sep 30, 2010 5:47 pm

Hi! Thank you!

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

I'm using Opencart 1.5.4.1 & vQmod 2.3.2.


User avatar
Active Member

Posts

Joined
Thu Sep 23, 2010 1:19 pm
Location - Singapore

Post by Gilmore » Fri Oct 01, 2010 2:53 am

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

User avatar
Active Member

Posts

Joined
Thu Aug 12, 2010 7:33 am

Post by tim21701 » Sat Mar 12, 2011 11:14 pm

Gilmore thanks!

But, as shown Cyrillic (Russian) date?
Image

help me please!

User avatar
Newbie

Posts

Joined
Fri Feb 25, 2011 5:46 pm
Location - Russia, Murmansk

Post by spitos » Thu Sep 22, 2011 1:36 am

Thanks Gil ;)

Image
Google Analytics Expert - Advanced e-commerce tracking, Product & options reporting, transaction/conversion reporting, Google Adwords conversion & profit reporting, goal & funnel reporting, event tracking, site search tracking, multi-store compatibility, EU Cookie Law compliance and works with any theme or checkout! Easy vqmod install. Get it here


User avatar
Active Member

Posts

Joined
Mon May 23, 2011 6:19 pm
Location - UK
Who is online

Users browsing this forum: No registered users and 8 guests