Support

Home Forums Event Espresso Premium Admin Email Formatting – avoid repetitive data

Admin Email Formatting – avoid repetitive data

Posted: January 28, 2014 at 7:47 am


Tim Kirk

January 28, 2014 at 7:47 am

Hi,

I’ve edited includes/functions/email.php so that the Admin email is now sent to the admin within my organisation AND the admin in my clients organisation (this is often NOT the primary delegate) by way of adding a required email address as a custom question in the registration form and then calling for the data in email.php.

I’d now like to change the formatting so that the email reads something like:

Thanks for your booking.
Here’s who’s registered for the event:
[TABLE LISTING ALL DELEGATES]
A separate email has been sent to each of them with further details.
Here is a link to your payment: PDF link.
Lots of Love,
My Company Ltd
Phone: 0123456585

I’ve managed to edit the code to work exactly as intended for one recipient (if only a single delegate is added during the registration) BUT if more than one delegate is added to the booking the email prints/repeats everything (all of the above, one after another) – the only thing that changes is that there is a different delegate in the delegate info table.

How do I manipulate the code so I can generate a nicely formatted email without repeated information?

Thanks.


Tim Kirk

January 29, 2014 at 1:56 am

Hi,

I’ve edited includes/functions/email.php so that the Admin email is now sent to the admin within my organisation AND the admin in my clients organisation (this is often NOT the primary delegate) by way of adding a required email address as a custom question in the registration form and then calling for the data in email.php.

I’d now like to change the formatting so that the email reads something like:

Thanks for your booking.
Here’s who’s registered for the event:
[TABLE LISTING ALL DELEGATES]
A separate email has been sent to each of them with further details.
Here is a link to your payment: PDF link.
Lots of Love,
My Company Ltd
Phone: 0123456585

I’ve managed to edit the code to work exactly as intended for one recipient (if only a single delegate is added during the registration) BUT if more than one delegate is added to the booking the email prints/repeats everything (all of the above, one after another) – the only thing that changes is that there is a different delegate in the delegate info table.

e.g.
————–
SUBJECT
————–
Thanks for your booking.
Here’s who’s registered for the event:
[TABLE LISTING DELEGATE 1 DETAILS]
A separate email has been sent to each of them with further details.
Here is a link to your payment: PDF link.
Lots of Love,
My Company Ltd
Phone: 0123456585

————–
SUBJECT
————–
Thanks for your booking.
Here’s who’s registered for the event:
[TABLE LISTING DELEGATE 2 DETAILS]
A separate email has been sent to each of them with further details.
Here is a link to your payment: PDF link.
Lots of Love,
My Company Ltd
Phone: 0123456585
————–
SUBJECT
————–
Thanks for your booking.
Here’s who’s registered for the event:
[TABLE LISTING DELEGATE 3 DETAILS]
A separate email has been sent to each of them with further details.
Here is a link to your payment: PDF link.
Lots of Love,
My Company Ltd
Phone: 0123456585

How do I manipulate the code so I can generate a nicely formatted email without repeated information?

Thanks.


Josh

  • Support Staff

January 29, 2014 at 8:08 am

Hi Tim,

Without looking at your custom code I can only guess that the reason you’re seeing the email content get repeated is it needs to be put into a foreach loop. It may be best to hire a PHP developer to make this customization for you. We can recommend any of the developers on this list:

https://eventespresso.com/developers/event-espresso-pros/


Tim Kirk

January 29, 2014 at 8:13 am

Hi Josh,

I actually resolved this myself.

It just took a day’s worth of trial and error.

The issue I’m now having – and I’ve added my request to a different thread – is that the PDF Template to add UK VAT doesn’t seem to work as expected. IT’s really quite an urgent issue – would you be able to take a look?


Josh

  • Support Staff

January 29, 2014 at 10:19 am

Hi Tim,

I followed up with you in your other thread here:

https://eventespresso.com/topic/uk-vat-support-on-pdf-invoices/#post-76921

The support post ‘Admin Email Formatting – avoid repetitive data’ 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