Attendee List w/User Display Name and Ticket Name
-
Since I posted my question in a resolved thread I am starting a new topic as the issue is open:
I am trying to modify the attendeelist.php file so that it displays a list of attendees as:
Display_Name Ticket_Name Booking_Comment
I get the booking comment only. Not sure how to pull the user’s display name from the wp_users table or the Ticket_Name from the em_tickets table.
Here is the code I have:
<?php /* @var $EM_Event EM_Event */ $people = array(); $EM_Bookings = $EM_Event->get_bookings(); if( count($EM_Bookings->bookings) > 0 ){ ?> <table cellpadding="0" cellspacing="0" class="rsvp-comment-table" ><thead><tr><th class="rsvp-name" width="150">Name</th><th class="rsvp-comment" width="*">Role</th><th class="rsvp-comment" width="*">Comment</th></tr></thead><tbody> <?php $guest_bookings = get_option('dbem_bookings_registration_disable'); $guest_booking_user = get_option('dbem_bookings_registration_user'); foreach( $EM_Bookings as $EM_Booking){ if($EM_Booking->status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){ $people[] = $EM_Booking->get_person()->ID; echo '<tr><td>'. $EM_Booking->get_person()->get_name() .' </td><td> ' . $EM_Booking->ticket_name. ' </td><td> ' . $EM_Booking->booking_comment. ' </td></tr>'; }elseif($EM_Booking->status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){ echo '<tr><td>'. $EM_Booking->get_person()->get_name() .'</td></tr>'; } } ?> </tbody></table> <?php }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Attendee List w/User Display Name and Ticket Name’ is closed to new replies.