Event bookings variables
It is possible to display registrations for an event in an email template.
Because there can be multiple registrations for an event, the output must be shown per registration. This can be done by using the variables below within a so-called 'loop'. We create this loop with the code <!-- BEGIN event_bookings --> and <!-- END event_bookings -->. Between these tags, the variables below can be used.
The variables below are specifically built to display registrations for events.
| Variable | Description | Example |
|---|---|---|
| {event_bookings.BOOKING_NUMBER} | The ID (unique number) of a registration for an event (reservation number) | 1234 |
| {event_bookings.FROMDATE} | The start date of the registration, according to standard date notation | Saturday, January 1, 2000 |
| {event_bookings.FROMTIME} | The start time of the registration, according to standard time notation | 10:00 |
| {event_bookings.TILLDATE} | The end date of the registration, according to standard date notation | Saturday, January 1, 2000 |
| {event_bookings.TILLTIME} | The end time of the registration, according to standard time notation | 12:00 |
| {event_bookings.DAYS} | The number of days an event lasts (useful for series) | 3 |
| {event_bookings.HOURS} | The number of hours an event lasts | 2 |
| {event_bookings.MINUTES} | The number of minutes an event lasts | 120 |
| {event_bookings.NUMBER_OF_PLACES} | The total number of spots available for the event | 25 |
| {event_bookings.NUMBER_OF_PARTICIPANTS} | The number of participants in the registration for an event | 5 |
| {event_bookings.NUMBER_OF_PLAYERS} | The number of players registered for an event (same as participants, used in sports sector) | 5 |
An example table with registrations:
<table align="center" border="1" cellpadding="0" cellspacing="1" style="width:100%">
<tbody>
<tr>
<td>Reservation</td>
<td>Number of spots</td>
<td>Initials</td>
<td>First name</td>
<td>Last name</td>
</tr>
<!-- BEGIN event_bookings -->
<tr>
<td>{event_bookings.BOOKING_NUMBER}</td>
<td>{event_bookings.NUMBER_OF_PLACES}</td>
<td>{event_bookings.INITIALS}</td>
<td>{event_bookings.FIRSTNAME}</td>
<td>{event_bookings.LASTNAME}</td>
</tr>
<!-- END event_bookings -->
</tbody>
</table>
Detail and option rows per booking
Within the event_bookings loop, the detail rows (price lines) and the booked options of each booking are also available as sub-loops:
<!-- BEGIN event_bookings -->
<tr><td>{event_bookings.BOOKING_NUMBER}</td><td>{event_bookings.FULLNAME}</td></tr>
<!-- BEGIN detail -->
<tr>
<td>{event_bookings.detail.DETAIL}</td>
<td>{event_bookings.detail.TOTAL_NUMBER_OF_PLACES}</td>
<td>{event_bookings.detail.SUBTOTAL}</td>
<td>{event_bookings.detail.PRICE}</td>
</tr>
<!-- END detail -->
<!-- BEGIN options -->
<tr>
<td>{event_bookings.options.ID}</td>
<td>{event_bookings.options.DESCRIPTION}</td>
</tr>
<!-- END options -->
<!-- END event_bookings -->All fields that are available on a booking individually can be reached inside the loop with the event_bookings prefix. For example, {detail.SUBTOTAL} becomes {event_bookings.detail.SUBTOTAL} at event level, and {FULLNAME} becomes {event_bookings.FULLNAME}.






