forked from FoxyCart/2.0-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
receipt.inc.twig
287 lines (259 loc) · 14.1 KB
/
receipt.inc.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
{% block receipt %}
<div class="fc-container">
<div id="fc-receipt-container" class="fc-receipt__main fc-receipt__row">
{% block receipt_header %}
<div id="fc-receipt__section--header" class="fc-receipt__section">
<div class="fc-container__row">
<div class="fc-container__grid--receipt--logo">
{% block logo %}
{% if config.store_logo_url %}
<img id="fc-logo--receipt" src="{{ config.cache_path }}{{ config.store_logo_url }}" class="fc-logo__image" alt="{{ store_name }}">
{% else %}
<h1 class="fc-logotype">{{ config.store_name }}</h1>
{% endif %}
{% endblock logo %}
</div>
<div class="fc-container__grid--receipt--transaction-subject">
<h3>
{% if is_updateinfo %}
{{ config.lang.email_subject_updateinfo|raw }}
{% elseif is_subscription_modification %}
{{ config.lang.email_subject_subscription_updated|raw }}
{% elseif is_subscription_cancel %}
{{ config.lang.email_subject_subscription_cancelled|raw }}
{% else %}
{{ config.lang.checkout_receipt|raw }}: #{{ order_id }}
{% endif %}
</h3>
</div>
</div>
</div>
{% endblock receipt_header %}
{% block receipt_messaging_and_actions %}
<div id="fc-receipt__section--receipt_messaging_and_actions">
{% block messaging %}
<div id="fc-messages" class="fc-receipt__section">
{% if is_updateinfo %}
<div class="fc-alert fc-alert--success">
{{ config.lang.checkout_updateinfo_completed|raw }}
</div>
{% elseif is_subscription_cancel %}
<div class="fc-alert fc-alert--success">
{{ config.lang.checkout_subscription_cancel_completed|raw }}
</div>
{% else %}
<div class="fc-alert fc-alert--success">
{{ config.lang.receipt_message_order|raw }}
</div>
{% endif %}
{% if payment_is_pending %}
<div class="fc-alert fc-alert--info">
{{ config.lang.checkout_payment_pending|raw }}
</div>
{% endif %}
</div>
{% endblock messaging %}
<div id="fc-receipt__section--actions" class="fc-receipt__section">
{% block downloadable_links %}
{% if has_downloadables and is_subscription_cancel == false %}
<div id="fc-receipt__section--downloadables" class="fc-receipt__section">
<fieldset>
<legend>{{ config.lang.checkout_download_links|raw }}</legend>
<div class="fc-form-group fc-form-group--static fc-form-group--receipt--downloadables">
<label class="fc-form-label fc-container__grid--static-label--downloadables">{{ config.lang.checkout_download_links|raw }}</label>
<div class="fc-container__grid--static-input--downloadables">
<ul fc-list="fc-list fc-list--downloadables">
{% for item in downloadable_links %}
<li class="fc-list--downloadables__item">
{% if item.url %}<a href="{{ item.url }}">{% endif %}
{{ item.name }}
{% if item.url %}</a>{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
</fieldset>
</div>
{% endif %}
{% endblock downloadable_links %}
<div id="fc-receipt__section--print-and-continue" class="fc-receipt__section">
<ul class="fc-list fc-list--inline">
<li class="fc-receipt-action fc-receipt-action--continue">
<a class="fc-button" href="{{ continue_url }}">{{ config.lang.checkout_continue_to|raw }}{{ config.store_name }}</a>
</li>
<li class="fc-receipt-action fc-receipt-action--print">
<a class="fc-button" href="#" onclick="window.print(); return false;">{{ config.lang.checkout_print_this_page|raw }}</a>
</li>
</ul>
</div>
</div>
</div>
{% endblock receipt_messaging_and_actions %}
{% block general_information %}
<div id="fc-receipt__section--general-information" class="fc-receipt__section">
<fieldset>
<legend>{{ config.lang.checkout_general_information|raw }}</legend>
<div class="fc-form-group fc-form-group--static fc-form-group--receipt--store-name">
<label class="fc-form-label fc-container__grid--static-label--store-name">{{ config.lang.checkout_merchant|raw }}</label>
<div class="fc-container__grid--static-input--store-name">
<p class="fc-form-control--static">{{ config.store_name }}</p>
</div>
</div>
<div class="fc-form-group fc-form-group--static fc-form-group--receipt--order-id">
<label class="fc-form-label fc-container__grid--static-label--order-id">{{ config.lang.checkout_order_id|raw }}</label>
<div class="fc-container__grid--static-input--order-id">
<p class="fc-form-control--static">{{ order_id }}</p>
</div>
</div>
{% if purchase_order %}
<div class="fc-form-group fc-form-group--static fc-form-group--receipt--purchase-order">
<label class="fc-form-label fc-container__grid--static-label--purchase-order">{{ config.lang.checkout_purchase_order|raw }}</label>
<div class="fc-container__grid--static-input--purchase-order">
<p class="fc-form-control--static">{{ purchase_order }}</p>
</div>
</div>
{% endif %}
{% if payment_type == 'plastic' and cc_number_masked %}
<div class="fc-form-group fc-form-group--static fc-form-group--receipt--credit-card">
<label class="fc-form-label fc-container__grid--static-label--credit-card">{{ config.lang.checkout_card_number|raw }}</label>
<div class="fc-container__grid--static-input--credit-card">
<p class="fc-form-control--static">{{ cc_number_masked }} ({{ cc_type }})</p>
</div>
</div>
{% endif %}
<div class="fc-form-group fc-form-group--static fc-form-group--receipt--date">
<label class="fc-form-label fc-container__grid--static-label--date">{{ config.lang.checkout_date|raw }}</label>
<div class="fc-container__grid--static-input--date">
<p class="fc-form-control--static">{{ checkout_date }}</p>
</div>
</div>
<div class="fc-form-group fc-form-group--static fc-form-group--receipt--processor-response">
<label class="fc-form-label fc-container__grid--static-label--processor-response">{{ config.lang.checkout_processor_response|raw }}</label>
<div class="fc-container__grid--static-input--processor-response">
<p class="fc-form-control--static">{{ processor_response|raw }}</p>
</div>
</div>
</fieldset><!-- #fc_receipt_general -->
</div>
{% endblock general_information %}
{% block billing_information %}
<div id="fc-receipt__section--billing-information" class="fc-receipt__section">
<fieldset>
<legend>{{ config.lang.checkout_billing_information|raw }}</legend>
{% include "address.receipt.inc.twig" with {'address': billing_address} %}
<div class="fc-form-group fc-receipt-email">
<label class="fc-form-label fc-container__grid--static-label--email">{{ config.lang.email_email|raw }}</label>
<div class="fc-container__grid--static-input--email">
<p class="fc-form-control--static">{{ customer_email }}</p>
</div>
</div>
</fieldset>
</div>
{% endblock billing_information %}
{% if not has_multiship %}
{% if shipping_address.has_shippable_products %}
{% block shipping_address %}
<div id="fc-receipt__section--shipping-information" class="fc-receipt__section">
<fieldset>
<legend>{{ config.lang.receipt_shipping_information|raw }}</legend>
<div class="fc-form-group fc-form-group--static fc-form-group--receipt--shipping-method">
<label class="fc-form-label fc-container__grid--static-label--shipping-method">{{ config.lang.checkout_shipping_method|raw }}</label>
<div class="fc-container__grid--static-input--shipping-method">
<p class="fc-form-control--static">{{ shipping_address.shipping_service_description|raw }}</p>
</div>
</div>
<div class="fc-receipt__section--shipping-information__address">
{% include "address.receipt.inc.twig" with {'address': shipping_address} %}
</div>
</fieldset>
</div>
{% endblock shipping_address %}
{% endif %}
{% else %}{# has_multiship #}
{% block multiship_addresses %}
<div id="fc-receipt__section--multiship-shipping-information">
{% for multiship in multiship_data %}
<div class="fc-receipt__section--multiship-shipping-information fc-receipt__section">
<fieldset>
<legend>
{{ config.lang.cart_shipto|raw }}
<span class="fc_shipto_name">{{ multiship.address_name }}</span>
</legend>
{% include "address.receipt.inc.twig" with {'address': multiship} %}
{% if multiship.custom_fields %}
{% for key,custom_field in multiship.custom_fields %}
{% if not custom_field.is_hidden %}
<div id="fc-receipt__section--custom-field--{{ key }}" class="fc-form-group fc-form-group--static fc-form-group--receipt--custom-field">
<label class="fc-form-label fc-container__grid--static-label--custom-field">{{ key|replace({'_': ' '})|title }}</label>
<div class="fc-container__grid--static-input--custom-field">
<p class="fc-form-control--static">{{ custom_field.value }}</p>
</div>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% if total_order > 0 %}
<div class="fc-form-group fc-form-group--inline">
<label class="fc-form-label fc-container__grid--static-label--multiship-price">{{ config.lang.checkout_subtotal|raw }}</label>
<div class="fc-container__grid--static-input--multiship-price">
<p class="fc-form-control--static">{{ multiship.total_item_price|money_format }}</p>
</div>
</div>
<div class="fc-form-group fc-form-group--inline">
<label class="fc-form-label fc-container__grid--static-label--multiship-shipping">{{ multiship.shipping_service_description|raw }}</label>
<div class="fc-container__grid--static-input--multiship-shipping">
<p class="fc-form-control--static">{{ multiship.total_shipping|money_format }}</p>
</div>
</div>
{% if has_taxes %}
{% for tax in multiship.taxes %}
<div class="fc-form-group fc-form-group--inline">
<label class="fc-form-label fc-container__grid--static-label--multiship-tax">
{{ tax.name }} (<span class="fc_cart_foot_tax_rate">{{ tax.rate }}</span>%) {{ config.lang.cart_tax|raw }}
</label>
<div class="fc-container__grid--static-input--multiship-tax">
<p class="fc-form-control--static">{{ tax.amount|money_format }}</p>
</div>
</div>
{% endfor %}
{% endif %}
<div class="fc-form-group fc-form-group--inline">
<label class="fc-form-label fc-container__grid--static-label--multiship-total">{{ config.lang.checkout_shipment_total|raw }}</label>
<div class="fc-container__grid--static-input--multiship-total">
<p class="fc-form-control--static">{{ multiship.total_price|money_format }}</p>
</div>
</div>
{% endif %}
</fieldset>
</div>
{% endfor %}
</div>
{% endblock multiship_addresses %}
{% endif %}{# not has_multiship #}
{% block custom_fields %}
{% if has_visible_custom_fields %}
<div id="fc-receipt__section--custom-fields" class="fc-receipt__section">
<fieldset>
<legend>{{ config.lang.checkout_additional_information|raw }}</legend>
{% for key,custom_field in custom_fields %}
{% if not custom_field.is_hidden %}
<div id="fc-receipt__section--custom-field--{{ key }}" class="fc-form-group fc-form-group--static fc-form-group--receipt--custom-field">
<label class="fc-form-label fc-container__grid--static-label--custom-field">{{ key|replace({'_': ' '})|title }}</label>
<div class="fc-container__grid--static-input--custom-field">
<p class="fc-form-control--static">{{ custom_field.value }}</p>
</div>
</div>
{% endif %}
{% endfor %}
</fieldset>
</div>
{% endif %}
{% endblock custom_fields %}
{% set cart_is_fullpage = true %}
<div data-fc-container="cart">
{% include 'cart.inc.twig' %}
</div>
</div>{# .fc-container #}
</div>{# #fc-receipt-container.fc-receipt__main.fc-receipt__row #}
{% endblock receipt %}