Support

Home Forums Event Espresso Premium Email layout and PDF problem

Email layout and PDF problem

Posted: May 16, 2016 at 2:45 am


Denise

May 16, 2016 at 2:45 am

Hi – I am setting up event espresso now for a client and it is working great in general, but we have 2 queries I hope you can help me with:

1. The ‘registration approved’ email the attendee gets. It has wording in it like:
Question: Child’s Name
Answer: Joe Bloggs
This doesn’t look great or read well so I would like to change it to:
Child’s Name: Joe Bloggs
Is this possible in some template?

2. The PDF invoice that the system generates won’t open (tested on a few computers). Gives an error message about file format…
Any idea what could be causing this?

Thanks for your help.

Barry


Tony

  • Support Staff

May 16, 2016 at 3:32 am

Hi Barry,

1. The ‘registration approved’ email the attendee gets. It has wording in it like:
Question: Child’s Name
Answer: Joe Bloggs
This doesn’t look great or read well so I would like to change it to:
Child’s Name: Joe Bloggs
Is this possible in some template?

Yes that can be edited within the messages system.

Event Espresso -> Messages -> Default Message Templates (tab)

In the list find the ‘Registration Approved’ message.

Each message template can have multiple ‘contexts’ in which it is used. For more information on working with message contexts, view here:

https://eventespresso.com/wiki/messages-system-working-with-message-contexts/

You want the ‘registrant’ context – http://take.ms/R5XRR

From here you can change the registration approved message that is sent to the registrant.

The example you provided is from custom questions which are handled within the ‘QUESTION_LIST’ section – http://take.ms/Emhuj

Each custom question is loops over and that section is used to output the details. So in your example you just want: [QUESTION]: [ANSWER], make sure they are wrapped within an li, like so – http://take.ms/zV9GM

Save the template and retest.

2. The PDF invoice that the system generates won’t open (tested on a few computers). Gives an error message about file format…
Any idea what could be causing this?

Most likely something is being output to the PDF that is not expected. Can you link me to either an event I can register on to download the PDF, or the thank you page of a completed registration were I can download the PDF from please.


Denise

May 16, 2016 at 8:10 am

Hi Tony,

Thanks for the reply, I will check out the templates later.

Here is a link to a free test event: http://dizzyfeet.ie/events/test-event/

regards,

Barry


Tony

  • Support Staff

May 16, 2016 at 10:39 am

Hi Barry,

There are warnings being output at the begging of the PDF which are breaking the PDF format:

Warning: DOMNode::cloneNode() [<a href='domnode.clonenode'>domnode.clonenode</a>]: ID invoice already defined in /event-espresso-core-reg/core/third_party_libs/dompdf/include/frame_decorator.cls.php on line 429

Do you currently have WP_DEBUG enabled currently?

If so I would recommend using this code:

https://gist.github.com/Pebblo/4486cc5e567bc8e5f019b6a1d5057eda

Which tells WordPress to log the errors within a debug.log file rather than output them to the page. That will allow the PDFs to work (and you don’t want the server errors output on a live site)

Do you have another plugin that generates PDFs at all?


Denise

May 16, 2016 at 10:47 am

Hi Tony,

No, I don’t have WP_DEBUG in use (set to false). And unfortunately no other plugins which generate PDF’s. I can install one if you recommend one, in order to test?


Tony

  • Support Staff

May 16, 2016 at 10:57 am

No, I don’t have WP_DEBUG in use (set to false).

Hmm, in that case it looks your server is set to display errors anyway.

Within your wp-config.php file add:

@ini_set( 'display_errors', 0 );

Outside of the WP_DEBUG conditional, like this:

define( 'WP_DEBUG', true ); // Or false
if ( WP_DEBUG ) {
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
}
@ini_set( 'display_errors', 0 );

The ini_set should force your server to stop outputting the errors to the page.

And unfortunately no other plugins which generate PDF’s. I can install one if you recommend one, in order to test?

No, I’m wondering how your are getting that error currently.

It means there are two elements being passed to DOMPDF that have the ID of Invoice. DOMPDF is much more fussy about valid HTML than your browser, so it complains. But looking at the HTML output of the PDF there is only a single element with that ID, so I thought it may have been a conflict with another plugin using DOMPDF.


Denise

May 17, 2016 at 3:09 am

Hi Tony,

That has done the trick, so Pdf output is working fine now.

Many thanks for your perseverance!

regards,

Barry


Tony

  • Support Staff

May 17, 2016 at 3:27 am

You’re most welcome 🙂

Any further problems please let us know.


Denise

May 18, 2016 at 2:34 am

Hi again, Is there any way to edit the content of the PDF invoice?

thanks,

Barry


Tony

  • Support Staff

May 18, 2016 at 3:43 am

Yes, you can edit the template within:

Event Espresso -> Messages -> Default message templates -> Invoice.

Click on the ‘recipient’ link to edit the template and make any changes you prefer.

(Note how I mentioned DOMPDF is fussy about HTML, be sure your changes using valid syntax to keep your PDFs working as expected)


Denise

May 18, 2016 at 7:21 am

Thanks Tony, I think I have that sorted.

Another question, is it possible to change the date format to european, DD/MM/YYYY, instead of MM/DD/YYYY?

Thanks.


Lorenzo Orlando Caum

  • Support Staff

May 18, 2016 at 1:00 pm

Hi Barry,

Where are you wanting to change the date format? For example, is this on the event page or in an email or somewhere else?


Lorenzo


Denise

May 19, 2016 at 1:20 am

Hi Lorenzo,

It is in the PDF and the email notification that both the client and the attendee get.

Barry


Lorenzo Orlando Caum

  • Support Staff

May 19, 2016 at 4:13 am

Hi Barry,

Could you go to WP-admin (WP dashboard) –> General Settings and then select the updated date format?

The date in the messages system will then use that format.

Before: http://cl.ly/1C3k0S003J3D

After: http://cl.ly/1L243t113R3e


Lorenzo


Lorenzo Orlando Caum

  • Support Staff

May 19, 2016 at 4:14 am

Hi Barry,

Could you go to WP-admin (WP dashboard) –> General Settings and then select the updated date format?

The date in the messages system will then use that format.

Before: http://cl.ly/1C3k0S003J3D

After: http://cl.ly/1L243t113R3e


Lorenzo

The support post ‘Email layout and PDF problem’ 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