Support

Home Forums Event Espresso Premium Custom Invoice Template

Custom Invoice Template

Posted: January 21, 2015 at 11:22 pm


Ian Mills

January 21, 2015 at 11:22 pm

Hi,

Is there a way to create a custom template for the Invoice? I’ve found the template in /wp-content/plugins/event-espresso-core-reg/modules/gateways/Invoice/lib/templates however I’m assuming any changes to this would be wiped with a plugin update.

Is there a way to overwrite this, such as creating a copy in my theme file?

Thanks


Tony

  • Support Staff

January 22, 2015 at 5:20 am

Hi Ian,

You can use custom invoice templates yes, in the current version its a little odd but here is what you need to do:

Go to /event-espresso-core-reg/modules/gateways/Invoice/lib/

Within that directory copy the templates folder.

Now you need to re-create that structure within wp-content/uploads/espresso/templates/ and place the templates folder there.

So you’ll end up with /wp-content/uploads/espresso/templates/modules/gateways/Invoice/lib/templates/

In that location you can make changes to the templates and they will remain update safe.

Just to note in the next version of Event Espresso 4 we have moved the invoice/receipts into the messages system, meaning you can edit them from within the admin.

Templates from the current system will not be compatible with the new system so any customisations will need to be re-done from within the Admin.


Ian Mills

January 22, 2015 at 4:35 pm

Hi Tony,

Thanks for that. How would it actually work in the next version? Would it still be HTML with a Stylesheet? I’m just curious if everything I can do with this template will be possible with the messages system?


Lorenzo Orlando Caum

  • Support Staff

January 22, 2015 at 5:09 pm

Hi Ian, here are some screenshots of the invoice (text view) in the messages editor:

http://cl.ly/image/1y1t273v0y28

http://cl.ly/image/2O3d2T2K352s

http://cl.ly/image/2r3j1s3o311D

And here is one for the visual view:

http://cl.ly/image/2q3Z0U1K443k


Lorenzo


Ian Mills

January 22, 2015 at 8:07 pm

Thanks Lorenzo, that’s looks fine.


Ian Mills

January 26, 2015 at 8:32 pm

Hi,

Sorry, I can’t seem to get this to work. I’ve copied
/public_html/wp-content/plugins/event-espresso-core-reg/modules/gateways/Invoice/lib/templates/invoice_body.template.php
to
/public_html/wp-content/uploads/espresso/templates/modules/gateways/Invoice/lib/templates/invoice_body.template.php

I’ve made changes to the latter, but they don’t appear in the invoice. Is there a cache or something I need to clear?


Ian Mills

January 26, 2015 at 8:44 pm

Sorry, just because those paths are being clipped by the sidebar. I moved:

/public_html/wp-content/plugins/event-espresso-core-reg/modules/gateways/Invoice/lib/templates/invoice_body.template.php

to

/public_html/wp-content/uploads/espresso/templates/modules/gateways/Invoice/lib/templates/invoice_body.template.php


Tony

  • Support Staff

January 27, 2015 at 1:48 am

Hi Ian,

Which version of EE4 are you currently using?

I just copied that template to my uploads folder and added:

CUSTOM TEMPLATE WITHIN UPLOADS

Wrapped in h2 tags on line 37, then re-downloaded the PDF – http://take.ms/QiLGP

As you can see, the custom text is displayed.

Can you double check for any typos within the directory tree, mine is:

\wp-content\uploads\espresso\templates\modules\gateways\Invoice\lib\templates

Which seems to match yours.


Ian Mills

January 27, 2015 at 8:15 pm

Hi Tony,

I’m using 4.4.8.p on WP 4.1, and I copied those paths you see in my last post directly from my FTP app, so if they’re correct, the files are in the right place.

Do you know any technical details about how these templates work? For example I had issues with another part of the plugin due to an issue with fopen on the server. Could something similar be happening here?

Thanks


Tony

  • Support Staff

January 28, 2015 at 6:20 am

When you first looked within wp-content/uploads/ was there an /espresso/ directory?

Within that directory do you also have other directories such as ‘css’, ‘logs’, ‘languages’? (You should not need to create these, I’m asking to check that Event Espresso could create them on install)

You could try altering the permissions on your /wp-content/uploads/ directory to say 755 and retesting (or even 777 just to test although I do not recommend this), Event Espresso includes the template from that directory, it doesn’t need fopen or similar to do so.


Ian Mills

January 28, 2015 at 5:26 pm

Hi Tony,

Yes, that directory was already there, with those subdirectories.


Ian Mills

January 28, 2015 at 10:30 pm

So I just started over. Deleted everything in the templates folder and recreated them, and it appears to be working fine now.


Lorenzo Orlando Caum

  • Support Staff

December 8, 2015 at 6:23 pm

Hi Ian,

When we shared feedback on your question last year, copying over the templates for editing was the recommended way to edit the templates for the Invoice or Receipt.

That has changed as Event Espresso 4 now has an editor to edit those templates through the WP dashboard.

It can be found in Event Espresso –> Messages. You’ll now be viewing the Messages Overview screen. Now look for Invoice or Receipt and click on Purchaser. Here is an example of how they appear on the Messages Overview Screen:

http://cl.ly/image/2O341M2z0H1q

If you do not see them, then you may be using an old version of Event Espresso 4 or they may be on page 2 so you can paginate (browse) to page 2 and they should be there.

Here is a change log for Event Espresso 4:

https://eventespresso.com/wiki/ee4-changelog/

If you have any new questions about the using the messages system, then please create a new support post in our support forums:

https://eventespresso.com/support/forums/


Lorenzo

The support post ‘Custom Invoice Template’ 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