Hi!
On our site we have been using this code (found here: http://wp-event-organiser.com/forums/topic/display-available-ticket-count-after-re-occuring-dates/
<?php echo eo_get_the_start($date_format) . ' (' . eo_get_remaining_tickets_count( get_the_ID(), $post->occurrence_id ).' spaces left)'; ?>
to display the remaining tickets. However, recently this is causing problems because it is no longer possible to pick a date in the calendar (it jumps back to the top of the page), if we remove the code it all goes back to normal, but of course without showing the remaining number of tickets.
Secondly, we wanted to add an additional Email Field as explained in this tutorial: http://wp-event-organiser.com/blog/tutorial/using-form-api-add-additional-fields/
While it added the desired field, Emails are only sent out to the “main” Email field. Is there something else we need to do that we may have missed?
Many thanks,
André

André Vasanne
Hi André,
Where are you using that snippet, and if you remove it again, is the calendar operational? It sounds like there’s a javascript error on the page, but it’s not clear how that snippet would effect that.
Regarding the alternative e-mail, that was simply a demonstration on how to add additional fields using the API, and the plug-in doesn’t do anything with custom fields unless you tell it to.
Unfortunately there is no straightforward way to include an additional e-mail in the booking confirmation e-mail. In includes/booking-actions.php
(around line 164) there is a function: eventorganiser_notify_confirmed_booking()
this is responsible for sending a confirmation e-mail to the bookee, and also a notification e-mail to the site admin.
You can use the filter eventorganiser_notify_confirmed_booking
to over-ride that function and provide your own which does much the same, except it also includes the alternative e-mail as a recipient of the booking confirmation e-mail:
add_filter( 'eventorganiser_notify_confirmed_booking', 'my_notification_handler', 10, 2 );
function my_notification_handler( $notify, $booking_id ){
//Do notification e-mails...
//Set $notify to false to disable default behaviour
return $notify;
}

Stephen Harris
Hi Stephen,`
To show the remaining tickets I replaced <li> <?php eo_the_start($date_format) ?></li>
in event-meta-event-single.php line 92, with
<li> <?php echo eo_get_the_start($date_format) . ' (' . eo_get_remaining_tickets_count( get_the_ID(), $post->occurrence_id ).' spaces left)'; ?></li>
It is quite strange indeed since has been functioning without a problem for a few months now, if there is no solution to be found I will just restore the site to how it was a couple of days ago 🙂
And concerning the second Email, I will add the required lines of code, thank you!
-
This reply was modified 9 years, 9 months ago by
André Vasanne.
-
This reply was modified 9 years, 9 months ago by
Stephen Harris.

André Vasanne
That is strange, the only difference I can see is that the the <li>
and </li>
tags are missing – but that would be a minor mark-up issue, and I wouldn’t expect it to affect the booking calendar. Can you link to the page?

Stephen Harris
Hi, here is one of our event pages: https://segwaytours.lu/events/event/str-balade-acc-90-min-bambesch
I played around a little today and it seems that the problem comes from the latest Pro Plugin, because if I go back a couple of versions it is gone.

André Vasanne
Hey, I had to go back to a previous version of Event Organiser Pro so that the booking an the calendar on the booking page works again, I will keep you updated, but for now this will have to do as I can’t leave booking unavailable for too long.

André Vasanne