Support

Home Forums Event Espresso Premium PDF Invoice custom CSS

PDF Invoice custom CSS

Posted: March 29, 2014 at 9:28 pm

Viewing 6 reply threads


Jason Redcay

March 29, 2014 at 9:28 pm

Hello, I’m wondering, where should I Load a custom style sheet to change the look of my invoice? The invoice pdf stylesheet is cutting both business name and address into two lines.

I changed the css in plugins/event-espresso-core-reg/modules/gateways/Invoice/lib/templates/css/union.css to get what I want. But of course, it will be overridden in future updates.

Please help,
thanks!

Details:
WP 3.8.1
EE4 4.1.9.1.reg
Installed earlier this year, still in dev
Link not live for non-logged-in users


Lorenzo Orlando Caum

  • Support Staff

March 30, 2014 at 11:44 am

Hi Jason,

You could add your CSS edits to a plugin like My Custom CSS.


Lorenzo


Jason Redcay

April 5, 2014 at 9:38 pm

I’d rather just add the CSS to my theme stylesheet. Is there a way my own styles can override?


Lorenzo Orlando Caum

  • Support Staff

April 6, 2014 at 8:18 pm

Hello,

You can add your custom CSS styles there as well but if your theme auto updates itself, then your edits will be lost.


Lorenzo


Jason Redcay

April 15, 2014 at 7:07 am

Hi,

I have a custom theme, so the theme won’t auto update.

I added the invoice styles to my theme stylesheet, but it doesn’t override. The invoice doesn’t appear to be calling the theme’s style.css at all.

Is there a way my own styles can override?

Thanks,


Josh

  • Support Staff

April 17, 2014 at 11:04 am

Hi Jason,

There is a way and I can outline the steps. Please note that these instructions are for Event Espresso 4.2 and may change in future versions because we’d like to make this simpler.

Step one is you modify invoice_header.template.php to include your custom styles. You could either (a) change line 11 to link to your copy of union.css that’s uploaded to your theme or to another location on your server. You’ll need to change the full path as the one that’s there now is a relative path. or (b) add your custom styles inline, directly to the template after line 15.

Then you copy the modified template to /wp-content/uploads/espresso/templates/modules/gateways/Invoice/lib/templates and it will load from there.

One of the developers said he is going to think of a way to make this simpler (hopefully with fewer paths). For now, you need to set up a file path that matches what’s inside the core plugin.

As an aside, there is an open ticket for making the left column in the invoice wider for all the templates to accommodate medium-long business names and addresses.


Jason Redcay

April 17, 2014 at 12:57 pm

Yes, that’s the main reason I want to change it – accommodating longer business names and addresses.

Thanks!

Viewing 6 reply threads

The support post ‘PDF Invoice custom CSS’ 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