$fieldValue = $this->getFieldValue($row, $field);
if (is_array($fieldValue)) {
// eg. role_id for participant would be an array here.
- $fieldValue = implode(',', $fieldValue);
+ $fieldValue = implode(', ', $fieldValue);
}
if ($this->isPseudoField($field)) {
$messageTemplate->setContribution($contribution);
$messageTemplate->setOrder($mockOrder);
$messageTemplate->setParticipantContacts($participantContacts);
- $messageTemplate->setParticipant(['id' => $isPrimary ? $primaryParticipantID : $otherParticipantID, 'registered_by_id' => $isPrimary ? NULL : $primaryParticipantID, 'register_date' => date('Y-m-d')]);
+ $roleID = Event::get(FALSE)->addWhere('id', '=', $example['event_id'])->addSelect('default_role_id')->execute()->first()['default_role_id'];
+ $messageTemplate->setParticipant(['id' => $isPrimary ? $primaryParticipantID : $otherParticipantID, 'registered_by_id' => $isPrimary ? NULL : $primaryParticipantID, 'register_date' => date('Y-m-d'), 'role_id' => $roleID]);
}
/**
event.event_title:::{$event.event_title}
event.event_start_date:::{$event.event_start_date|crmDate:"%A"}
event.event_end_date:::{event.end_date|crmDate:"%Y%m%d"}
-{if !empty($event.is_monetary)}
-event.is_monetary:::{$event.is_monetary}
-{/if}
+event.is_monetary:::{event.is_monetary|boolean}
event.fee_label:::{event.fee_label}
-{if !empty($event.participant_role)}
- event.participant_role::{$event.participant_role}
- defaultRole:::{$defaultRole}
-{/if}
+event.participant_role::{event.participant_role_id:label}
{if !empty($isShowLocation)}
isShowLocation:::{$isShowLocation}
location.address.1.display:::{$location.address.1.display}
</td>
</tr>
- {if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
+ {if "{participant.role_id:label}" neq 'Attendee'}
<tr>
<td {$labelStyle}>
{ts}Participant Role{/ts}
</td>
<td {$valueStyle}>
- {$event.participant_role}
+ {participant.role_id:label}
</td>
</tr>
{/if}
{event.title}
{event.start_date|crmDate}{if {event.end_date|boolean}}-{if '{event.end_date|crmDate:"%Y%m%d"}' === '{event.start_date|crmDate:"%Y%m%d"}'}{event.end_date|crmDate:"Time"}{else}{event.end_date}{/if}{/if}
-{if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and empty($defaultRole)}
-{ts}Participant Role{/ts}: {$event.participant_role}
+{if "{participant.role_id:label}" neq 'Attendee'}
+{ts}Participant Role{/ts}: {participant.role_id:label}
{/if}
{if !empty($isShowLocation)}
</td>
</tr>
- {if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
+ {if "{participant.role_id:label}" neq 'Attendee'}
<tr>
<td {$labelStyle}>
{ts}Participant Role{/ts}
</td>
<td {$valueStyle}>
- {$event.participant_role}
+ {participant.role_id:label}
</td>
</tr>
{/if}
</tr>
{/if}
- {if $register_date}
+ {if {participant.register_date|boolean}}
<tr>
<td {$labelStyle}>
{ts}Registration Date{/ts}
</td>
<td {$valueStyle}>
- {$register_date|crmDate}
+ {participant.register_date}
</td>
</tr>
{/if}
{event.title}
{event.start_date|crmDate:"%A"} {event.start_date|crmDate}{if {event.end_date|boolean}}-{if $event.event_end_date|crmDate:"%Y%m%d" == $event.event_start_date|crmDate:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate:"%A"} {$event.event_end_date|crmDate}{/if}{/if}
-{if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
-{ts}Participant Role{/ts}: {$event.participant_role}
+{if "{participant.role_id:label}" neq 'Attendee'}
+{ts}Participant Role{/ts}: {participant.role_id:label}
{/if}
{if !empty($isShowLocation)}