forked from FoxyCart/2.0-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.cart.inc.twig
384 lines (379 loc) · 20.6 KB
/
admin.cart.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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
<!-- begin cart output -->
<!-- <div id="fc_cart_container"><div id="fc_cart_container_inner"> -->
{% if edit_transaction and has_product_images %}
{% set has_product_images = false %}
{% set colspan = colspan - 1 %}
{% endif %}
<table class="transactionCart" cellspacing="0" cellpadding="0">
<thead>
<tr>
{% if has_product_images %}
<th><span>{{ config.lang.cart_image|raw }}</span></th>
{% endif %}
<th><span>{{ config.lang.cart_item|raw }}</span></th>
<th{% if edit_transaction %} width="80"{% endif %}><span>{{ config.lang.cart_quantity|raw }}</span></th>
<th{% if edit_transaction %} width="120"{% endif %}><span>{{ config.lang.cart_price|raw }}</span></th>
</tr>
</thead>
<tfoot>
{% if has_future_products %}
<tr>
<td colspan="{{ colspan }}" style="text-align: center;"><h5>{{ config.lang.cart_todays_charge|raw }}</h5></td>
</tr>
{% endif %}
<tr>
<td class="fc_col1" colspan="{{ colspan-1 }}">{{ config.lang.cart_subtotal|raw }}:</td>
<td class="fc_col2">{{ total_item_price|money_format }}</td>
</tr>
{% if shipping_address.has_shippable_products %}
{% set shipping_service_label = shipping_and_handling_label %}
{% if shipping_address.shipping_service_id != 0 and shipping_address.shipping_service_description %}
{% set shipping_service_label = shipping_address.shipping_service_description %}
{% endif %}
<tr class="fc_cart_foot_shipping">
<td class="fc_col1" colspan="{{ colspan-1 }}">
{% if edit_transaction %}
<input type="text" name="shipping_service_description" size=20 value="{{ shipping_service_label|raw }}">
{% else %}
{{ shipping_service_label|raw }}
{% endif %}
:</td>
<td class="fc_col2">
{% if edit_transaction %}
<span class="currency_label">{{ locale_info.int_curr_symbol }}</span> <input type="text" name="shipping_total" size=20 value="{{ total_shipping }}">
{% else %}
{{ total_shipping|money_format }}
{% endif %}
</td>
</tr>
{% endif %}
{% if coupons|length > 0 %}
{% for key,coupon in coupons %}
{% if coupon.id != 0 %}
<tr class="fc_cart_foot_discount">
<td class="fc_col1" colspan="{{ colspan-1 }}">
{% if edit_transaction %}
<input type="text" name="save_coupon_code_id_{{ coupon.id }}" size=20 value="{{ key }}">
{% else %}
{{ coupon.name }}: {{ key }}
{% endif %}
</td>
<td class="fc_col2">
<span class="fc_discount">{{ coupon.amount|money_format }}</span>
</td>
</tr>
{% endif %}
{% endfor %}
{% endif %}
{% if edit_transaction %}
<tr class="fc_cart_foot_discount">
<td class="fc_col1" colspan="{{ colspan-1 }}">
Add Coupon: <input type="text" name="save_coupon_code_id_new" size=20 value="">
</td>
<td class="fc_col2"> </td>
</tr>
{% endif %}
{% if has_taxes %}
{% if has_multiple_addresses %}
<tr class="fc_cart_foot_tax">
<td class="fc_col1" colspan="{{ colspan-1 }}">{{ config.lang.cart_tax|raw }}</td>
<td class="fc_col2">{{ total_tax|money_format }}</td>
</tr>
{% else %}
{% for tax in shipping_address.taxes %}
<tr class="fc_cart_foot_tax">
<td class="fc_col1" colspan="{{ colspan-1 }}">{{ tax.name }} (<span class="fc_cart_foot_tax_rate">{{ tax.rate }}</span>%):</td>
<td class="fc_col2">{{ tax.amount|money_format }}</td>
</tr>
{% endfor %}
{% endif %}
{% endif %}
<tr>
<td class="fc_col1" colspan="{{ colspan-1 }}">{{ config.lang.cart_order_total|raw }}:</td>
<td class="fc_col2">{{ total_order|money_format }}</td>
</tr>
{% if has_future_products %}
<tr>
<td colspan="{{ colspan }}" style="text-align: center;">
<h5>
{% if future_subscription_totals_by_date|length > 1 %}
{{ config.lang.cart_future_charges|raw }}
{% else %}
{{ config.lang.cart_future_charge|raw }}
{% endif %}
</h5>
</td>
</tr>
{% for key, subscription_item_total in future_subscription_totals_by_date %}
<tr>
<td class="fc_col1" colspan="{{ colspan-1 }}">{{ config.lang.cart_subtotal|raw }}:</td>
<td class="fc_col2">{{ subscription_item_total.total_item_price|money_format }}</td>
</tr>
{% for key,coupon in future_coupons %}
<tr>
<td class="fc_col1" colspan="{{ colspan-1 }}">{{ coupon.name }}: {{ coupon.code }}</td>
<td class="fc_col2">{{ coupon.amount|money_format }}</td>
</tr>
{% endfor %}
{% if has_future_shipping %}
<tr>
<td class="fc_col1" colspan="{{ colspan-1 }}">{{ shipping_service_label|raw }}:</td>
<td class="fc_col2">{{ subscription_item_total.total_shipping|money_format }}</td>
</tr>
{% endif %}
{% if has_future_taxes %}
<tr>
<td class="fc_col1" colspan="{{ colspan-1 }}">{{ config.lang.cart_tax|raw }}:</td>
<td class="fc_col2">{{ subscription_item_total.total_tax|money_format }}</td>
</tr>
{% endif %}
<tr>
<td class="fc_col1" colspan="{{ colspan-1 }}">
{{ key|date("F jS, Y") }} Total:
</td>
<td class="fc_col2">
{{ subscription_item_total.total|money_format }}
</td>
</tr>
{% endfor %}
{% endif %}
{% set has_void_or_refund = false %}
{% if coupons|length > 0 %}
{% for key,coupon in coupons %}
{% if coupon.id == 0 %}
{% set has_void_or_refund = true %}
<tr class="fc_cart_foot_discount">
<td class="fc_col1" colspan="{{ colspan-1 }}">
{{ coupon.name }}: {{ key }}
</td>
<td class="fc_col2">
<span class="fc_discount">{{ coupon.amount|money_format }}</span>
</td>
</tr>
{% endif %}
{% endfor %}
{% endif %}
{% if has_void_or_refund %}
<tr>
<td class="fc_col1" colspan="{{ colspan-1 }}">{{ config.lang.cart_order_total|raw }}:</td>
<td class="fc_col2">{{ completed_total_order|money_format }}</td>
</tr>
{% endif %}
</tfoot>
{% if not has_multiship %}
<tbody>
{% endif %}
{% for item in items %}
{% if has_multiship and item.multiship >= 0 %}
{% if item.multiship > 0 %}
</tbody>
{% endif %}
<tbody class="fc_ship_to">
<tr>
<th class="fc_shipto" colspan="{{ colspan }}">
{{ config.lang.cart_shipto|raw }}{{ item.shipto }}
</th>
</tr>
{% endif %}
{% if item.id == 0 %}
<tr class="fc_cart_item {% if item.id == 0 %}fc_cart_item_new_toggle{% endif %}">
<td colspan="{{ colspan }}"><input type="button" value="Add a new product" onclick="showNewItem()"></td>
</tr>
{% endif %}
{% if item.item_number == items|length %}
<tr id="product_{{ item.id }}" class="fc_cart_item {% if item.id == 0 %}fc_cart_item_new{% endif %} fc_cart_item_last">
{% else %}
<tr id="product_{{ item.id }}" class="fc_cart_item">
{% endif %}
{% if has_product_images %}
<td class="fc_cart_item_image">
{% if item.image != '' %}
{% if item.url != '' %}
<a href="{{ item.url }}" target="_top" alt="{{ item.alt_name }}">
{% endif %}
<img class="fc_cart_thumbnail" src="{{ item.image }}" />
{% if item.url != '' %}
</a>
{% endif %}
{% endif %}
</td>
{% endif %}
<td class="fc_cart_item_details">
{{ item.downloadable_details_html|raw }}
<span class="fc_cart_item_name">
{% if edit_transaction %}
<label class="edit_label">Name:</label><input type="text" name="save_item_name_id_{{ item.id }}" size=20 value="{{ item.name }}">
{% else %}
{{ item.name }}
{% endif %}
</span>
{% if edit_transaction %}
<br />
<label class="edit_label">{{ config.lang.cart_shipto|raw }}</label><select name="save_item_shipto_id_{{ item.id }}">
{% for shipto in shiptos %}
{% set selected = "" %}
{% if item.shipto == shipto %}
{% set selected = " selected" %}
{% endif %}
<option{{ selected }} value="{{ shipto }}">{{ shipto }}</option>
}
{% endfor %}
</select><br />
{% endif %}
{% if edit_transaction or item.options|length > 0 or item.code != '' or item.category != 'DEFAULT' or item.weight != 0 or item.sub_frequency != '' %}
<ul class="fc_cart_item_options">
{% if edit_transaction %}
<li class="fc_cart_item_option fc_cart_item_option_custom fc_cart_item_option_custom_labels">
<span class="fc_cart_item_option_name fc_cart_item_option_name_label">
Name
</span>
<span class="fc_cart_item_option_value fc_cart_item_option_value_label">
Value
</span>
<span class="fc_cart_item_option_price_modifier fc_cart_item_option_price_modifier_label">
Modifer
</span>
</li>
{% endif %}
{% for option in item.options %}
<li class="fc_cart_item_option fc_cart_item_option_custom fc_cart_item_{{ option.class }}">
<span class="fc_cart_item_option_name">
{% if edit_transaction %}
<input type="text" name="save_item_option_name_id_{{ item.id }}_id_{{ option.id }}" size=20 value="{{ option.name }}" class="edit_label">
{% else %}
{{ option.name }}
{% endif %}
</span><span class="fc_cart_item_option_separator">:</span>
<span class="fc_cart_item_option_value">
{% if edit_transaction %}
<input type="text" name="save_item_option_value_id_{{ item.id }}_id_{{ option.id }}" size=20 value="{{ option.value }}">
{% else %}
{{ option.value }}
{% endif %}
</span>
{% if edit_transaction %}
<span class="fc_cart_item_option_modifier_separator">{{ locale_info.int_curr_symbol }}</span>
{% set price_mod_display = option.price_mod|trim('0') %}
{% if price_mod_display == "." %}
{% set price_mod_display = '' %}
{% endif %}
{% if price_mod_display|last == "." %}
{% set price_mod_display = price_mod_display ~ '00' %}
{% endif %}
<span class="fc_cart_item_option_price_modifier">
<input type="text" name="save_item_option_price_mod_id_{{ item.id }}_id_{{ option.id }}" size=20 value="{{ price_mod_display }}">
</span>
{% endif %}
</li>
{% endfor %}
{% if edit_transaction %}
<li class="fc_cart_item_option fc_cart_item_option_custom fc_cart_item_option_new">
<span class="fc_cart_item_option_name">
<input type="text" name="save_item_option_name_id_{{ item.id }}_id_new" size=20 value="">
</span><span class="fc_cart_item_option_separator">:</span>
<span class="fc_cart_item_option_value">
<input type="text" name="save_item_option_value_id_{{ item.id }}_id_new" size=20 value="">
</span>
<span class="fc_cart_item_option_modifier_separator">{{ locale_info.int_curr_symbol }}</span>
<span class="fc_cart_item_option_price_modifier">
<input type="text" name="save_item_option_price_mod_id_{{ item.id }}_id_new" size=20 value="">
</span>
</li>
{% endif %}
{% if item.code != '' or edit_transaction %}
<li class="fc_cart_item_option fc_cart_item_code">
<span class="fc_cart_item_option_name">{{ config.lang.cart_code|raw }}:</span>
{% if edit_transaction %}
<input type="text" name="save_item_code_id_{{ item.id }}" size=20 value="{{ item.code }}">
{% else %}
{{ item.code }}
{% endif %}
</li>
{% endif %}
{% if item.category != 'DEFAULT' or edit_transaction %}
<li class="fc_cart_item_option fc_cart_category_code">
<span class="fc_cart_item_option_name">{{ config.lang.cart_category|raw }}:</span>
{% if edit_transaction %}
<select name="save_item_category_id_{{ item.id }}" style="width: 150px;">
{% for category in categories %}
{% set selected = "" %}
{% if item.category == category.category_code %}
{% set selected = " selected" %}
{% endif %}
<option{{ selected }} value="{{ category.id }}">{{ category.category_code }}</option>
}
{% endfor %}
</select>
{% else %}
{{ item.category }}
{% endif %}
</li>
{% endif %}
{% if item.weight != 0 or edit_transaction %}
<li class="fc_cart_item_option fc_cart_item_weight">
<span class="fc_cart_item_option_name">{{ config.lang.cart_weight|raw }}:</span>
{% if edit_transaction %}
<input type="text" name="save_item_weight_id_{{ item.id }}" size=20 value="{{ item.weight_each }}" class="edit_short">
{% else %}
{{ item.weight }}
{% endif %}
<span class="fc_uom_weight">{{ weight_uom }}</span>
</li>
{% endif %}
{% if item.sub_frequency != '' %}
<li class="fc_cart_item_option fc_cart_item_subscription_details">
{{ config.lang.cart_subscription_details|raw }}
<ul>
<li class="fc_cart_item_option fc_cart_item_sub_frequency">
<span class="fc_cart_item_option_name">{{ config.lang.cart_frequency|raw }}</span><span class="fc_cart_item_option_separator">:</span> <span class="fc_cart_item_option_value">{{ item.sub_frequency }}</span>
</li>
<li class="fc_cart_item_option fc_cart_item_sub_startdate">
<span class="fc_cart_item_option_name">{{ config.lang.cart_start_date|raw }}</span><span class="fc_cart_item_option_separator">:</span> <span class="fc_cart_item_option_value">{{ item.sub_startdate }}</span>
</li>
{% if item.sub_enddate != item.sub_nextdate and (item.sub_enddate == "0000-00-00" or (item.sub_enddate != "0000-00-00" and item.sub_enddate > item.sub_nextdate)) %}
<li class="fc_cart_item_option fc_cart_item_sub_nextdate">
<span class="fc_cart_item_option_name">{{ config.lang.cart_next_date|raw }}</span><span class="fc_cart_item_option_separator">:</span> <span class="fc_cart_item_option_value">{{ item.sub_nextdate }}</span>
</li>
{% endif %}
{% if item.sub_enddate != "0000-00-00" %}
<li class="fc_cart_item_option fc_cart_item_sub_enddate">
<span class="fc_cart_item_option_name">{{ config.lang.cart_end_date|raw }}</span><span class="fc_cart_item_option_separator">:</span> <span class="fc_cart_item_option_value">{{ item.sub_enddate }}</span>
</li>
{% endif %}
</ul>
</li>
{% endif %}
</ul>
{% if edit_transaction %}
<label class="edit_label">Url:</label> <input type="text" name="save_item_url_id_{{ item.id }}" size=20 value="{{ item.url }}"><br />
<label class="edit_label">Image:</label> <input type="text" name="save_item_image_id_{{ item.id }}" size=20 value="{{ item.image }}"><br />
{% endif %}
{% endif %}
</td>
<td class="fc_cart_item_quantity">
{% if edit_transaction %}
<input type="text" name="save_item_quantity_id_{{ item.id }}" size=5 value="{{ item.quantity }}">
{% else %}
{{ item.quantity }}
{% endif %}
</td>
<td class="fc_cart_item_price">
<span class="fc_cart_item_price_total">
{% if edit_transaction %}
<span class="currency_label">{{ locale_info.int_curr_symbol }}</span> <input type="text" name="save_item_price_id_{{ item.id }}" size=5 value="{{ item.base_price }}">
{% else %}
{{ item.price|money_format }}{% if (((item.price * 10000) % 100) != 0) %}...<br />{{ item.price }}{% endif %}
{% if item.quantity > 1 %}
<span class="fc_cart_item_price_each">
({{ item.price_each|money_format }} {{ config.lang.cart_each|raw }}){% if (((item.price_each * 10000) % 100) != 0) %}...<br />{{ item.price_each }}{% endif %}
</span>
{% endif %}
{% endif %}
</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<!-- </div></div> --><!-- #fc_cart_container_inner, #fc_cart_container -->
<!-- end cart output -->