Support

Home Forums Event Espresso Premium Extra Margin on Invoice

Extra Margin on Invoice

Posted: July 14, 2017 at 7:04 pm


jlnewell

July 14, 2017 at 7:04 pm

I have a 4m margin between the first Attendee and the rest on my invoice. I have checked the code and shortcodes and cant find it. I can see it in firefox and chrome in the inspect element. Can someone tell me how to get rid of it.

Invoice: https://02f4d67.netsolhost.com/site/?ee=msg_url_trigger&snd_msgr=html&gen_msgr=html&message_type=invoice&context=purchaser&token=1-fb923d25fdb9c9858c2fd6b47c22632b&GRP_ID=7&id=7


Tony

  • Support Staff

July 17, 2017 at 4:41 am

Hi there,

The first registration is being shown within a table of its own, the others are list items which, the tables within the invoice have a bottom margin set so that’s why your getting the margin.

How have you added the registration details to the Invoice?

Did you copy the content from another template?

If you switch the editor to text mode and look at the content you added, it is wrapped in a table?


jlnewell

July 17, 2017 at 6:20 am

i copied from the Receipt template.

From the [ATTENDEE_LIST] section. They are all in the same table, but there are 2 sections of “tr” tags. I can post the code here if you need. But i messed around with them and got nowhere before. i suppose i can try and inline style those and have 0 padding. But i was trying not to mess with the actual template to much.


Tony

  • Support Staff

July 17, 2017 at 6:39 am

From the [ATTENDEE_LIST] section.

By default, ATTENDEE_LIST isn’t called on the Invoice template, so were have you added [ATTENDEE_LIST]?

They are all in the same table, but there are 2 sections of “tr” tags. I can post the code here if you need.

If you view the source you’ll find each registration is within its own table, but the second 2 are wrapped within Li tags.

The CSS that’s causing you problems is:

#invoice>div, #invoice>table {
    margin-bottom: 4em;
}

That applies to the first registration but not the other 2 because of the Li’s – http://take.ms/wdwi5

I need to see the code to know whats happening, if you can post the code and a screenshot of the template sections I’ll see what I can do:

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots


jlnewell

July 17, 2017 at 12:48 pm

I do know the CSS that has been causing it, i can see it. And i have tried to change it in my custom css plugin sitewide and it just ignores it.

I added the [ATTENDEE_LIST] under the ticket list section of the invoice. Code is below. I cannot add the screenshot at the location i am in at the moment, but i can link out to a picture later this evening.

code is:
<li class=”ticket-registration”>
<table class=”registration-details”>
<tr class=”odd”>
<th>Attendee</th>
<td>[FNAME] [LNAME] ([ATTENDEE_EMAIL])</td>
</tr>
<tr>
<th>Registration Code:</th>
<td>[REGISTRATION_CODE] – <span class=”[REGISTRATION_STATUS_ID]”>[REGISTRATION_STATUS_LABEL]</span></td>
</tr>
</table>


Josh

  • Support Staff

July 17, 2017 at 1:37 pm

You can change:

<table class="registration-details">

to be:

<table class="registration-details" style="margin-bottom: 0;">

and the extra margin will be removed.


jlnewell

July 17, 2017 at 1:59 pm

I will try this, i wondered about inline style but i didnt know if it would work.


jlnewell

July 17, 2017 at 4:45 pm

Worked Perfect thanks for the info.


Tony

  • Support Staff

July 18, 2017 at 3:09 am

If you try to download the PDF from your edited template you’ll find DOMPDF (which we use to generate the PDF’s) will throw a fatal error.

The browser is much more forgiving for invalid HTML than DOMPDF is, for example in the code you posted above there is an opening LI tag, but no closing tag?

<li class=”ticket-registration”> isn’t closed.

You will need to do through the code you have added to the template and confirm it is all valid HTML.

The support post ‘Extra Margin on Invoice’ 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