Support

Home Forums Event Espresso Premium Need to display number of tickets purchased by individual in attendee list

Need to display number of tickets purchased by individual in attendee list

Posted: May 18, 2016 at 12:19 pm

Viewing 1 reply thread


Lisa Rath

May 18, 2016 at 12:19 pm

We’ve had multiple requests from our event hosts to provide a simple way for them to check who has registered for a particular event.

So, my plan is to manually create a separate web page for each event and use the shortcode [ESPRESSO_EVENT_ATTENDEES event_id=your_event_id].

However, if someone has purchased multiple tickets, that is not reflected in the list generated by that shortcode. Therefore, it does not necessarily reflect the total number of registrations.

How can I generate an attendee list that also shows the number of tickets purchased by each registrant?

Thanks!


Josh

  • Support Staff

May 18, 2016 at 3:29 pm

Hi Lisa,

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 content- 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>

  • This reply was modified 8 years, 1 month ago by Tony. Reason: Removed additional bracket
  • This reply was modified 7 years, 4 months ago by Josh. Reason: updated code example and instructions
Viewing 1 reply thread

The support post ‘Need to display number of tickets purchased by individual in attendee list’ 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