Merge pull request #3799 from routinet/patch-1
[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 width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">
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
25 {if $receipt_text}
26 <p>{$receipt_text|htmlize}</p>
27 {/if}
28
29 {if $is_pay_later}
30 <p>{$pay_later_receipt}</p> {* FIXME: this might be text rather than HTML *}
31 {else}
32 <p>{ts}Please print this confirmation for your records.{/ts}</p>
33 {/if}
34
35 </td>
36 </tr>
37 </table>
38 <table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
39
40 {if $amount}
41
42
43 <tr>
44 <th {$headerStyle}>
45 {ts}Contribution Information{/ts}
46 </th>
47 </tr>
48
49 {if $lineItem and $priceSetID and !$is_quick_config}
50
51 {foreach from=$lineItem item=value key=priceset}
52 <tr>
53 <td colspan="2" {$valueStyle}>
54 <table> {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
55 <tr>
56 <th>{ts}Item{/ts}</th>
57 <th>{ts}Qty{/ts}</th>
58 <th>{ts}Each{/ts}</th>
59 <th>{ts}Total{/ts}</th>
60 </tr>
61 {foreach from=$value item=line}
62 <tr>
63 <td>
64 {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}
65 </td>
66 <td>
67 {$line.qty}
68 </td>
69 <td>
70 {$line.unit_price|crmMoney:$currency}
71 </td>
72 <td>
73 {$line.line_total|crmMoney:$currency}
74 </td>
75 </tr>
76 {/foreach}
77 </table>
78 </td>
79 </tr>
80 {/foreach}
81 <tr>
82 <td {$labelStyle}>
83 {ts}Total Amount{/ts}
84 </td>
85 <td {$valueStyle}>
86 {$amount|crmMoney:$currency}
87 </td>
88 </tr>
89
90 {else}
91
92 <tr>
93 <td {$labelStyle}>
94 {ts}Amount{/ts}
95 </td>
96 <td {$valueStyle}>
97 {$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if}
98 </td>
99 </tr>
100
101 {/if}
102
103 {/if}
104
105
106 {if $receive_date}
107 <tr>
108 <td {$labelStyle}>
109 {ts}Date{/ts}
110 </td>
111 <td {$valueStyle}>
112 {$receive_date|crmDate}
113 </td>
114 </tr>
115 {/if}
116
117 {if $is_monetary and $trxn_id}
118 <tr>
119 <td {$labelStyle}>
120 {ts}Transaction #{/ts}
121 </td>
122 <td {$valueStyle}>
123 {$trxn_id}
124 </td>
125 </tr>
126 {/if}
127
128 {if $is_recur}
129 {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
130 <tr>
131 <td colspan="2" {$labelStyle}>
132 {ts 1=$cancelSubscriptionUrl}This is a recurring contribution. You can cancel future contributions by <a href="%1">visiting this web page</a>.{/ts}
133 </td>
134 {if $updateSubscriptionBillingUrl}
135 <tr>
136 </tr>
137 <td colspan="2" {$labelStyle}>
138 {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by <a href="%1">visiting this web page</a>.{/ts}
139 </td>
140 {/if}
141 <tr>
142 </tr>
143 <td colspan="2" {$labelStyle}>
144 {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}
145 </td>
146 </tr>
147 {/if}
148 {/if}
149
150 {if $honor_block_is_active}
151 <tr>
152 <th {$headerStyle}>
153 {$soft_credit_type}
154 </th>
155 </tr>
156 {foreach from=$honoreeProfile item=value key=label}
157 <tr>
158 <td {$labelStyle}>
159 {$label}
160 </td>
161 <td {$valueStyle}>
162 {$value}
163 </td>
164 </tr>
165 {/foreach}
166 {elseif $softCreditTypes and $softCredits}
167 {foreach from=$softCreditTypes item=softCreditType key=n}
168 <tr>
169 <th {$headerStyle}>
170 {$softCreditType}
171 </th>
172 </tr>
173 {foreach from=$softCredits.$n item=value key=label}
174 <tr>
175 <td {$labelStyle}>
176 {$label}
177 </td>
178 <td {$valueStyle}>
179 {$value}
180 </td>
181 </tr>
182 {/foreach}
183 {/foreach}
184 {/if}
185
186 {if $pcpBlock}
187 <tr>
188 <th {$headerStyle}>
189 {ts}Personal Campaign Page{/ts}
190 </th>
191 </tr>
192 <tr>
193 <td {$labelStyle}>
194 {ts}Display In Honor Roll{/ts}
195 </td>
196 <td {$valueStyle}>
197 {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
198 </td>
199 </tr>
200 {if $pcp_roll_nickname}
201 <tr>
202 <td {$labelStyle}>
203 {ts}Nickname{/ts}
204 </td>
205 <td {$valueStyle}>
206 {$pcp_roll_nickname}
207 </td>
208 </tr>
209 {/if}
210 {if $pcp_personal_note}
211 <tr>
212 <td {$labelStyle}>
213 {ts}Personal Note{/ts}
214 </td>
215 <td {$valueStyle}>
216 {$pcp_personal_note}
217 </td>
218 </tr>
219 {/if}
220 {/if}
221
222 {if $onBehalfProfile}
223 <tr>
224 <th {$headerStyle}>
225 {$onBehalfProfile_grouptitle}
226 </th>
227 </tr>
228 {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
229 <tr>
230 <td {$labelStyle}>
231 {$onBehalfName}
232 </td>
233 <td {$valueStyle}>
234 {$onBehalfValue}
235 </td>
236 </tr>
237 {/foreach}
238 {/if}
239
240 {if $isShare}
241 <tr>
242 <td colspan="2" {$valueStyle}>
243 {capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contributionPageId`" a=true fe=1 h=1}{/capture}
244 {include file="CRM/common/SocialNetwork.tpl" emailMode=true url=$contributionUrl title=$title pageURL=$contributionUrl}
245 </td>
246 </tr>
247 {/if}
248
249 {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
250 {if $is_pay_later}
251 <tr>
252 <th {$headerStyle}>
253 {ts}Registered Email{/ts}
254 </th>
255 </tr>
256 <tr>
257 <td colspan="2" {$valueStyle}>
258 {$email}
259 </td>
260 </tr>
261 {elseif $amount GT 0}
262 <tr>
263 <th {$headerStyle}>
264 {ts}Billing Name and Address{/ts}
265 </th>
266 </tr>
267 <tr>
268 <td colspan="2" {$valueStyle}>
269 {$billingName}<br />
270 {$address|nl2br}<br />
271 {$email}
272 </td>
273 </tr>
274 {/if}
275 {/if}
276
277 {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
278 <tr>
279 <th {$headerStyle}>
280 {ts}Credit Card Information{/ts}
281 </th>
282 </tr>
283 <tr>
284 <td colspan="2" {$valueStyle}>
285 {$credit_card_type}<br />
286 {$credit_card_number}<br />
287 {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}<br />
288 </td>
289 </tr>
290 {/if}
291
292 {if $selectPremium}
293 <tr>
294 <th {$headerStyle}>
295 {ts}Premium Information{/ts}
296 </th>
297 </tr>
298 <tr>
299 <td colspan="2" {$labelStyle}>
300 {$product_name}
301 </td>
302 </tr>
303 {if $option}
304 <tr>
305 <td {$labelStyle}>
306 {ts}Option{/ts}
307 </td>
308 <td {$valueStyle}>
309 {$option}
310 </td>
311 </tr>
312 {/if}
313 {if $sku}
314 <tr>
315 <td {$labelStyle}>
316 {ts}SKU{/ts}
317 </td>
318 <td {$valueStyle}>
319 {$sku}
320 </td>
321 </tr>
322 {/if}
323 {if $start_date}
324 <tr>
325 <td {$labelStyle}>
326 {ts}Start Date{/ts}
327 </td>
328 <td {$valueStyle}>
329 {$start_date|crmDate}
330 </td>
331 </tr>
332 {/if}
333 {if $end_date}
334 <tr>
335 <td {$labelStyle}>
336 {ts}End Date{/ts}
337 </td>
338 <td {$valueStyle}>
339 {$end_date|crmDate}
340 </td>
341 </tr>
342 {/if}
343 {if $contact_email OR $contact_phone}
344 <tr>
345 <td colspan="2" {$valueStyle}>
346 <p>{ts}For information about this premium, contact:{/ts}</p>
347 {if $contact_email}
348 <p>{$contact_email}</p>
349 {/if}
350 {if $contact_phone}
351 <p>{$contact_phone}</p>
352 {/if}
353 </td>
354 </tr>
355 {/if}
356 {if $is_deductible AND $price}
357 <tr>
358 <td colspan="2" {$valueStyle}>
359 <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>
360 </td>
361 </tr>
362 {/if}
363 {/if}
364
365 {if $customPre}
366 <tr>
367 <th {$headerStyle}>
368 {$customPre_grouptitle}
369 </th>
370 </tr>
371 {foreach from=$customPre item=customValue key=customName}
372 {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
373 <tr>
374 <td {$labelStyle}>
375 {$customName}
376 </td>
377 <td {$valueStyle}>
378 {$customValue}
379 </td>
380 </tr>
381 {/if}
382 {/foreach}
383 {/if}
384
385 {if $customPost}
386 <tr>
387 <th {$headerStyle}>
388 {$customPost_grouptitle}
389 </th>
390 </tr>
391 {foreach from=$customPost item=customValue key=customName}
392 {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
393 <tr>
394 <td {$labelStyle}>
395 {$customName}
396 </td>
397 <td {$valueStyle}>
398 {$customValue}
399 </td>
400 </tr>
401 {/if}
402 {/foreach}
403 {/if}
404
405 </table>
406 </center>
407
408 </body>
409 </html>