Support

Home Forums Event Espresso Premium Invoice date format needs to change to dd/mm/yyyy

Invoice date format needs to change to dd/mm/yyyy

Posted: May 14, 2013 at 4:22 pm

Viewing 6 reply threads


inspectahdeck

May 14, 2013 at 4:22 pm

Where can i edit this?

Thanks


Dean

May 15, 2013 at 12:03 am

All the Event Espresso dates (including the invoice) are controlled by WordPress, so by going to Settings > General you can change the date format.


inspectahdeck

May 15, 2013 at 3:46 am

Thanks for the swift response…

I had done that already and on everything it seems to be fine. Even the date at the top right of the invoice is fine (dd/mm/yyyy)

Its the date next to event name that remains as mm-dd-yyyy.

Any help with this would be appreciated.

 

Kind regards

 


Dean

May 15, 2013 at 4:09 am

Hi,

Sorry about that, I didnt see that date.

You are absolutely right, the date format is hardcoded into the invoice template for some reason.

I will get a developer to look into it and resolve it. In the mean time there is a temporary fix if you need it.

Edit the invoice template.php (found in event-espresso/gateways/invoice) and on line 162 you will see this

pdftext($tmp_attendee["event_name"] . "[" . date('m-d-Y', strtotime($tmp_attendee['start_date'])) . "]") . ' >> '

change that line so it reads

pdftext($tmp_attendee["event_name"] . "[" . date($correct_date_format, strtotime($tmp_attendee['start_date'])) . "]") . ' >> '

this code is inside a foreach loop, which starts a few lines up with foreach.

Just above that add this

$correct_date_format= get_option('date_format');

It should look like this http://d.pr/i/YqwE (note that the line numbers may not be exact).


inspectahdeck

May 15, 2013 at 4:13 am

Not a worry at all,

If i fix it, i am assuming on the next update of EE, it will be overwritten?

Do you think they will have fixed it for the next version, so it is no longer hard coded?

It can be extemely confusing for members if events are for 7/6/2013 and they read it as 6/7/2013.

Thanks!


Dean

May 15, 2013 at 4:18 am

Hi

I cant say when it will be added, but it is a quick fix.

If you edit the files in the plugin then yes they will get over written on update. The gateway files can be copied to the uploads directory just like other templates, so copy the entire Invoice directory from event-espresso/gateways/invoice, over to uploads/espresso/gateways/invoice and edit the files there.


inspectahdeck

May 15, 2013 at 7:23 am

cool thanks!

Viewing 6 reply threads

The support post ‘Invoice date format needs to change to dd/mm/yyyy’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso