Support

Home Forums Event Espresso Premium Custom date format for default confirmation email

Custom date format for default confirmation email

Posted: March 20, 2014 at 2:41 am

Viewing 6 reply threads


Amy Bridge

March 20, 2014 at 2:41 am

Hi All,

I would like to format the date in the default confirmation email as follows: 08-09 March 2014. Can this be done?

Thanks in advance


Amy Bridge

March 20, 2014 at 2:44 am

not related directly to the above, but can you display just the city of the event? I am using the venue manager.


Dean

March 20, 2014 at 3:01 am

Hi Amy,

Both of those would require customisation of the plugin.

The date issue is quite hard as it would need core file edits (which we don’t recommend).

The venue would probably be best done by editing the template file and adding something like this in replacement for the $location variable that is currently used.

<?php
$x = explode('<br />', $location);

//x[2] is for single reg page, for the event list it would be x[1]
$y = explode(',', $x[2]); 
echo $y[1];
?>


Amy Bridge

March 20, 2014 at 11:56 pm

Hi Dean,

Would that be the default email template file? If so, where abouts would I find that? Could I not also edit the date format in that template file as well, i.e. create a new variable which I would modify the start date variable and only display the day?


Dean

March 21, 2014 at 2:21 am

Hi Amy,

Sorry I should have been clearer. The code example (and it is only an example) would have gone in the registration_page_display.php and/or the event_list_display.php.

I assumed, perhaps incorrectly, that you wanted the venue display on the site front end. Looking closer at your query I think now that you wanted the venue change in the email as well.

If that is the case, then my first answer applies to both: it’s possible but would require some code edits to core files which would require a developer and which we do not recommend.


Amy Bridge

March 21, 2014 at 10:07 am

Hi Dean,

I have already managed to change the date format and extract the city on the events and registration page, its just the default confirmation email that I am trying to sort out.

So based on your reply, only way to do this is to edit core files?


Dean

March 24, 2014 at 12:40 am

Hi Amy,

Unfortunately so. The main function that deals with the email has no hooks/filters and is not pluggable.

As such it would need to be modified manually and updates will over write the changes.

If you still want to go ahead with that, it is the event-espresso/includes/functions/email.php file.

I would suggest adding a new tag to the bottom of the $SearchValues array and the data to replace it to the bottom of the $ReplaceValues array.

Viewing 6 reply threads

The support post ‘Custom date format for default confirmation email’ 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