Merge pull request #24117 from civicrm/5.52
[civicrm-core.git] / xml / templates / message_templates / event_online_receipt_html.tpl
CommitLineData
6a488035
TO
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5 <title></title>
6</head>
7<body>
8
9{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
10{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
11{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
75b065ce 12{capture assign=tdfirstStyle}style="width: 180px; padding-bottom: 15px;"{/capture}
13{capture assign=tdStyle}style="width: 100px;"{/capture}
14{capture assign=participantTotal}style="margin: 0.5em 0 0.5em;padding: 0.5em;background-color: #999999;font-weight: bold;color: #FAFAFA;border-radius: 2px;"{/capture}
15
6a488035 16
cb342529 17 <table id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left; width:100%; max-width:700px; padding:0; margin:0; border:0px;">
6a488035
TO
18
19 <!-- BEGIN HEADER -->
20 <!-- You can add table row(s) here with logo or other header elements -->
21 <!-- END HEADER -->
22
23 <!-- BEGIN CONTENT -->
24
25 <tr>
26 <td>
e74e138c 27 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
6a488035 28
ff708ff0 29 {if !empty($event.confirm_email_text) AND (empty($isOnWaitlist) AND empty($isRequireApproval))}
6a488035
TO
30 <p>{$event.confirm_email_text|htmlize}</p>
31
32 {else}
12ff7379
EE
33 <p>{ts}Thank you for your registration.{/ts}
34 {if $participant_status}{ts 1=$participant_status}This is a confirmation that your registration has been received and your status has been updated to <strong> %1</strong>.{/ts}
35 {else}{if $isOnWaitlist}{ts}This is a confirmation that your registration has been received and your status has been updated to <strong>waitlisted</strong>.{/ts}{else}{ts}This is a confirmation that your registration has been received and your status has been updated to <strong>registered<strong>.{/ts}{/if}{/if}</p>
6a488035
TO
36
37 {/if}
38
39 <p>
ff708ff0 40 {if !empty($isOnWaitlist)}
6a488035 41 <p>{ts}You have been added to the WAIT LIST for this event.{/ts}</p>
ff708ff0 42 {if !empty($isPrimary)}
0865a4ed 43 <p>{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}</p>
6a488035 44 {/if}
ff708ff0 45 {elseif !empty($isRequireApproval)}
6a488035 46 <p>{ts}Your registration has been submitted.{/ts}</p>
ff708ff0 47 {if !empty($isPrimary)}
0865a4ed 48 <p>{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}</p>
6a488035 49 {/if}
ff708ff0
SL
50 {elseif !empty($is_pay_later) && empty($isAmountzero) && empty($isAdditionalParticipant)}
51 <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
6a488035
TO
52 {/if}
53
54 </td>
55 </tr>
56 <tr>
57 <td>
cb342529 58 <table style="width:100%; max-width:700px; border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
6a488035
TO
59 <tr>
60 <th {$headerStyle}>
61 {ts}Event Information and Location{/ts}
62 </th>
63 </tr>
64 <tr>
65 <td colspan="2" {$valueStyle}>
66 {$event.event_title}<br />
970cdb44 67 {$event.event_start_date|crmDate:"%A"} {$event.event_start_date|crmDate}{if $event.event_end_date}-{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}
6a488035
TO
68 </td>
69 </tr>
70
71
72 {if $conference_sessions}
73 <tr>
74 <td colspan="2" {$labelStyle}>
a235e13c 75 {ts}Your schedule:{/ts}
6a488035
TO
76 </td>
77 </tr>
78 <tr>
79 <td colspan="2" {$valueStyle}>
a235e13c 80 {assign var='group_by_day' value='NA'}
81 {foreach from=$conference_sessions item=session}
970cdb44 82 {if $session.start_date|crmDate:"%Y/%m/%d" != $group_by_day|crmDate:"%Y/%m/%d"}
a235e13c 83 {assign var='group_by_day' value=$session.start_date}
970cdb44 84 <em>{$group_by_day|crmDate:"%m/%d/%Y"}</em><br />
a235e13c 85 {/if}
86 {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}<br />
87 {if $session.location}&nbsp;&nbsp;&nbsp;&nbsp;{$session.location}<br />{/if}
88 {/foreach}
6a488035
TO
89 </td>
90 </tr>
91 {/if}
92
ff708ff0 93 {if !empty($event.participant_role) and $event.participant_role neq 'Attendee' and !empty($defaultRole)}
6a488035
TO
94 <tr>
95 <td {$labelStyle}>
96 {ts}Participant Role{/ts}
97 </td>
98 <td {$valueStyle}>
99 {$event.participant_role}
100 </td>
101 </tr>
102 {/if}
103
ff708ff0 104 {if !empty($isShowLocation)}
6a488035
TO
105 <tr>
106 <td colspan="2" {$valueStyle}>
d74c297f 107 {$location.address.1.display|nl2br}
6a488035
TO
108 </td>
109 </tr>
110 {/if}
111
ff708ff0 112 {if !empty($location.phone.1.phone) || !empty($location.email.1.email)}
6a488035
TO
113 <tr>
114 <td colspan="2" {$labelStyle}>
115 {ts}Event Contacts:{/ts}
116 </td>
117 </tr>
118 {foreach from=$location.phone item=phone}
119 {if $phone.phone}
120 <tr>
121 <td {$labelStyle}>
122 {if $phone.phone_type}
123 {$phone.phone_type_display}
124 {else}
125 {ts}Phone{/ts}
126 {/if}
127 </td>
128 <td {$valueStyle}>
5d9ebb64 129 {$phone.phone} {if $phone.phone_ext}&nbsp;{ts}ext.{/ts} {$phone.phone_ext}{/if}
6a488035
TO
130 </td>
131 </tr>
132 {/if}
133 {/foreach}
134 {foreach from=$location.email item=eventEmail}
135 {if $eventEmail.email}
136 <tr>
137 <td {$labelStyle}>
138 {ts}Email{/ts}
139 </td>
140 <td {$valueStyle}>
141 {$eventEmail.email}
142 </td>
143 </tr>
144 {/if}
145 {/foreach}
146 {/if}
7f7fa13a 147
ff708ff0 148 {if !empty($event.is_public)}
278f760d
J
149 <tr>
150 <td colspan="2" {$valueStyle}>
151 {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
a2cadd75
FW
152 <a href="{$icalFeed}">{ts}Download iCalendar entry for this event.{/ts}</a>
153 </td>
154 </tr>
155 <tr>
156 <td colspan="2" {$valueStyle}>
157 {capture assign=gCalendar}{crmURL p='civicrm/event/ical' q="gCalendar=1&reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
158 <a href="{$gCalendar}">{ts}Add event to Google Calendar{/ts}</a>
278f760d
J
159 </td>
160 </tr>
4de4dbe9 161 {/if}
7f7fa13a 162
ff708ff0 163 {if !empty($event.is_share)}
6a488035
TO
164 <tr>
165 <td colspan="2" {$valueStyle}>
166 {capture assign=eventUrl}{crmURL p='civicrm/event/info' q="id=`$event.id`&reset=1" a=true fe=1 h=1}{/capture}
167 {include file="CRM/common/SocialNetwork.tpl" emailMode=true url=$eventUrl title=$event.title pageURL=$eventUrl}
168 </td>
169 </tr>
170 {/if}
ff708ff0 171 {if !empty($payer.name)}
6a488035
TO
172 <tr>
173 <th {$headerStyle}>
174 {ts}You were registered by:{/ts}
175 </th>
176 </tr>
177 <tr>
178 <td colspan="2" {$valueStyle}>
a235e13c 179 {$payer.name}
6a488035
TO
180 </td>
181 </tr>
182 {/if}
ff708ff0 183 {if !empty($event.is_monetary) and empty($isRequireApproval)}
6a488035
TO
184
185 <tr>
186 <th {$headerStyle}>
ff708ff0 187 {if !empty($event.fee_label)}{$event.fee_label}{/if}
6a488035
TO
188 </th>
189 </tr>
190
ff708ff0 191 {if !empty($lineItem)}
6a488035
TO
192 {foreach from=$lineItem item=value key=priceset}
193 {if $value neq 'skip'}
a221e1e0 194 {if !empty($isPrimary)}
6a488035
TO
195 {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
196 <tr>
197 <td colspan="2" {$labelStyle}>
ff708ff0 198 {ts 1=$priceset+1}Participant %1{/ts} {if !empty($part.$priceset)}{$part.$priceset.info}{/if}
6a488035
TO
199 </td>
200 </tr>
201 {/if}
202 {/if}
203 <tr>
204 <td colspan="2" {$valueStyle}>
b22bf58e 205 <table>
6a488035
TO
206 <tr>
207 <th>{ts}Item{/ts}</th>
208 <th>{ts}Qty{/ts}</th>
209 <th>{ts}Each{/ts}</th>
ff708ff0 210 {if !empty($dataArray)}
79d001a2
PB
211 <th>{ts}SubTotal{/ts}</th>
212 <th>{ts}Tax Rate{/ts}</th>
213 <th>{ts}Tax Amount{/ts}</th>
214 {/if}
6a488035 215 <th>{ts}Total{/ts}</th>
ff708ff0 216 {if !empty($pricesetFieldsCount) }<th>{ts}Total Participants{/ts}</th>{/if}
6a488035
TO
217 </tr>
218 {foreach from=$value item=line}
219 <tr>
75b065ce 220 <td {$tdfirstStyle}>
6a488035
TO
221 {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description}<div>{$line.description|truncate:30:"..."}</div>{/if}
222 </td>
75b065ce 223 <td {$tdStyle} align="middle">
6a488035
TO
224 {$line.qty}
225 </td>
75b065ce 226 <td {$tdStyle}>
6a488035
TO
227 {$line.unit_price|crmMoney:$currency}
228 </td>
ff708ff0 229 {if !empty($dataArray)}
75b065ce 230 <td {$tdStyle}>
79d001a2
PB
231 {$line.unit_price*$line.qty|crmMoney}
232 </td>
5b949c7d 233 {if $line.tax_rate || $line.tax_amount != ""}
75b065ce 234 <td {$tdStyle}>
7cf82823
PB
235 {$line.tax_rate|string_format:"%.2f"}%
236 </td>
75b065ce 237 <td {$tdStyle}>
7cf82823
PB
238 {$line.tax_amount|crmMoney}
239 </td>
240 {else}
241 <td></td>
242 <td></td>
243 {/if}
79d001a2 244 {/if}
75b065ce 245 <td {$tdStyle}>
7cf82823 246 {$line.line_total+$line.tax_amount|crmMoney:$currency}
6a488035 247 </td>
ff708ff0 248 {if !empty($pricesetFieldsCount) }<td {$tdStyle}>{$line.participant_count}</td> {/if}
6a488035
TO
249 </tr>
250 {/foreach}
ff708ff0 251 {if !empty($individual)}
75b065ce 252 <tr {$participantTotal}>
253 <td colspan=3>{ts}Participant Total{/ts}</td>
cb342529 254 <td colspan=2>{$individual.$priceset.totalAmtWithTax-$individual.$priceset.totalTaxAmt|crmMoney}</td>
255 <td colspan=1>{$individual.$priceset.totalTaxAmt|crmMoney}</td>
256 <td colspan=2>{$individual.$priceset.totalAmtWithTax|crmMoney}</td>
75b065ce 257 </tr>
258 {/if}
6a488035
TO
259 </table>
260 </td>
261 </tr>
262 {/if}
263 {/foreach}
ff708ff0 264 {if !empty($dataArray)}
141c8460 265 {if isset($totalAmount) and isset($totalTaxAmount)}
79d001a2
PB
266 <tr>
267 <td {$labelStyle}>
268 {ts} Amount Before Tax: {/ts}
269 </td>
270 <td {$valueStyle}>
271 {$totalAmount-$totalTaxAmount|crmMoney}
272 </td>
273 </tr>
141c8460 274 {/if}
79d001a2
PB
275 {foreach from=$dataArray item=value key=priceset}
276 <tr>
7cf82823 277 {if $priceset || $priceset == 0}
42b37f89 278 <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
7cf82823
PB
279 <td>&nbsp;{$value|crmMoney:$currency}</td>
280 {else}
42b37f89 281 <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
7cf82823 282 <td>&nbsp;{$value|crmMoney:$currency}</td>
79d001a2 283 {/if}
7cf82823 284 </tr>
79d001a2
PB
285 {/foreach}
286 {/if}
6a488035
TO
287 {/if}
288
ff708ff0 289 {if !empty($amounts) && empty($lineItem)}
6a488035
TO
290 {foreach from=$amounts item=amnt key=level}
291 <tr>
292 <td colspan="2" {$valueStyle}>
293 {$amnt.amount|crmMoney:$currency} {$amnt.label}
294 </td>
295 </tr>
296 {/foreach}
297 {/if}
298
ff708ff0 299 {if isset($totalTaxAmount)}
79d001a2
PB
300 <tr>
301 <td {$labelStyle}>
302 {ts}Total Tax Amount{/ts}
303 </td>
304 <td {$valueStyle}>
305 {$totalTaxAmount|crmMoney:$currency}
306 </td>
307 </tr>
308 {/if}
a221e1e0 309 {if !empty($isPrimary)}
6a488035
TO
310 <tr>
311 <td {$labelStyle}>
312 {ts}Total Amount{/ts}
a235e13c 313 </td>
6a488035 314 <td {$valueStyle}>
ff708ff0 315 {if !empty($totalAmount)}{$totalAmount|crmMoney:$currency}{/if} {if !empty($hookDiscount.message)}({$hookDiscount.message}){/if}
6a488035
TO
316 </td>
317 </tr>
ff708ff0 318 {if !empty($pricesetFieldsCount) }
6a488035 319 <tr>
a235e13c 320 <td {$labelStyle}>
321 {ts}Total Participants{/ts}</td>
6a488035 322 <td {$valueStyle}>
a235e13c 323 {assign var="count" value= 0}
6a488035
TO
324 {foreach from=$lineItem item=pcount}
325 {assign var="lineItemCount" value=0}
326 {if $pcount neq 'skip'}
327 {foreach from=$pcount item=p_count}
328 {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
329 {/foreach}
330 {if $lineItemCount < 1 }
331 {assign var="lineItemCount" value=1}
a235e13c 332 {/if}
6a488035
TO
333 {assign var="count" value=$count+$lineItemCount}
334 {/if}
335 {/foreach}
336 {$count}
337 </td> </tr>
338 {/if}
339
340 {if $register_date}
341 <tr>
342 <td {$labelStyle}>
343 {ts}Registration Date{/ts}
344 </td>
345 <td {$valueStyle}>
346 {$register_date|crmDate}
347 </td>
348 </tr>
349 {/if}
350
ff708ff0 351 {if !empty($receive_date)}
6a488035
TO
352 <tr>
353 <td {$labelStyle}>
354 {ts}Transaction Date{/ts}
355 </td>
356 <td {$valueStyle}>
357 {$receive_date|crmDate}
358 </td>
359 </tr>
360 {/if}
361
ff708ff0 362 {if !empty($financialTypeName)}
6a488035
TO
363 <tr>
364 <td {$labelStyle}>
365 {ts}Financial Type{/ts}
366 </td>
367 <td {$valueStyle}>
b956b310 368 {$financialTypeName}
6a488035
TO
369 </td>
370 </tr>
371 {/if}
372
ff708ff0 373 {if !empty($trxn_id)}
6a488035
TO
374 <tr>
375 <td {$labelStyle}>
376 {ts}Transaction #{/ts}
377 </td>
378 <td {$valueStyle}>
379 {$trxn_id}
380 </td>
381 </tr>
382 {/if}
383
ff708ff0 384 {if !empty($paidBy)}
6a488035
TO
385 <tr>
386 <td {$labelStyle}>
387 {ts}Paid By{/ts}
388 </td>
389 <td {$valueStyle}>
390 {$paidBy}
391 </td>
392 </tr>
393 {/if}
394
ff708ff0 395 {if !empty($checkNumber)}
6a488035
TO
396 <tr>
397 <td {$labelStyle}>
398 {ts}Check Number{/ts}
399 </td>
400 <td {$valueStyle}>
401 {$checkNumber}
402 </td>
403 </tr>
404 {/if}
405
ff708ff0 406 {if !empty($billingName)}
6a488035
TO
407 <tr>
408 <th {$headerStyle}>
409 {ts}Billing Name and Address{/ts}
410 </th>
411 </tr>
412 <tr>
413 <td colspan="2" {$valueStyle}>
414 {$billingName}<br />
415 {$address|nl2br}
416 </td>
417 </tr>
418 {/if}
419
ff708ff0 420 {if !empty($credit_card_type)}
6a488035
TO
421 <tr>
422 <th {$headerStyle}>
423 {ts}Credit Card Information{/ts}
424 </th>
425 </tr>
426 <tr>
427 <td colspan="2" {$valueStyle}>
428 {$credit_card_type}<br />
429 {$credit_card_number}<br />
430 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
431 </td>
432 </tr>
433 {/if}
434
435 {/if}
436
437 {/if} {* End of conditional section for Paid events *}
438
439
ff708ff0 440{if !empty($customPre)}
6a488035
TO
441{foreach from=$customPre item=customPr key=i}
442 <tr> <th {$headerStyle}>{$customPre_grouptitle.$i}</th></tr>
443 {foreach from=$customPr item=customValue key=customName}
ff708ff0 444 {if ( !empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
6a488035
TO
445 <tr>
446 <td {$labelStyle}>{$customName}</td>
447 <td {$valueStyle}>{$customValue}</td>
448 </tr>
449 {/if}
450 {/foreach}
451{/foreach}
452{/if}
453
ff708ff0 454{if !empty($customPost)}
6a488035
TO
455{foreach from=$customPost item=customPos key=j}
456 <tr> <th {$headerStyle}>{$customPost_grouptitle.$j}</th></tr>
457 {foreach from=$customPos item=customValue key=customName}
ff708ff0 458 {if (!empty($trackingFields) and ! in_array( $customName, $trackingFields ) ) or empty($trackingFields)}
6a488035
TO
459 <tr>
460 <td {$labelStyle}>{$customName}</td>
461 <td {$valueStyle}>{$customValue}</td>
462 </tr>
463{/if}
464{/foreach}
465{/foreach}
466{/if}
467
ff708ff0 468{if !empty($customProfile)}
6a488035
TO
469{foreach from=$customProfile.profile item=eachParticipant key=participantID}
470 <tr><th {$headerStyle}>{ts 1=$participantID+2}Participant %1{/ts} </th></tr>
471 {foreach from=$eachParticipant item=eachProfile key=pid}
472 <tr><th {$headerStyle}>{$customProfile.title.$pid}</th></tr>
473 {foreach from=$eachProfile item=val key=field}
474 <tr>{foreach from=$val item=v key=f}
a235e13c 475 <td {$labelStyle}>{$field}</td>
476 <td {$valueStyle}>{$v}</td>
6a488035
TO
477 {/foreach}
478 </tr>
479 {/foreach}
480{/foreach}
481{/foreach}
482{/if}
483
6a488035 484 </table>
ff708ff0 485 {if !empty($event.allow_selfcancelxfer) }
e3b510fe 486 <tr>
487 <td colspan="2" {$valueStyle}>
ff708ff0 488 {ts 1=$selfcancelxfer_time 2=$selfservice_preposition}You may transfer your registration to another participant or cancel your registration up to %1 hours %2 the event.{/ts} {if !empty($totalAmount)}{ts}Cancellations are not refundable.{/ts}{/if}<br />
e3b510fe 489 {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participant.id`&{contact.checksum}" h=0 a=1 fe=1}{/capture}
490 <a href="{$selfService}">{ts}Click here to transfer or cancel your registration.{/ts}</a>
491 </td>
492 </tr>
493 {/if}
6a488035 494 </table>
6a488035
TO
495
496</body>
497</html>