Inserts a booking form for multiple events on a regular wordpress page. Accepts the following arguments:
id
: a comma-separated list of event ID’s you want to show the booking form for.category_id
: a comma-separated list of category ID’s you want to show the booking form for. Can be used instead of the id-parameter to avoid needing to look up all event id’srecurrence_id
: a recurrence ID you want to show the booking form for. Can be used instead of the id-parameter to avoid needing to look up all event id’s and is useful e.g. when running a daycare centre. The recurrence ID is shown in the EME admin screen when editing events.scope
: show the multibooking form only for events matching the defined scope. (see the eme_events shortcode doc for the explanation of this option, it is identical). This can also be used together with the category_id option.order
: influences the order in which the events to book are shown (only used if also category_id or scope options are used). See the eme_events shortcode doc for the explanation on this option.template_id
andmultiprice_template_id
,template_id_header
,template_id_footer
: use a predefined format template
for the booking form header, footer or list entry. See below for more explanation.
If template_id is not provided, the default of#_EVENTNAME #_STARTDATE #_STARTTIME: #_SEATS <br />
will be taken.
If template_id_footer is not provided, the default ofLastname: #_LASTNAME<br />Firstname: #_FIRSTNAME<br />Email: #_EMAIL
will be taken.<br />
Concerning multiprice_template_id : this is used as template in the list of events if the event is multiprice and the value is not 0. The default is 0 in which case template_id is used as usual. If all events are identical in setup (multiprice or not), then the use of template_id is sufficient, this parameter is only to be used if you have a mix of regular priced events and multiprice events in your multibooking form.register_empty_seats
: by default empty registrations are not stored for multibookings, even for attendance events. Set this to 1 if you want to store 0-seats too.only_if_not_registered
: if 1, this will only show the matching events for which the visitor hasn’t registered yetonly_one_event
: if value=1 (the default is 0) this will cause a dropdown of the matching events to show, and not a select-box list. The template_id (if used) shoould not contain #_SEATS (nor html code, since it is shown inside the dropdown).only_one_seat
: if value=1 (the default is 0) this will cause the min/max number of seats to book to be 1 for all matching events to show, and thus hiddensimple
: if value=1 (the default is 0) this will render a select of the matching events to show (like the default). Next to that, if you set the minimum and max seats to book=1 (in the RSVP settings of the relevant events), the seats dropdown will not be shown, causing a clean interface where people can just select events to attend. Setting simple=1 is identical to using the shortcodeeme_add_simple_multibooking_form
all_events
: in combination with simple=1, if all_events=1 is set, this will cause all events to be selected when booking (in fact hiding the list of events).
Examples:
[eme_add_multibooking_form id=1,7,8 template_id=3 template_id_header=7 template_id_footer=9]
[eme_add_multibooking_form recurrence_id=2 template_id=3 template_id_header=7 template_id_footer=9]
[eme_add_multibooking_form scope=this_week template_id=3 template_id_header=7 template_id_footer=9]
[eme_add_multibooking_form scope=this_week only_one=1 template_id_header=7 template_id_footer=9]
[eme_add_multibooking_form simple=1]
(the most simple incantation)
Usage:
When showing one booking form for multiple events, you need to think about what you want to show where. This is the reason why I splitted the booking form in 3 using templates: one template for the header, that needs to have specific placeholders (where asking for the name, email, … see below), one template for the booking for 1 event (with some placeholders being ignored, like #_NAME, this template is repeated for each event in the series), and one for the footer.
The placeholders you can use are described here, those that can only be used in a header/footer template or entry are indicated as such.
Let’s give an example, which makes things much more clear. A small headsup: first try with simple=1 (and if wanted, min and max seats to book=1), and ignore the example as a starter. The example below is mostly for simple=0 (the original default).
– Create a template called “multi booking form header” with content:
Lastname: #_LASTNAME
Firstname: #_FIRSTNAME
Email: #_EMAIL
<ul>
Explanation: the header of the form, where we’ll ask for the name and email, and start a html “unnumbered list” (the <ul>)
– Create a template called “multi booking form footer” with content:
</ul>
Please fill in the code displayed here: #_CAPTCHA
#_SUBMIT
Explanation: the footer of the form, where we close the html “unnumbered list” (the </ul>), ask for the captcha and show the submit button
– Create a template called “multi booking form entry” with content:
<li>
#_{d/m/Y} #_24HSTARTTIME: #_SEATS
</li>
Explanation: one entry in the html “unnumbered list” (<li> and </li>), where we show the date and time (formatted to our liking) and a dropdown asking for the number of seats to book.
(btw, you might like the new event placeholders #_STARTDATE and #_STARTTIME, which look at your WP settings for the date/time formatting)
– Then add this to a regular wordpress page (with the correct template and event id’s):
This will then result in a form that first asks for the name and email, then a regular html “unnumbered list” (the <ul>) showing the event start date and time and a seat-dropdown for all the events you selected, and then in the footer will ask for the captcha and show the submit button.
Multibooking mails (only needed in case simple=0 !!!)
The mails being sent to the respondent and contact person are based on the templates configured for the first event in the series mentioned, so you might want to check the mail templates for that event (easiest is just to use the same mail templates for all the mentioned events). Also, the RSVP placeholders #_MULTIBOOKING_TOTALPRICE, #_MULTIBOOKING_SEATS, #_MULTIBOOKING_DETAILS_TEMPLATE{xx} and #_IS_MULTIBOOKING have been created so you can inform in a simple manner which events were booked for, see the documentation concerning RSVP placeholders.
Remark: multibooking mails are only sent for the initial booking, so if afterwards you mail people for approval or payment notifications, those are individual mails.
For example, to send mails for a multibooking to the respondent, I create 2 templates:
– a template called “multibooking details” with content (use regular RSVP and event placeholders):
#_RESPSEATS seats for #_EVENTNAME on #_STARTDATE (price: #_TOTALPRICE)
This template will be used by the placeholder #_MULTIBOOKING_DETAILS_TEMPLATE (see below), which will parse this template for each individual booking done in the multibooking form.
– a template called “multibooking respondent mail” with content:
You booked #_MULTIBOOKING_SEATS seats for a total of #_MULTIBOOKING_TOTALPRICE #_CURRENCY.
The details can be found below:
#_MULTIBOOKING_DETAILS_TEMPLATE{16}
(with the argument for the placeholder #_MULTIBOOKING_DETAILS_TEMPLATE the id of the corresponding template).
This then results in e.g. a mail sent to the respondent with content:
You booked 6 seats for a total of 60.00 EUR.
The details can be found below:
1 seats for testest on 29/08/2014 (price: 10.00)
1 seats for testest on 02/09/2014 (price: 10.00)
1 seats for testest on 03/09/2014 (price: 10.00)
1 seats for testest on 04/09/2014 (price: 10.00)
1 seats for testest on 05/09/2014 (price: 10.00)
1 seats for testest on 06/09/2014 (price: 10.00)