• Resolved werkgroepinternet

    (@werkgroepinternet)


    I want to use the output of bookings-event-printable.php as a printable list of attendees so I can check them in at my event. Therefore I need the list to be alphabetical organized on Name.

    I already copied the bookings-event-printable.php to themefolder/plugins/events-manager/templates/ and added tickets (instead of the places) to the new template. This is already working great.

    But the list is organized on date of booking, but I want it to be organized (sorted/ordered) in alphabetical way based on the name of the person of the booking. Any idea how I can achieve this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • caimin_nwl

    (@caimin_nwl)

    You should be able to do that by using this template:
    https://pastebin.com/xVkLD7sT

    Thread Starter werkgroepinternet

    (@werkgroepinternet)

    Thank you for your quick reply. The list is now alphabetical on names of the attendees. Sadly, the code for displaying the tickets of the attendees isn’t working anymore:

    <?php foreach($EM_Booking->get_tickets_bookings() as $EM_Ticket_Booking): ?>
    <?php /* @var $EM_Ticket_Booking EM_Ticket_Booking */
    echo $EM_Ticket_Booking->get_ticket()->name;
    ?><br><?php endforeach; ?>

    Can this still be done in another way?

    caimin_nwl

    (@caimin_nwl)

    Do you want to keep the information shown between the

     foreach($bookings as $EM_Booking) {
    
    ...
    
    }

    tags in the snippet I suggested? Or do you want to replace it?

    Thread Starter werkgroepinternet

    (@werkgroepinternet)

    Well, the alphabetical list on names is great, so I definitely want to keep the code you suggested. But I also want to include the tickets attendees bought in the same list, which could be displayed with the code I gave.

    Is there a way to combine both codes? So the output reads alphabetical list on names of attendees with the corresponding names of the tickets they bought?

    Thread Starter werkgroepinternet

    (@werkgroepinternet)

    I am sorry, I forgot to include in my I initial question that I wanted to order the list of attendees alphabetically, and display the names of the tickets they bought. I’ll mark this question as resolved and start a new topic with this question.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Alphabetical order for Name on “bookings-event-printable.php”’ is closed to new replies.