Posted: July 5, 2018 at 7:29 am
related to an old issue An attendee bought 2 tickets and a few days later he bought another 2 for the same event. Unfortunately the displayed number on my list was 2. Jolanda |
|
Hi Jolanda, May I ask does their second purchase show up on the list on a separate line? Also, if you can post the entire contents of your customized content-espresso_event_attendees.php template that will help provide some context. |
|
Hello Josh, There’s only 1 line on the list. Here’s the content of the file: <?php <?php do_action( ‘AHEE__content-espresso_event_attendees__after’, $contact, $show_gravatar ); ?> |
|
Hi there, The ESPRESSO_EVENT_ATTENDEES shortcode pulls all of the contacts for registrations assigned to an event, so if you have multiple ‘group’ registrations assigned to the same contact, you still only pull a single contact. Then notice this line:
What that means if a user registers a group of 2 tickets on the event, at that point the latest registration will be one of those registrations from a group registration of 2. If they then return at a later date and register another group of, let say 3 tickets, the above will pull the latest registration from that group and return 3. Is not a group registration of 5 as they are separate groups and the ‘latest’ registration is only assigned to the second so the above code is working as expected. You could change the above line of code to be something like this:
Which pulls all of the primary registrants the current contact has on the event, counts the group size for all of them and combines them (meaning in the above example I gave you the group_size would be 5) |
|
Hi Tony, |
|
Great 🙂 Just to note the above code will only work if the user was the primary registrant, as in they were the first details entered on the registration form. |
|
The support post ‘incorrect number of tickets shown in 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.