Support

Home Forums Event Espresso Premium Custom Receipt Template doesn't download the PDF

Custom Receipt Template doesn't download the PDF

Posted: July 21, 2017 at 12:08 am

Viewing 6 reply threads


RashminNMM

July 21, 2017 at 12:08 am

Hello ,

We have created a custom Receipt message template for an event by choosing Create custom button from Event Espresso-> Default Message Template. Selected the custom template for that particular event for HTML Receipt. For all others the template is set to global in the event.
The custom HTML Receipt is populated with correct details as we wanted. We have kept the Download PDF button same as in the original default template. But on clicking the ‘Download PDF’ doesn’t actually download the PDF.
It works perfectly well for the original Receipt Template though.
What could be the problem?
THanks
Rashmin


Tony

  • Support Staff

July 21, 2017 at 8:11 am

Hi Rashmin,

Which event is the template set on? I can’t see it in use at all on the site currently. (You sent log in details for your other thread so I had a look whilst checking into the payment logs).

Can you setup the custom template to be in use on whichever event you want to use so I can view the problem, please.


RashminNMM

July 21, 2017 at 10:16 am

Hello Tony,

I had switched back to Global to check whether it downloads for the global.

I have run thru a new registration event “Sarvajanik Ganeshotsav 2017” with custom Template,https://www.netherlandsmarathimandal.org/screen-shot-2017-07-21-at-18-08-38/
On clicking download PDF, it displays the company logo with menu under it.

Also, with respect to previous thread, the invoice displays Incomplete and the payment status was not returned. But after few more seconds/minute all the status changed to approved & complete.
Status incomplete
https://www.netherlandsmarathimandal.org/screen-shot-2017-07-21-at-18-09-01/
status complete for the same record
https://www.netherlandsmarathimandal.org/screen-shot-2017-07-21-at-18-11-18/
THanks


Tony

  • Support Staff

July 24, 2017 at 8:37 am

Whenever you click to view a template from the registration list view it will use the current template set on the event not the one used during the registration.

On clicking download PDF, it displays the company logo with menu under it.

It’s loading the home page of your site without the CSS – http://take.ms/i9T6g

There are a couple of problems with the receipts currently, your custom template has invalid HTML within the template, the browser will display that fine but the library used to generate the PDF’s is MUCH more strict on having valid HTML. You’ll need to go through and confirm the output is correct, a quick example is [TICKET_LIST] is being used which outputs li tags around each ticket, but you don’t have the shortcoe wrapped in ul’s.

There may be more but in short if you are editing the templates you need to make sure you edits are still valid HTML.

Also you currently have WP Super cache set to cache the receipts – http://take.ms/tJ6Lu

Those should not be cached as they are unique for each use, by default WP Super cache will not cache those pages as they use query strings so have you altered the caching settings?

Also, with respect to previous thread, the invoice displays Incomplete and the payment status was not returned. But after few more seconds/minute all the status changed to approved & complete.

You posted you have been having hosting issues and this is now resolved, however to valirfy, Mollie uses a process similar to PayPals IPN’s. When your user makes a payment the user is directed back to the site, in the meantime mollie sends a request to YOUR site to update the registration. If mollie is delayed or you site i slow to load that request then the registrations show pending payment, then the request hits your site and updates.


RashminNMM

July 24, 2017 at 9:49 am

Hello Tony,

Right, the HTML edits were not correct, but it wasn’t giving any error with the normal browser display, hence didn’t realise it. Thanks for pointing that out.

On the WP_super_cache, didn’t change anything there. just updated with the recent update. Plus I noticed that it was caching wp-links-opml.php.
I have removed that from caching, reactivated the plugin and now its not cached.
I hope this doesn’t have any other impact ?

Thanks
Rashmin


Tony

  • Support Staff

July 24, 2017 at 5:35 pm

Right, the HTML edits were not correct, but it wasn’t giving any error with the normal browser display, hence didn’t realise it. Thanks for pointing that out.

Great, so it’s working now?

The browser is much more forgiving of invalid HTML and will do its best to try and figure out what its supposed to be doing. PDF libraries simply don’t allow it and just fail, you can look within the error log and you’ll likely find some errors there relating to DOMPDF, however they are usually pretty cryptic and don’t help much.

Plus I noticed that it was caching wp-links-opml.php.

That’s not from Event Espresso so I’m not sure.


RashminNMM

July 26, 2017 at 1:00 am

Hello,

I used the custom template as we had to make the registrations live.
But now I understand the error will rectify it and use the custom template for the next event.
Thanks for your help.
Rashmin

Viewing 6 reply threads

The support post ‘Custom Receipt Template doesn't download the PDF’ 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