Support

Home Forums Event Espresso Premium Reformat registrant address

Reformat registrant address

Posted: June 27, 2017 at 6:50 am


greyowl

June 27, 2017 at 6:50 am

I’ve seen the patch for national variants of venue address: https://gist.github.com/lorenzocaum/5e2658a1f7e7a9a6b5c0
I need to do something similar for the registrant address, including an additional field (company name) and placing the zip code before the city (on the same line). How can I do that?


Tony

  • Support Staff

June 27, 2017 at 7:13 am

Hi there,

Where do you want to change the output? Within messages?


greyowl

June 27, 2017 at 8:59 am

On the invoice


Josh

  • Support Staff

June 27, 2017 at 2:43 pm

You can go to Event Espresso > Messages > Message Templates > Invoice and edit the main content section. You’ll see the Bill To: section there, just like in this screenshot.

You can change the location of the address related shortcodes there to suit your needs. The postal code isn’t there by default and you can add it by adding: [PRIMARY_REGISTRANT_ZIP_PC]

[PRIMARY_REGISTRANT_ANSWER_* Company Name] will display the company name, and you’ll need to make sure that you replace Company Name with the exact text that matches your registration form question that asks for the company name.

Please be sure to click on Save after you make the edits there.


greyowl

June 28, 2017 at 1:24 am

Your patch isn’t working, I’m afraid. I’ve changed the template as follows:
<h2>Rechnungsadresse:</h2>
<div id=”client-details” class=”vcard”>
<div class=”fn”>[PRIMARY_REGISTRANT_ANSWER_* Firma]</div>
<div class=”fn”>[PRIMARY_REGISTRANT_FNAME] [PRIMARY_REGISTRANT_LNAME]</div>
<div class=”adr”>
<div class=”street-address”>[PRIMARY_REGISTRANT_ADDRESS]<br>
[PRIMARY_REGISTRANT_ADDRESS2]</div>
<div class=”locality”>[PRIMARY_REGISTRANT_ZIP_PC] [PRIMARY_REGISTRANT_CITY]</div>
<div id=”client-postcode”>[PRIMARY_REGISTRANT_COUNTRY]</div>
</div>
</div>
but it still displays no company name, no second address line and the Zipcode below the city:
Rechnungsadresse:
Viktor Steiner
Geissacker 2
Oberlunkhofen
8917
although the Luke Skywater preview looks correct (without a Firma/company name)


Tony

  • Support Staff

June 28, 2017 at 6:11 am

Hi there,

Looking over your site I can’t see the ‘Firma’ question on the registration page, have you removed that question?

but it still displays no company name, no second address line and the Zipcode below the city

Are you editing a custom Invoice template or the default one?

If you are editing a custom Invoice template have you selected that template within the event?


greyowl

June 28, 2017 at 7:00 am

I’m working on my son’s website: walterlernt.ch
There it does ask for “Firma”


Josh

  • Support Staff

June 28, 2017 at 8:03 am

Are you editing A) a custom Invoice template or B) the default one?
If A, have you selected that template within the event?


greyowl

June 28, 2017 at 8:18 am

I’m editing the default invoice template. I have no custom one.


Josh

  • Support Staff

June 28, 2017 at 8:37 am

After you make the edits and hit save are there any errors displayed?


greyowl

June 28, 2017 at 8:46 am

No. It screamed at me when I had a typo. But otherwise no error message.


Tony

  • Support Staff

June 28, 2017 at 8:53 am

That site is using the ‘old’ Invoice system, which means you are loading a custom template from within /wp-content/modules/

Making changes to the invoice template within the admin will have no effect as with your set up you are not using it at all, you are using the custom template from above.

That method of customising the Invoice template has been deprecated for a while now, I highly recommend switching to the new Invoice system, it is still included within EE for legacy support. It allows you to transfer all of your customizations over to the template within the admin and then de-activate the above rather than it just simply switching over automatically.

You can de-activate the old invoice system by renaming the /wp-content/modules/ directory to something else.


greyowl

June 29, 2017 at 6:52 am

You say “It allows you to transfer all of your customizations over to the template within the admin …” How do I do that? Is there a risk of losing custom messages or something else?
BTW: How were we supposed to choose the ‘new Invoice system’ rather than the old one? Why isn’t the new system used by default when setting up a new site?
BTW2: For my own site (lernen-im-quartier.ch), how do I check whether I’m using the old or new system?


Tony

  • Support Staff

June 29, 2017 at 7:09 am

You say “It allows you to transfer all of your customizations over to the template within the admin …” How do I do that?

You apply any changes you have made to the old style invoice system to the template within:

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

Then remove the old template from wp-content.

Is there a risk of losing custom messages or something else?

I have no idea how the site is setup so I can’t answer that fully.

You shouldn’t have any risk of losing custom messages but again I’m not 100% sure how the site has been setup.

To provide some details, in EE4.6 (released Feb 3, 2015) the Invoice and Receipts were incorporated into the messages system, this allowed you to edit the templates within the Admin. Prior to that version you had to edit a template and place that template within /wp-content/modules/gateways/Invoice/lib/templates/ for EE to load the custom version.

On that site that has been done so EE loads that template and doesn’t use the ‘new’ invoice within the messages system. Whomever made that custom template changed how EE loads the invoice system, to switch over you need to apply any changes you need to the Invoice within the messages system and remove the custom template.

BTW: How were we supposed to choose the ‘new Invoice system’ rather than the old one? Why isn’t the new system used by default when setting up a new site?

The new invoice system is used by default, the only way for the old system to be used is if you (or someone else) has manually added the old invoice templates within wp-content. In other words, whoever edited the invoice template made the choice to use that system, not EE.

We can’t prevent that, it’s a feature not a bug.

BTW2: For my own site (lernen-im-quartier.ch), how do I check whether I’m using the old or new system?

Have you added your own invoice templates into /wp-content/? If not, you are using the new system (within messages).

A quick way it to look at the URL of the invoice, if it has /?ee=launch_invoice it’s the old system.

The support post ‘Reformat registrant address’ 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