Support

Home Forums Event Espresso Premium Custom Email: Number of persons registered

Custom Email: Number of persons registered

Posted: October 26, 2012 at 5:07 pm

Viewing 17 reply threads


amansker

October 26, 2012 at 5:07 pm

I am allowing a person to register multiple people for one event and want the confirmation email (to the person registering) to contain the amount of people he has registered for. I don’t see a short code. The amount IS in the ADMIN confirmation. I do see this in the actual email: NUMBER person(s.


bwold

October 26, 2012 at 5:22 pm

Hah — I was just searching for almost the exact thing: we’re using the MER plugin, and I want the email to show the ticket(s) they’ve purchased: both type and quantity. Perhaps a reply will solve both our issues at once…


amansker

October 26, 2012 at 5:26 pm

version 3.1.27


amansker

October 26, 2012 at 5:27 pm

I found email.php in an earlier version, but not 3.1.27.


Wealth Mentors

October 28, 2012 at 10:28 pm

This will be useful for us too… how can this information be shown on the ticket?


Dean

October 29, 2012 at 1:45 am

Hello Amansker,

This isnt doable with current shortcodes, but a simple code change should resolve it. Note that this is to a core file so updates will over write it. I’ll look at getting this added to future updates for you all.

event-espresso/includes/functions/email.php

In the email.php you will see a long list of shortcodes. The last one

"[add_to_calendar]"

needs to have a comma placed after it, and then on the next line add a new shortcode for example "[attendee_count]"

Do not add a comma after the new shortcode.

Scrolling down you will see a list for ReplaceValues. Scroll to the bottom of that list apply_filters('filter_hook_espresso_display_add_to_calendar_by_attendee_id', $data->attendee->id)

and again add a comma and a new line.

Add this code $attcount= substr($data->attendee->quantity, 0, -4) and save.

Now you can add the shortcode [attendee_count] to your emails, which will display the number of attendees purchased.

@Wealth Mentors, that is a separate question, but it follows a similar result. in the functions.php of the ticketing add on follow a similar process as above, however just use $data->attendee->quantity in the ReplaceValues list.


Wealth Mentors

October 29, 2012 at 8:26 am

Not successful with the Ticket. Can you give more detailed instructions eg what is the last line of the list? Need to put comma after adding “$data->attendee->quantity”?


Dean

October 29, 2012 at 8:49 am

Hi

After "[seatingchart_tag]", add your shortcode, i.e. "[myshortcode]"

After $data->attendee->quantity, add the $data->attendee->quantity


bwold

October 29, 2012 at 10:47 am

No luck here. Carefully added and double-checked the values in email.php as described above. Set my email template to show Total tickets: [attendee_count]. Resulting email shows “Total tickets:” — then nothing where the attendee count would be.


Wealth Mentors

October 30, 2012 at 3:13 am

I don’t see the fields you mentioned. Maybe developer has done something to it. Here is our ticket functions file http://wealthmentors.com/functions.zip


Dean

October 30, 2012 at 3:31 am

@Wealth Mentos, check here, for the modified code http://pastebin.com/1TCRVi4D


@bwold
It definitely works with 3.1.27.P I’ve just retested it. Can you paste your code somewhere (pastebin etc)?


Wealth Mentors

October 30, 2012 at 8:07 am

Thanks Dean… it’s perfect now!


bwold

October 30, 2012 at 10:57 am

We’re on 3.1.27.1P but we’re also using Multi Event Registration. We have multiple rates for each event (VIP, Adult, Senior, Child) and also multiple event days. Might that affect the listing of the total tickets?

Anyway, here’s our code for email.php: http://pastebin.com/8b5A6yUL


Dean

October 31, 2012 at 4:55 am

@bwold I am looking into this, but yeah it could well be due to the MER function. I will see if I can find a workaround, if not I will have to leave it with the developers. I will let you know.


bwold

November 15, 2012 at 5:20 pm

Hello, just checking back. Any resolution on this?


Dean

November 15, 2012 at 11:43 pm

Hi Bwold,

Haven’t forgotten you, this is still on my desk. I haven’t successfully got it working with MER yet, it may be out of my coding league. I want to take another look at this today, but if not I will raise a ticket on it, but the developers work on a priority basis so I can’t say how quickly they will be able to look at it.


LEB

November 16, 2012 at 1:17 pm

We faced a similar issue (need the # of Tickets) as a tag so we can use in email. We chose not to change the code. Instead, set ALLOW GROUP REGISTRATIONS to NO. Then create a QUESTION asking for the NUMBER OF TICKETS needed. That special question has a tag you can use in emails, etc.
You can see this question in the ATTENDEE list. You can then modify the # of TICKETS (Which will default to 1) to the actual number desired
Worked for our application with no code changes.


Dean

November 20, 2012 at 4:58 am

@Lawrence Thats a pretty good workaround, though it will only work in certain situations, where the additional attendee details aren’t required. But still interesting workaround, thankyou for sharing!


@Bwold
Sorry this one has me stumped, I will raise a developer ticket to look at amending for future versions.

Viewing 17 reply threads

The support post ‘Custom Email: Number of persons registered’ 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