Support

Home Forums Event Espresso Premium Show number of tickets in email

Show number of tickets in email

Posted: January 23, 2020 at 2:13 pm


matzek33

January 23, 2020 at 2:13 pm

Hi there,
is there a possibility that the registration confirmation you get by email shows how many tickets the person bought?


Tony

  • Support Staff

January 23, 2020 at 2:23 pm

Hi there,

Is this in the admin or registrant context?

To answer your question, yes, it is possible and you can use [TKT_QTY_PURCHASED] in the Main content, however it depends on the specific email and context which you are sending if that is a valid shortcode or not.


matzek33

January 23, 2020 at 2:30 pm

Hi there,

unfortunately I don’t know what you mean.


Josh

  • Support Staff

January 23, 2020 at 2:36 pm

Let’s try to clarify then. When you wrote:

is there a possibility that the registration confirmation you get by email

May I ask, who is the “you” that gets the email? The person registering or is it the person organizing the event? Or are you asking about both emails?


matzek33

January 23, 2020 at 2:41 pm

If a user buys several tickets on my site via Event Espresso, I as the organizer will receive an email with the user’s contact details. If this email says how many tickets he bought, that would be great. So far, it always looks like the user’s contact details at e.g. 3 tickets, also 3 times in the mail.


Josh

  • Support Staff

January 23, 2020 at 3:08 pm

Here’s how you can add the number to your email:

1) You go to your site’s Event Espresso > Messages > Default Message Templates page
2) In the row “Registration Approved”, click on the “Edit Event Admin” link
3) Add:
Number of Tickets: [TKT_QTY_PURCHASED]
to the Main Content section of the template
4) Click Save


matzek33

January 25, 2020 at 12:24 am

Hi there,
that worked great. Thanks for your help. There is one more flaw. If a user buys 3 tickets, I as the organizer will receive the email with the registration confirmation. In this mail, the contact details of the user are listed as often as he bought tickets, in this case 3 times. Can you change that the contact details are only listed once, no matter how many tickets the user bought?


Josh

  • Support Staff

January 27, 2020 at 6:47 am

Hi,

Can you share a link to the event in question so we can see how it’s registration form is set up? The answer will depend on how that event’s form was set up.


matzek33

January 27, 2020 at 12:15 pm

Please:

https://feez-om-maat.de/index.php/feez-om-maat-kartenbestellung/


Tony

  • Support Staff

January 28, 2020 at 7:51 am

Hi there,

Whilst it is possible to force EE to display only the ‘Primary Registrant’ details on that email, your event is set up to collect registration questions for each individual ticket.

That means a user could select 3 tickets and input different details for each ticket but you, as the event admin, would only see the ‘first’ registrant’s details and then a qty.

I can give you some details on how to set that up if it will work for you?


matzek33

January 28, 2020 at 2:01 pm

Hi there. That would be great if you could explain that to me.


Tony

  • Support Staff

January 29, 2020 at 4:57 am

Ok.

You would need to edit the message template, assuming you are using the default templates go to:

Event Espresso -> Messages -> Default Message Templates -> Registration Approved -> Edit Event Admin

Go to the ATTENDEE_LIST section and copy all of the contents within that section.

Now, in the EVENT_LIST, switch to ‘Text’ mode on the editor and find the [ATTENDEE_LIST] shortcode.

Replace that shortcode with the contents of ‘ATTENDEE_LIST’ that you just copied.

Like so – https://monosnap.com/file/QLQ8YSwRsuQP5VFGPnhLZM05OIXZP9

Now, you’ll need to switch out all of the shortcodes used in that new text for their ‘Primary Registrant’ equivalent.

For example:

[FNAME] => [PRIMARY_REGISTRANT_FNAME]
[LNAME] => [PRIMARY_REGISTRANT_LNAME]
[REGISTRATION_CODE] => [PRIMARY_REGISTRANT_REGISTRATION_CODE]

To show a few, but there are a couple more.

(You’ll find a list of all available shortcodes for each section by clicking on the icon)

