WordPress.org

Support

Support » Plugins and Hacks » Events Manager » [Resolved] [Plugin: Events Manager] Attendee List with Comment

[Resolved] [Plugin: Events Manager] Attendee List with Comment

Viewing 3 replies - 1 through 3 (of 3 total)
  • Figured it out! Ended up creating a new version of the attendeelist.php template file.

    I hope the below helps someone else!

    <?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="*">Comment</th></tr></thead><tbody>
    	<?php
    	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->booking_comment. ' </td></tr>';
    		}
    	}
    	?>
    	</tbody></table>
    	<?php
    }
    Plugin Author Marcus

    @netweblogic

    NetWebLogic Support

    that’s the way 🙂

    l8knight

    @l8knight

    I am also trying to update the list. I want to show:

    DisplayName Ticket_Name Booking_Comment

    Right now I can get the comment, the person’s real name is shown instead of display name.

    My code:

    <?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() .'</li>';
    
    		}
    
    	}
    
    	?>
    
    	</tbody></table>
    
    	<?php
    
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] [Plugin: Events Manager] Attendee List with Comment’ is closed to new replies.
Skip to toolbar