Page 1 of 1

Date Added problem

Posted: Thu Apr 09, 2015 5:46 pm
by evilfx
Hi,

I'm using OC 2.0.2.0.

When an order is added, the email i (and the client) receive is a little strange regarding the date:

Date Added: 09am30UTC_f2015Thu, 09 Apr 2015 01:21:49 +000004am30_49012015Thu, 09 Apr 2015 01:21:49 +000030

How can i fix this?

Thanks

Re: Date Added problem

Posted: Thu Apr 09, 2015 9:04 pm
by aljawaid
I get the same problem and been searching all over just to show a simple date and time :(

Re: Date Added problem

Posted: Fri Apr 10, 2015 7:47 am
by Havlock
I too, am having this same problem...any ideas?

Re: Date Added problem

Posted: Fri Apr 10, 2015 7:05 pm
by evilfx
anyone?

Re: Date Added problem

Posted: Fri Apr 10, 2015 8:24 pm
by OSWorX
Looks like the date format is wrong.

Re: Date Added problem

Posted: Fri Apr 10, 2015 8:35 pm
by evilfx
It happens on a clean OC 2.0.2.0 install.

Re: Date Added problem

Posted: Fri Apr 10, 2015 10:11 pm
by aljawaid
mine is clean install too :(

Re: Date Added problem

Posted: Sat Apr 11, 2015 12:54 am
by OSWorX

Re: Date Added problem

Posted: Tue Apr 14, 2015 6:49 am
by Havlock

The only thing I find on this link in response to this is;

Is better $order_info['language_directory'] than 'english'.

Any chance anyone here can interpret what exactly that means?




The dates displays wrong on both my admin copy and the customer copy of the invoice like this.

Re: Date Added problem

Posted: Tue Apr 14, 2015 2:57 pm
by OSWorX
1. using

Code: Select all

$order_info['language_directory']
is the best, because then the language the order has is used
2. how does your date (the output) looks now

Re: Date Added problem

Posted: Wed Apr 15, 2015 3:51 am
by aljawaid
I'm not sure what line 858 in your code is to do...

Do I remove the line only to add it or do I add a blank line or blank space? Sorry I was confused on the github colour/label for that

Re: Date Added problem

Posted: Wed Apr 15, 2015 3:06 pm
by OSWorX
pennyprofits wrote:I'm not sure what line 858 in your code is to do...

Do I remove the line only to add it or do I add a blank line or blank space? Sorry I was confused on the github colour/label for that
Wether nor.
The orginal line (code) is like that:

Code: Select all

$language->load('default');
and you have to replace that with:

Code: Select all

$language->load($order_info['language_directory'])

Re: Date Added problem

Posted: Thu Apr 16, 2015 3:33 am
by rph
The way datetime is handled in general needs a rethink. Leaving it up to server settings creates unforeseen problems for stores, especially when the web host and brick-and-mortar are separated by long distances.

Re: Date Added problem

Posted: Thu Apr 16, 2015 7:27 am
by Havlock
OSWorX wrote:
pennyprofits wrote:I'm not sure what line 858 in your code is to do...

Do I remove the line only to add it or do I add a blank line or blank space? Sorry I was confused on the github colour/label for that
Wether nor.
The orginal line (code) is like that:

Code: Select all

$language->load('default');
and you have to replace that with:

Code: Select all

$language->load($order_info['language_directory'])
Can you tell me what file you are making this change in?

From the cryptic github note regarding this, I assume it is order.php, but if so, which one? I have three different ones in three different folders.

Re: Date Added problem

Posted: Thu Apr 16, 2015 7:59 am
by aljawaid
I did it in the one mentioned in github and it works perfect.

Re: Date Added problem

Posted: Thu Apr 16, 2015 10:01 am
by Havlock
pennyprofits wrote:I did it in the one mentioned in github and it works perfect.

Thanks. I didnt realize there was more to the github thread than that single line. Took a little digging but found the info and it did indeed work.
Gracias!

Re: Date Added problem

Posted: Sun Apr 26, 2015 7:24 am
by vnabc
OK, I confirmed it works for me too.
OpenCart Version 2.0.2.0
from Date Added: 25pm30UTC_f2015Sat, 25 Apr 2015 15:16:30 +000004pm30_30032015Sat, 25 Apr 2015 15:16:30 +000030
to Date Added: 04/25/2015

File to edit:

Code: Select all

\catalog\model\checkout\order.php
Change from:

Code: Select all

$language->load('default');
Change to:

Code: Select all

$language->load($order_info['language_directory']);
Change both: Customer Mail (line 401) and Admin Alert Mail (line 803)

Re: Date Added problem

Posted: Sat May 30, 2015 2:50 am
by kalessaradan
So this did fix the order invoice that the customer receives when they first place an order, but I am still having the same issue whenever the customer receives the order update email. For example, when we ship the order and they receive the email with the tracking information, this is what that email looks like.

Order ID: 41550
Date Ordered: 29am31America/Los_Angeles_f2015Fri, 29 May 2015 11:44:20 -070005am31_20112015Fri, 29 May 2015 11:44:20 -070031

Your order has been updated to the following status:
Shipped

The comments for your order are:
Order Shipped on 05/29/2015 via Priority Mail Tracking Number is: 1

Please reply to this email if you have any questions.

Re: Date Added problem

Posted: Sat May 30, 2015 7:01 am
by exit15
just peeked into 2.0.3.1 and i see that this was fixed.