- This topic has 6 replies, 2 voices, and was last updated 12 years, 11 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Number of seats reserved in the delete form
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 !
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
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 ?
[EDIT] Always returns “0”, for pending and for confirmed too.
Up !
Thanks for help !
Do you mean it works ok now? The function then works as expected?
No, unfortunately my demand is still pending and I need help to have it solved.
Can you help me ?