[php8-compat] Update smarty templates and some php files to get the api_v3_contributi...
[civicrm-core.git] / xml / templates / message_templates / contribution_online_receipt_html.tpl
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}
12
13 <center>
14 <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;">
15
16 <!-- BEGIN HEADER -->
17 <!-- You can add table row(s) here with logo or other header elements -->
18 <!-- END HEADER -->
19
20 <!-- BEGIN CONTENT -->
21
22 <tr>
23 <td>
24 {assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
25 {if !empty($receipt_text)}
26 <p>{$receipt_text|htmlize}</p>
27 {/if}
28
29 {if $is_pay_later}
30 <p>{if isset($pay_later_receipt)}{$pay_later_receipt}{/if}</p> {* FIXME: this might be text rather than HTML *}
31 {/if}
32
33 </td>
34 </tr>
35 </table>
36 <table style="width:100%; max-width:500px; border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
37
38 {if $amount}
39
40
41 <tr>
42 <th {$headerStyle}>
43 {ts}Contribution Information{/ts}
44 </th>
45 </tr>
46
47 {if !empty($lineItem) and !empty($priceSetID) and empty($is_quick_config)}
48
49 {foreach from=$lineItem item=value key=priceset}
50 <tr>
51 <td colspan="2" {$valueStyle}>
52 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
53 <tr>
54 <th>{ts}Item{/ts}</th>
55 <th>{ts}Qty{/ts}</th>
56 <th>{ts}Each{/ts}</th>
57 {if !empty($dataArray)}
58 <th>{ts}Subtotal{/ts}</th>
59 <th>{ts}Tax Rate{/ts}</th>
60 <th>{ts}Tax Amount{/ts}</th>
61 {/if}
62 <th>{ts}Total{/ts}</th>
63 </tr>
64 {foreach from=$value item=line}
65 <tr>
66 <td>
67 {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}
68 </td>
69 <td>
70 {$line.qty}
71 </td>
72 <td>
73 {$line.unit_price|crmMoney:$currency}
74 </td>
75 {if !empty($getTaxDetails)}
76 <td>
77 {$line.unit_price*$line.qty|crmMoney:$currency}
78 </td>
79 {if isset($line.tax_rate) and ($line.tax_rate != "" || $line.tax_amount != "")}
80 <td>
81 {$line.tax_rate|string_format:"%.2f"}%
82 </td>
83 <td>
84 {$line.tax_amount|crmMoney:$currency}
85 </td>
86 {else}
87 <td></td>
88 <td></td>
89 {/if}
90 {/if}
91 <td>
92 {$line.line_total+$line.tax_amount|crmMoney:$currency}
93 </td>
94 </tr>
95 {/foreach}
96 </table>
97 </td>
98 </tr>
99 {/foreach}
100 {if !empty($dataArray)}
101 <tr>
102 <td {$labelStyle}>
103 {ts} Amount before Tax : {/ts}
104 </td>
105 <td {$valueStyle}>
106 {$amount-$totalTaxAmount|crmMoney:$currency}
107 </td>
108 </tr>
109
110 {foreach from=$dataArray item=value key=priceset}
111 <tr>
112 {if $priceset || $priceset == 0}
113 <td>&nbsp;{$taxTerm} {$priceset|string_format:"%.2f"}%</td>
114 <td>&nbsp;{$value|crmMoney:$currency}</td>
115 {else}
116 <td>&nbsp;{ts}No{/ts} {$taxTerm}</td>
117 <td>&nbsp;{$value|crmMoney:$currency}</td>
118 {/if}
119 </tr>
120 {/foreach}
121
122 {/if}
123 {if isset($totalTaxAmount)}
124 <tr>
125 <td {$labelStyle}>
126 {ts}Total Tax{/ts}
127 </td>
128 <td {$valueStyle}>
129 {$totalTaxAmount|crmMoney:$currency}
130 </td>
131 </tr>
132 {/if}
133 <tr>
134 <td {$labelStyle}>
135 {ts}Total Amount{/ts}
136 </td>
137 <td {$valueStyle}>
138 {$amount|crmMoney:$currency}
139 </td>
140 </tr>
141
142 {else}
143
144 {if !empty($totalTaxAmount)}
145 <tr>
146 <td {$labelStyle}>
147 {ts}Total Tax Amount{/ts}
148 </td>
149 <td {$valueStyle}>
150 {$totalTaxAmount|crmMoney:$currency}
151 </td>
152 </tr>
153 {/if}
154 <tr>
155 <td {$labelStyle}>
156 {ts}Amount{/ts}
157 </td>
158 <td {$valueStyle}>
159 {$amount|crmMoney:$currency} {if isset($amount_level)} - {$amount_level}{/if}
160 </td>
161 </tr>
162
163 {/if}
164
165 {/if}
166
167
168 {if !empty($receive_date)}
169 <tr>
170 <td {$labelStyle}>
171 {ts}Date{/ts}
172 </td>
173 <td {$valueStyle}>
174 {$receive_date|crmDate}
175 </td>
176 </tr>
177 {/if}
178
179 {if !empty($is_monetary) and !empty($trxn_id)}
180 <tr>
181 <td {$labelStyle}>
182 {ts}Transaction #{/ts}
183 </td>
184 <td {$valueStyle}>
185 {$trxn_id}
186 </td>
187 </tr>
188 {/if}
189
190 {if !empty($is_recur)}
191 <tr>
192 <td colspan="2" {$labelStyle}>
193 {ts}This is a recurring contribution.{/ts}
194 {if $cancelSubscriptionUrl}
195 {ts 1=$cancelSubscriptionUrl}You can cancel future contributions by <a href="%1">visiting this web page</a>.{/ts}
196 {/if}
197 </td>
198 </tr>
199 {if $updateSubscriptionBillingUrl}
200 <tr>
201 <td colspan="2" {$labelStyle}>
202 {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by <a href="%1">visiting this web page</a>.{/ts}
203 </td>
204 </tr>
205 {/if}
206 {if $updateSubscriptionUrl}
207 <tr>
208 <td colspan="2" {$labelStyle}>
209 {ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments for this recurring contribution by <a href="%1">visiting this web page</a>.{/ts}
210 </td>
211 </tr>
212 {/if}
213 {/if}
214
215 {if $honor_block_is_active}
216 <tr>
217 <th {$headerStyle}>
218 {$soft_credit_type}
219 </th>
220 </tr>
221 {foreach from=$honoreeProfile item=value key=label}
222 <tr>
223 <td {$labelStyle}>
224 {$label}
225 </td>
226 <td {$valueStyle}>
227 {$value}
228 </td>
229 </tr>
230 {/foreach}
231 {elseif !empty($softCreditTypes) and !empty($softCredits)}
232 {foreach from=$softCreditTypes item=softCreditType key=n}
233 <tr>
234 <th {$headerStyle}>
235 {$softCreditType}
236 </th>
237 </tr>
238 {foreach from=$softCredits.$n item=value key=label}
239 <tr>
240 <td {$labelStyle}>
241 {$label}
242 </td>
243 <td {$valueStyle}>
244 {$value}
245 </td>
246 </tr>
247 {/foreach}
248 {/foreach}
249 {/if}
250
251 {if !empty($pcpBlock)}
252 <tr>
253 <th {$headerStyle}>
254 {ts}Personal Campaign Page{/ts}
255 </th>
256 </tr>
257 <tr>
258 <td {$labelStyle}>
259 {ts}Display In Honor Roll{/ts}
260 </td>
261 <td {$valueStyle}>
262 {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
263 </td>
264 </tr>
265 {if $pcp_roll_nickname}
266 <tr>
267 <td {$labelStyle}>
268 {ts}Nickname{/ts}
269 </td>
270 <td {$valueStyle}>
271 {$pcp_roll_nickname}
272 </td>
273 </tr>
274 {/if}
275 {if $pcp_personal_note}
276 <tr>
277 <td {$labelStyle}>
278 {ts}Personal Note{/ts}
279 </td>
280 <td {$valueStyle}>
281 {$pcp_personal_note}
282 </td>
283 </tr>
284 {/if}
285 {/if}
286
287 {if !empty($onBehalfProfile)}
288 <tr>
289 <th {$headerStyle}>
290 {$onBehalfProfile_grouptitle}
291 </th>
292 </tr>
293 {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
294 <tr>
295 <td {$labelStyle}>
296 {$onBehalfName}
297 </td>
298 <td {$valueStyle}>
299 {$onBehalfValue}
300 </td>
301 </tr>
302 {/foreach}
303 {/if}
304
305 {if !empty($isShare)}
306 <tr>
307 <td colspan="2" {$valueStyle}>
308 {capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contributionPageId`" a=true fe=1 h=1}{/capture}
309 {include file="CRM/common/SocialNetwork.tpl" emailMode=true url=$contributionUrl title=$title pageURL=$contributionUrl}
310 </td>
311 </tr>
312 {/if}
313
314 {if !empty($billingName)}
315 <tr>
316 <th {$headerStyle}>
317 {ts}Billing Name and Address{/ts}
318 </th>
319 </tr>
320 <tr>
321 <td colspan="2" {$valueStyle}>
322 {$billingName}<br />
323 {$address|nl2br}<br />
324 {$email}
325 </td>
326 </tr>
327 {elseif !empty($email)}
328 <tr>
329 <th {$headerStyle}>
330 {ts}Registered Email{/ts}
331 </th>
332 </tr>
333 <tr>
334 <td colspan="2" {$valueStyle}>
335 {$email}
336 </td>
337 </tr>
338 {/if}
339
340 {if !empty($credit_card_type)}
341 <tr>
342 <th {$headerStyle}>
343 {ts}Credit Card Information{/ts}
344 </th>
345 </tr>
346 <tr>
347 <td colspan="2" {$valueStyle}>
348 {$credit_card_type}<br />
349 {$credit_card_number}<br />
350 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
351 </td>
352 </tr>
353 {/if}
354
355 {if !empty($selectPremium)}
356 <tr>
357 <th {$headerStyle}>
358 {ts}Premium Information{/ts}
359 </th>
360 </tr>
361 <tr>
362 <td colspan="2" {$labelStyle}>
363 {$product_name}
364 </td>
365 </tr>
366 {if $option}
367 <tr>
368 <td {$labelStyle}>
369 {ts}Option{/ts}
370 </td>
371 <td {$valueStyle}>
372 {$option}
373 </td>
374 </tr>
375 {/if}
376 {if $sku}
377 <tr>
378 <td {$labelStyle}>
379 {ts}SKU{/ts}
380 </td>
381 <td {$valueStyle}>
382 {$sku}
383 </td>
384 </tr>
385 {/if}
386 {if $start_date}
387 <tr>
388 <td {$labelStyle}>
389 {ts}Start Date{/ts}
390 </td>
391 <td {$valueStyle}>
392 {$start_date|crmDate}
393 </td>
394 </tr>
395 {/if}
396 {if $end_date}
397 <tr>
398 <td {$labelStyle}>
399 {ts}End Date{/ts}
400 </td>
401 <td {$valueStyle}>
402 {$end_date|crmDate}
403 </td>
404 </tr>
405 {/if}
406 {if !empty($contact_email) OR !empty($contact_phone)}
407 <tr>
408 <td colspan="2" {$valueStyle}>
409 <p>{ts}For information about this premium, contact:{/ts}</p>
410 {if !empty($contact_email)}
411 <p>{$contact_email}</p>
412 {/if}
413 {if !empty($contact_phone)}
414 <p>{$contact_phone}</p>
415 {/if}
416 </td>
417 </tr>
418 {/if}
419 {if !empty($is_deductible) AND !empty($price)}
420 <tr>
421 <td colspan="2" {$valueStyle}>
422 <p>{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}</p>
423 </td>
424 </tr>
425 {/if}
426 {/if}
427
428 {if !empty($customPre)}
429 <tr>
430 <th {$headerStyle}>
431 {$customPre_grouptitle}
432 </th>
433 </tr>
434 {foreach from=$customPre item=customValue key=customName}
435 {if (!empty($trackingFields) and ! in_array($customName, $trackingFields)) or empty($trackingFields)}
436 <tr>
437 <td {$labelStyle}>
438 {$customName}
439 </td>
440 <td {$valueStyle}>
441 {$customValue}
442 </td>
443 </tr>
444 {/if}
445 {/foreach}
446 {/if}
447
448 {if !empty($customPost)}
449 <tr>
450 <th {$headerStyle}>
451 {$customPost_grouptitle}
452 </th>
453 </tr>
454 {foreach from=$customPost item=customValue key=customName}
455 {if (!empty($trackingFields) and ! in_array($customName, $trackingFields)) or empty($trackingFields)}
456 <tr>
457 <td {$labelStyle}>
458 {$customName}
459 </td>
460 <td {$valueStyle}>
461 {$customValue}
462 </td>
463 </tr>
464 {/if}
465 {/foreach}
466 {/if}
467
468 </table>
469 </center>
470
471 </body>
472 </html>