Support

Home Forums Event Espresso Premium Display number of tickets purchased by individual in attendee list

Display number of tickets purchased by individual in attendee list

Posted: October 25, 2016 at 7:58 am

Viewing 5 reply threads


J Baalbergen

October 25, 2016 at 7:58 am

I need to do exactly the same as in this topic.

Unfortunately I don’t know anything about PHP programming but I very much want to give it a try. I changed both templates. Do I have to place them in the main folder of my theme?
And I don’t understand the last paragraph. Do I have to add $group_size to the attendee shortcode?


Josh

  • Support Staff

October 25, 2016 at 11:36 am

Do I have to place them in the main folder of my theme?

Yes.

And I don’t understand the last paragraph. Do I have to add $group_size to the attendee shortcode?

No. You’ll actually add more code to the template to the spot where you want that number to be displayed. The code will look something like this:

<?php echo $group_size; ?>


J Baalbergen

October 26, 2016 at 2:39 am

Dear Josh, I thought I did all the things that you describe, but now a syntax error appears:

Parse error: syntax error, unexpected ‘)’ in /home/users/despyftp/despylder.nl/wp-content/themes/catch-evolution-pro/content-espresso_event_attendees.php on line 23

This is that part of my new content template:

22 <?php do_action( ‘AHEE__content-espresso_event_attendees__before’, $contact, $show_gravatar ); ?>
23 <?php $group_size = $contact->get_most_recent_registration_for_event( $event->get(‘EVT_ID’))->get(‘REG_group_size’) ); ?>
24

  • <?php echo $gravatar . ‘ ‘ . $contact->full_name(); $group_size; ?>
  • 25 <?php do_action( ‘AHEE__content-espresso_event_attendees__after’, $contact, $show_gravatar ); ?>


    Tony

    • Support Staff

    October 26, 2016 at 5:10 am

    Hi there,

    There is an additional closing bracket on line 22.

    So on line 22 you need to remove the ) right before the ; so it becomes this:

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

    Also, this:

    <?php echo $gravatar . ‘ ‘ . $contact->full_name(); $group_size; ?>

    will not output $group_size, try:

    <?php echo $gravatar . ‘ ‘ . $contact->full_name(). ' - ' . $group_size; ?>


    J Baalbergen

    October 27, 2016 at 2:06 am

    Hello Tony,

    Now it’s perfect! Thank you (and Josh) very much.

    Kind regards, Jolanda


    Tony

    • Support Staff

    October 27, 2016 at 6:42 am

    You’re most welcome 🙂

    Viewing 5 reply threads

    The support post ‘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