[eme_add_multibooking_form]

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’s
  • recurrence_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.
  • 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 #_{d/m/Y} #_24HSTARTTIME: #_SEATS <br /> will be taken.
    If template_id_header is not provided, the default of Lastname: #_LASTNAME<br />Firstname: #_FIRSTNAME<br />Email: #_EMAIL

    <br /> will be taken.

  • 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.
  • scope: show the multibooking form for events matching the selected scope. See the eme_events shortcode for all possible scope values.
  • only_if_not_registered: if 1, this will only show the matching events for which the visitor hasn’t registered yet
  • only_oneif value=1 (the default is 0) this will cause a dropdown of the matching events to show, and not a select-box list. The parameter template_id is ignored in this case.

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]

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.

– 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
The mails being sent to the respondent and contact person are based on the first event in the series mentioned, so you might want to check the mail templates for that event. 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)