We don’t actually have a primary registrant equivalent for [EDIT_ATTENDEE_LINK] (which takes the admin directly to edit the registration. The closest would be:

[PRIMARY_REGISTRANT_FRONTEND_EDIT_REG_LINK]

Which takes you to the front end of the site, as a user would.

So your event list section will end up with something like this:

<p class="callout"><strong>
Event: [EVENT_LINK]
Venue: <a href="[VENUE_URL]" target="_blank" rel="noopener noreferrer">[VENUE_TITLE]</a> ([VENUE_CITY], [VENUE_STATE])
</strong></p>

<h2>Registrant Details:</h2>
<h4><a href="[PRIMARY_REGISTRANT_FRONTEND_EDIT_REG_LINK]">[PRIMARY_REGISTRANT_FNAME] [PRIMARY_REGISTRANT_LNAME]</a></h4>
        <ul>
<li><strong>Registration Code:</strong> <a href="[PRIMARY_REGISTRANT_FRONTEND_EDIT_REG_LINK]">[PRIMARY_REGISTRANT_REGISTRATION_CODE]</a></li>
<li><strong>Tickets:</strong></li>
</ul>
<ul>[PRIMARY_REGISTRANT_TICKET_LIST]</ul>
<strong>Questions & Answers</strong>
<ul>[PRIMARY_REGISTRANT_QUESTION_LIST]</ul>
<hr />

You’re template now basically skips the ‘ATTENDEE_LIST section and outputs the primary reg directly. THe _LIST sections loop over all of the objects passed to them so in this case because you have 3 ‘attendees’ you can’t use that section.


matzek33

January 29, 2020 at 1:16 pm

Hi there. Unfortunately, that doesn’t work. I always get the following error when saving:

The following shortcodes were found in the “[EVENT_LIST]” field that ARE not valid: [PRIMARY_REGISTRANT_FRONTEND_EDIT_REG_LINK)”> [PRIMARY_REGISTRANT_FNAME],[PRIMARY_REGISTRANT_FRONTEND_EDIT_REG_LINK)”> [PRIMARY_REGISTRANT_REGISTRATION_CODE]


matzek33

January 29, 2020 at 1:49 pm

Somehow I can’t insert this as a quote, so here is the link to a screenshot:

Screenshot


matzek33

January 29, 2020 at 1:49 pm

https://www.directupload.net/file/d/5713/j7554pes_png.htm


matzek33

January 29, 2020 at 1:51 pm

Screenshot


Tony

  • Support Staff

January 29, 2020 at 2:12 pm

Recheck your shortcodes, you have a couple that aren’t valid:

[PRIMARY_REGISTRANT_FRONTEND_EDIT_REG_LINK)

Is not valid:

[PRIMARY_REGISTRANT_FRONTEND_EDIT_REG_LINK]

Is valid.

The shortcode validation is looking for and opening [ and then a closing ], anything between is considered a shortcode. Which means:

[PRIMARY_REGISTRANT_FRONTEND_EDIT_REG_LINK)”> [PRIMARY_REGISTRANT_FNAME]

Is one long shortcode as the closing bracket on the first is not matched.


matzek33

January 29, 2020 at 3:02 pm

Hi there.
I would never have thought of that.
I have rarely seen such great support.
Thank you for your patience and the great help.
A question at the end. Now that everything works as I wanted it, I carried out the update that was shown to me on the plugin page. After that, all my adjusted things were gone. Can you somehow avoid this or do I actually have to reset everything after every update?


Tony

  • Support Staff

January 29, 2020 at 3:08 pm

Which specific adjusted things are we referring to?

Your custom message templates should not have been altered during an update.


matzek33

January 29, 2020 at 3:30 pm

It’s exactly about the customized message templates. An update for Event Espresso was displayed in the WordPress dashboard under Plugins. I did that and then everything was gone.


Tony

  • Support Staff

January 29, 2020 at 3:45 pm

Which version of EE4 did you update from?

I can’t think of any reason for message templates to vanish, especially on an update that requires no database migrations.

When you say gone, were the templates completely empty, or back to default?


matzek33

January 29, 2020 at 3:57 pm

I’m not sure. I think it has been updated from version 4.10.2.p to 4.10.3.p. After that, the standard message templates were in there again.


Tony

  • Support Staff

January 29, 2020 at 4:10 pm

Yeah that’s really strange, there were no migrations from .2 to .3

We update the from say 4.9 to 4.10 when we run migrations on the database, but single point released wont make those changes.

I’ll run some tests to see if I can reproduce but I’m at a loss as to why that would happen.

Note you can confirm the specific version you updated from in Event Espresso -> Maintenance -> System information -> ee_activation_history


Tony

  • Support Staff

January 29, 2020 at 4:14 pm

I should explain a little here, the message templates are generated on activation and then stored in the database. That’s how we are able to allow customizations to the templates in the admin.

EE doesn’t replace those templates on updates and as they are stored in the database I would only expect some kind of possible issues to arise if we are messing with said database in some way (migration data) and not simply updating the plugin.

The support post ‘Show number of tickets in email’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Tony 2 months, 1 week ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!