Support

Home Forums Event Espresso Premium Event Attendees (2)

Event Attendees (2)

Posted: July 20, 2017 at 9:35 am

Viewing 4 reply threads


youngjc345

July 20, 2017 at 9:35 am

The [ESPRESSO_EVENT_ATTENDEES] only shows a list of attendee names, if one attendee purchase multiple tickets, there is no indication of this on the list such as “Attendee Name (3)”.

Is there any way to add this? Not really useful if multiple tickets aren’t displayed.


Josh

  • Support Staff

July 20, 2017 at 10:51 am

Hi youngjc345,

This is possible and it involves a working knowledge of PHP programming. The main template in Event Espresso that generate the attendee list is:
content-espresso_event_attendees.php
This template can be copied over to your WordPress theme and customized.
Then, inside the custom template, you can set a variable that has the number of tickets purchased for that attendee like this:

<?php $group_size = 
 $contact->get_most_recent_registration_for_event( 
 $event->get('EVT_ID'))->get('REG_group_size');
?>

Then you echo out the $group_size variable where you want that number to be displayed. e.g.
<li><?php echo $gravatar . '&nbsp;' . $contact->full_name() . ' (' . $group_size . ')'; ?></li>


youngjc345

July 21, 2017 at 3:29 am

Worked Great! thanks! it now lists the primary and below lists the primary and the number of tickets in the group.
<br>
i.e <br>
First Name<br>
First Name (3)<br>

Is this the best that it gets?

Thanks again!


Tony

  • Support Staff

July 21, 2017 at 4:21 am

It depends on what you mean.

You don’t need to have both the Primary Registrant and then the Primary Registrant (X) in the list, you could have it as a single line.

You’ve added the line of code Josh gave as an example of the output below the original, which is why you have both. You can remove the original line and just uses Josh’s code if you only want the details on one line.


youngjc345

July 21, 2017 at 4:55 am

perfect! thanks

Viewing 4 reply threads

The support post ‘Event Attendees (2)’ 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