<!-- Full entities from the database. Note that we allow the full arrAttendee
and arrContact to be passed through, for testing. -->
<ss:logic:variable as="arrAttendee" value="[? ($arrAttendee) ? $arrAttendee : (\Components\Marketing\Events\Attendees::get($iAttendeeId)) ?]" />
<ss:logic:variable as="arrContact" value="[? ($arrContact) ? $arrContact : (\Components\Customers\Contacts::get($arrAttendee['contact_id'])) ?]" />
<ss:logic:variable as="arrEvent" value="[? ($arrEvent) ? $arrEvent : (\Components\Marketing\Events::get($arrAttendee['event_id'])) ?]" />
<!-- Common-use variables for convenience -->
<ss:logic:variable as="arrGuests" value="[? ($arrAttendee) ? (\Components\Marketing\Events\Attendees::getAll(
[
'filter' => [
['event_attendee_parent_attendee_id', '=', $arrAttendee['event_attendee_id']]
],
'joins' => [
['customers_contacts', 'contact_id']
]
]
)) : ([]) ?]" />
<ss:logic:variable as="reminderType" value="[? (\Components\Marketing\Events\Reminders::getConfig($iReminderId))['strType'] ?]" />
<ss:logic:variable as="contactName" value="[? \Components\Customers\Contacts::renderName($arrContact) ?]" />
<ss:logic:variable as="eventName" value="[? $arrEvent['event_title'] ?]" />
<ss:logic:variable as="startTime" value="[? \Components\Marketing\Events::renderTime($arrEvent, $arrEvent['event_start_datetime']) ?]" />
<ss:logic:variable as="endTime" value="[? \Components\Marketing\Events::renderTime($arrEvent, $arrEvent['event_end_datetime']) ?]" />
<ss:logic:variable as="eventTimezone" value="[? $arrEvent['event_timezone'] ?]" />
<ss:logic:variable as="locationAddress" value="[? \Components\Marketing\Events\Locations::getColumn($arrEvent['event_location_id'], 'event_location_description') ?]" />
<ss:logic:variable as="locationDescription" value="[? \Components\Marketing\Events\Locations::getColumn($arrEvent['event_location_id'], 'event_location_room_description') ?]" />
<ss:logic:variable as="description" value="[? $arrEvent['event_description'] ?]" />
<!-- Message -->
Dear <ss:personalisation:firstname />
<ss:logic:if test="$reminderType == 'attend_reminder'">
A reminder that you are registered to attend:
</ss:logic:if>
<ss:logic:else test="$reminderType == 'rsvp_reminder'">
A reminder to RSVP for:
</ss:logic:else>
<ss:logic:else>
Thank you for your RSVP to:
</ss:logic:else>
[? $eventName ?]
Starting: [? $startTime ?] ([? $eventTimezone ?] time).
<ss:logic:if test="$locationAddress && $reminderType != 'rsvp_reminder'">
Where: [? $locationAddress ?]
<ss:logic:if test="$locationDescription">
[? $locationDescription ?]
</ss:logic:if>
</ss:logic:if>
<ss:logic:if test="$arrGuests && $reminderType != 'rsvp_reminder'">
Registered Guests:
<ss:data:repeater datasource="$arrGuests" as="arrGuest">
<ss:logic:variable as="guestName" value="[? \Components\Customers\Contacts::renderName($arrGuest) ?]" />
[? $guestName ?]
</ss:data:repeater>
</ss:logic:if>
<ss:logic:if test="$reminderType === 'rsvp_reminder'">
Follow this link to RSVP:
[? 'http://' + \Components\Settings\Domains::getPrimary() + '/community/event-rsvp/?event_id=' + $arrEvent['event_id'] ?]
</ss:logic:if>
|