Title: Booking Table Code Change Request
Last modified: August 21, 2016

---

# Booking Table Code Change Request

 *  Resolved [ngkokkee](https://wordpress.org/support/users/ngkokkee/)
 * (@ngkokkee)
 * [13 years ago](https://wordpress.org/support/topic/booking-table-code-change-request/)
 * Hi,
 * I have made some modifications to `em-bookings-table.php` to help me display 
   and export the bookings in individual ticket type level (i.e. 1 user may make
   multiple ticket types for 1 event)
 * [http://wordpress.org/support/topic/display-and-export-individual-ticket-types-in-manage-bookings?replies=4](http://wordpress.org/support/topic/display-and-export-individual-ticket-types-in-manage-bookings?replies=4)
 * There is a function that I have to keep patching because the original code doesn’t
   work correctly.
 * Could you update output_table() to fix the code in
 *     ```
       if( $this->show_tickets ){
       }
       ```
   
 * Add code to print additional </tr><tr> for rows after the first row. This is 
   my ugly patch if you want to have a reference
 *     ```
       if( $this->show_tickets ){
           <strong>$loopcount = 0;</strong>
           foreach($EM_Booking->get_tickets_bookings()->tickets_bookings as $EM_Ticket_Booking){
               <strong>$loopcount++;
       	if ($loopcount > 0) {
                   echo '</tr><tr>';
               }</strong>
               ?><td><?php echo implode('</td><td>', $this->get_row($EM_Ticket_Booking)); ?></td><?php
           }
       } else {
       ```
   
 * Regards
    Kok Kee
 * [http://wordpress.org/extend/plugins/events-manager/](http://wordpress.org/extend/plugins/events-manager/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [ngkokkee](https://wordpress.org/support/users/ngkokkee/)
 * (@ngkokkee)
 * [13 years ago](https://wordpress.org/support/topic/booking-table-code-change-request/#post-3681406)
 * Took out the strong emphasis since it doesn’t show up in the code block.
 *     ```
       if( $this->show_tickets ){
           $loopcount = 0;
           foreach($EM_Booking->get_tickets_bookings()->tickets_bookings as $EM_Ticket_Booking){
               $loopcount++;
       	if ($loopcount > 0) {
                   echo '</tr><tr>';
               }
               ?><td><?php echo implode('</td><td>', $this->get_row($EM_Ticket_Booking)); ?></td><?php
           }
       } else {
       ```
   
 *  [agelonwl](https://wordpress.org/support/users/angelonwl/)
 * (@angelonwl)
 * [13 years ago](https://wordpress.org/support/topic/booking-table-code-change-request/#post-3681478)
 * thanks, we will going to check this out however can I know what do you mean by“
   the original code doesn’t work correctly.” ? seems to be working fine on my test
   site.
 *  Thread Starter [ngkokkee](https://wordpress.org/support/users/ngkokkee/)
 * (@ngkokkee)
 * [13 years ago](https://wordpress.org/support/topic/booking-table-code-change-request/#post-3681480)
 * If you have multiple ticket types in one booking, the tickets will be printed
   out sequentially in one single row.
 * <ticket 1><ticket 2><ticket 3>
 * instead of
 * <ticket 1>
    <ticket 2> <ticket 3>
 * Just allow multiple ticket types and set the show_tickets flag to true in the
   class constructor and you will see this effect. The code prints </tr><tr> to 
   break them into rows.
 *  Plugin Author [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * (@netweblogic)
 * [13 years ago](https://wordpress.org/support/topic/booking-table-code-change-request/#post-3681504)
 * problem with the above is that it ruins the flow of pagination.
 * interesting idea though… when we do revamp that table will think of ways to use
   this (e.g. as an expanded view or something)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Booking Table Code Change Request’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=1039078)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/booking-table-code-change-request/#post-3681504)
 * Status: resolved