Events Made Easy Forums How do I … Number of seats reserved in the delete form

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #43637
    Anonymous
    Inactive

    Hi all,

    I thought it would be great to mention the number of reserved seats in the delete form.

    I managed to show it, adding the following lines added in the function eme_delete_booking_form($event_id) (eme_rsvp.php) :

    Just before the creation of the table, add :

    $bookings =  eme_get_bookings_for($event_id);
    foreach ($bookings as $booking) {
    if ( $bookerEmail = $booking['person_email'] ) $bookingseats1 = $booking['booking_seats'];
    }

    And inside the table, add :

    <tr><th scope='row'>".__('Seats', 'eme') ." :</th><td><input type='text' name='bookerseats' value='$bookingseats1' $readonly /></td></tr>

    Maybe there is something better, but this works.

    Enjoy !

    #49148
    Franky
    Keymaster

    Better/easier would be to use:

    $bookingseats1 = eme_get_booked_seats_by_person_event_id ($booking['person_id'], $event_id);

    Of course this only works for wordpress registered users.

    While you’re at it, use this code in a filter for the delete form, so you don’t have to change the code. See http://www.e-dynamics.be/wordpress/?cat=41

    #49149
    Anonymous
    Inactive

    Thanks Franky,

    I have tried, but it returns “0” instead” of booked seat number when booking is pending ….

    And for the filter, I do not know what to do , if you can help ?

    #49150
    Anonymous
    Inactive

    [EDIT] Always returns “0”, for pending and for confirmed too.

    #49151
    Anonymous
    Inactive

    Up !

    Thanks for help !

    #49152
    Franky
    Keymaster

    Do you mean it works ok now? The function then works as expected?

    #49153
    Anonymous
    Inactive

    No, unfortunately my demand is still pending and I need help to have it solved.

    Can you help me ?

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top