Post by ppt » Tue Jun 07, 2011 3:37 am

Hi,

I have been looking for 2 hours now (!) but I can not seem to find it. I'm generating invoices in OpenCart, and the new invoice_date on the latest 1.4.9.5 version displays the date in the following format on the invoice (order_invoice.tpl): 2011-06-05 21:42:27

However: I would like it to be 05-06-2011; the same way that date_added is using in the invoice template, with the correct date format and without the creation time.

Please help :drunk:
Last edited by ppt on Tue Jun 07, 2011 2:43 pm, edited 1 time in total.

ppt
Newbie

Posts

Joined
Tue Jun 07, 2011 3:29 am

Post by Qphoria » Tue Jun 07, 2011 10:35 am

Actually I don't think I added a formatting to the invoice date. It just uses the default mysql now() which is in the format it shows.

Try this.

1. EDIT: admin/controller/sale/order.php

2. FIND:

Code: Select all

$invoice_date = $order_info['invoice_date'];
3. REPLACE WITH:

Code: Select all

$invoice_date = date($this->language->get('date_format_short'), strtotime($order_info['invoice_date']));

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by ppt » Tue Jun 07, 2011 2:44 pm

Yes, that did the job. Thanks Q!

ppt
Newbie

Posts

Joined
Tue Jun 07, 2011 3:29 am

Post by adi_555 » Wed Dec 28, 2011 3:24 am

Qphoria wrote:Actually I don't think I added a formatting to the invoice date. It just uses the default mysql now() which is in the format it shows.

Try this.

1. EDIT: admin/controller/sale/order.php

2. FIND:

Code: Select all

$invoice_date = $order_info['invoice_date'];
3. REPLACE WITH:

Code: Select all

$invoice_date = date($this->language->get('date_format_short'), strtotime($order_info['invoice_date']));
Default still displays 01/01/1970 instead of 0000000

Any solution?

Active Member

Posts

Joined
Mon Nov 08, 2010 6:21 pm
Who is online

Users browsing this forum: No registered users and 5 guests