forked from FoxyCart/2.0-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cart.inc.twig
834 lines (760 loc) · 45.3 KB
/
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
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
{# BEGIN CART TWIG TEMPLATE #}
{# ===================================================== #}
{% block cart %}
{% if context == 'cart' %}
{% include 'svg.inc.twig' %}
<nav class="fc-sidecart-only-fixed" role="navigation">
{# block sidecart_top_fixed_actions #}
<div class="fc-fixed-button-left">
<a data-fc-sidecart-dismiss class="fc-sidecart-button fc-btn-action">
<svg class="fc-svg-icon" role="presentation" title="Checkout Icon">
<use xlink:href="#fa-caret-left" />
</svg><span class="fc-fixed-button-left--text">{{ config.lang.cart_keep_shopping|raw }}</span></a>
</div>
<div class="fc-fixed-button-right">
<a class="fc-sidecart-button fc-btn-action" href="https://{{ config.store_domain }}/checkout?{{ session_name }}={{ session_id }}" target="_top">
{{ config.lang.cart_checkout|raw }}
<svg class="fc-svg-icon" role="presentation" title="Checkout Icon">
<use xlink:href="#fa-caret-right" />
</svg>
</a>
</div>
{# endblock sidecart_top_fixed_actions #}
</nav>
{% endif %}
<div id="fc-cart" {% if context == 'cart' %}class="fc-container"{% endif %}>
{% import "utils.inc.twig" as utils %}
{#
Blocks within "cart" block:
noscript_warning
div.row
cart_title
continue_shopping
div.row
cart_form_start
div.col-sm-8
cart_errors
cart_item_divs
div.col-sm-4
logo
order_totals
address_entry*
order_payment_actions
cart_form_end
#}
{% block noscript_warning %}
<noscript>
<div id="fc-noscript-errors" class="alert alert-danger">
<h2>{{ config.lang.cart_warning|raw }}:</h2>
<p>{{ config.lang.cart_no_javascript_message|raw }}</p>
</div>{# #fc-noscript-errors #}
</noscript>
{% endblock noscript_warning %}
{# rather than doing inline control statements, we're setting some top level variables #}
{% if cart_is_fullpage %}
{% set container_id = "fc-cart--responsive" %}
{% else %}
{% set container_id = "fc-cart--fixed-width" %}
{% endif %}
<div id="{{ container_id }}">
<header class="fc-cart__header fc-container__row" role="banner">
{% if not is_updateinfo %}
<div class="fc-cart__title fc-container__grid">
{% block cart_title %}
<h2 class="fc-cart__title__header">{{ config.lang.cart_caption|raw }}</h2>
<p class="fc-order-quantity">
{% set temp_lang_cart_items = config.lang.cart_items|raw %}
{% if item_count == 1 %}
{% set temp_lang_cart_items = config.lang.cart_item|raw %}
{% endif %}
<span data-fc-order-quantity-integer="fc-order-quantity-integer">{{ item_count }}</span>
<span data-fc-lang-cart-item="{{ config.lang.cart_item }}" data-fc-lang-cart-items="{{ config.lang.cart_items }}">{{ temp_lang_cart_items|lower }}</span>
{{ config.lang.cart_in_your_order|raw }}
</p>
{% endblock cart_title %}
</div>
{% endif %}
{% if cart_is_fullpage or context == 'checkout' %}
<div class="fc-cancel-continue-shopping fc-container__grid">
{% block continue_shopping %}
{% if cart_cancel_and_continue_link != '' %}
<a href="{{ cart_cancel_and_continue_link }}" class="fc-button fc-button--cancel">
<svg class="fc-svg-icon fc-icon-small" role="presentation" title="Back Arrows">
<use xlink:href="#fa-angle-double-left" />
</svg>
{{ config.lang.cart_cancel_and_continue|raw }}
</a>
{% endif %}
{% endblock continue_shopping %}
</div>
{% endif %}
</header>
{% if not is_updateinfo %}
{% if cart_is_fullpage %}
<div class="fc-cart-container fc-cart__main fc-container__row" role="main">
{% else %}
<div class="fc-container__row fc-cart-container">
{% endif %}
{% block cart_form_start %}
{% if config.with_controls %}
<form id="fc-cart-form" action="https://{{ config.store_domain }}/cart" method="post">
{% block cart_hidden_inputs %}
<input type="hidden" name="cart" value="update" />
<input type="hidden" name="item_count" value="{{ items|length }}" />
<input type="hidden" name="{{ session_name }}" value="{{ session_id }}" />
{% endblock cart_hidden_inputs %}
{% endif %}
{% endblock cart_form_start %}
<div class="fc-cart__main__content fc-container__grid">
<div data-fc-id="block-cart-errors">
{% block cart_errors %}
{% if context == 'cart' %}
{% include 'errors.inc.twig' %}
{% if item_count == 0 %}
<div class="fc-messages">
<div class="fc-messages__empty-notification">
<a href="{{ cart_cancel_and_continue_link }}">{{ config.lang.cart_empty|raw }}</a>
</div>
</div>
{% endif %}
{% endif %}
{% endblock cart_errors %}
</div>
<div data-fc-id="block-cart-items-divs">
{% block cart_items_divs %}
<div class="fc-cart__items {% if has_product_images %}fc-cart__items--with-images{% else %} fc-cart__items--without-images{% endif %}">
{% if items|length > 0 %}
<div class="fc-cart__items__header fc-container__row">
<div class="fc-cart__items__header__item fc-cart__items__header__column">
{{ config.lang.cart_item|raw }}
</div>
<div class="fc-cart__items__header__totals fc-cart__items__header__column">
<div class="fc-container__row">
<div class="fc-cart__items__header__price">
{% if (item_count != items|length) %}
{{ config.lang.cart_price|raw }}
{% endif %}
</div>
<div class="fc-cart__items__header__quantity">
{{ config.lang.cart_quantity|raw }}
</div>
<div class="fc-cart__items__header__total">
{{ config.lang.cart_total|raw }}
</div>
</div>
</div>
</div>
{% endif %}
{% for item in items %}
{% if has_multiship and item.multiship != "-1" %}
{# The first item per multiship shipto will != -1. All others will == -1 #}
<div class="fc-cart__multiship-header fc-container__row">
<h4 class="fc-cart__multiship-header__text">
{{ config.lang.cart_shipto|raw }}<strong class="fc-cart__multiship-header__ship-to">{{ item.shipto }}</strong>
</h4>
</div>
{% endif %}
{# bug in twig.js keeps us from just setting a variable. hopefully this is resolved eventually #}
<div data-fc-item-id="{{ item.id }}" class="fc-container__row fc-cart__item {% if item.parent_code %}fc-cart__item--child-product{% elseif item.is_parent %}fc-cart__item--parent-product{% endif %} {% if loop.last %}fc-cart__item--last{% endif %}" {% if item.code != '' %}data-item-code="{{ item.code|escape('html_attr') }}" {% endif %}>
{% if loading_quantity %}
<div class="fc-cart__item--updating">
<div class="fc-spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
</div>
{% endif %}
<div class="fc-cart__item__details-and-image">
{% if has_product_images %}
<div class="fc-cart__item__image">
{% if item.url != '' and item.image != '' %}
<a href="{{ item.url }}" target="_top" alt="{{ item.alt_name }}">
{% endif %}
{% if item.image %}
<span><img class="fc-cart__item__image__img" src="{{ item.image }}" /></span>
{% endif %}
{% if item.url != '' and item.image != '' %}
</a>
{% endif %}
</div>
{% endif %}
<div class="fc-cart__item__details">
<p class="fc-cart__item__name">{{ item.name }}</p>
{% block product_options %}
{% set checkout_sub_cancel = (context == 'checkout' and is_subscription_cancel) %}
{% set show_product_options = true %}
{% set show_product_weight = true %}
{% set show_product_category = true %}
{% set show_product_code = true %}
{% set show_sub_frequency = true %}
{% set show_sub_startdate = true %}
{% set show_sub_nextdate = true %}
{% set show_sub_enddate = true %}
{% set hidden_product_options = [] %}
{% if config.template_config.cart_display_config.usage != "none" %}
{% set show_product_options = config.template_config.cart_display_config.show_product_options %}
{% set show_product_weight = config.template_config.cart_display_config.show_product_weight %}
{% set show_product_category = config.template_config.cart_display_config.show_product_category %}
{% set show_product_code = config.template_config.cart_display_config.show_product_code %}
{% set show_sub_frequency = config.template_config.cart_display_config.show_sub_frequency %}
{% set show_sub_startdate = config.template_config.cart_display_config.show_sub_startdate %}
{% set show_sub_nextdate = config.template_config.cart_display_config.show_sub_nextdate %}
{% set show_sub_enddate = config.template_config.cart_display_config.show_sub_enddate %}
{% set hidden_product_options = config.template_config.cart_display_config.hidden_product_options %}
{% endif %}
<ul class="fc-cart__item__options">
{% if show_product_options %}
{% for option in item.options %}
{% if (option.name|lower not in hidden_product_options) and (option.class|lower not in hidden_product_options) %}
<li class="fc-cart__item__option fc-cart__item__option__{{ option.class }}">
<span class="fc-cart__item__option__name">{{ option.name }}</span>:
<span class="fc-cart__item__option__value">{{ option.value }}</span>
</li>
{% endif %}
{% endfor %}
{% endif %}
{% if item.code != '' and show_product_code %}
<li class="fc-cart__item__option--code">
<span class="fc-cart__item__option__name">{{ config.lang.cart_code|raw }}</span>:
<span class="fc-cart__item__option__value">{{ item.code }}</span>
</li>
{% endif %}
{% if item.category != 'DEFAULT' and show_product_category %}
<li class="fc-cart__item__option--category">
<span class="fc-cart__item__option__name">{{ config.lang.cart_category|raw }}</span>:
<span class="fc-cart__item__option__value">{{ item.category }}</span>
</li>
{% endif %}
{% if item.weight != 0 and show_product_weight %}
<li class="fc-cart__item__option--weight">
<span class="fc-cart__item__option__name">{{ config.lang.cart_weight|raw }}</span>:
<span class="fc-cart__item__option__value">{{ item.weight }} <span class="fc-cart__item__option__value__unit">{{ weight_uom }}</span></span>
</li>
{% endif %}
{% if item.sub_frequency != '' and (show_sub_frequency or show_sub_nextdate or show_sub_startdate or show_sub_enddate) %}
<li class="fc-cart__item__option--subscription-details">
{{ config.lang.cart_subscription_details|raw }}
<ul>
{% if show_sub_frequency %}
<li class="fc-cart__item__option--subscription-frequency">
<span class="fc-cart__item__option__name">{{ config.lang.cart_frequency|raw }}</span>:
<span class="fc-cart__item__option__value">{{ item.sub_frequency }}</span>
</li>
{% endif %}
{% if show_sub_startdate %}
<li class="fc-cart__item__option--subscription-startdate">
<span class="fc-cart__item__option__name">{{ config.lang.cart_start_date|raw }}</span>:
<span class="fc-cart__item__option__value">{{ item.sub_startdate }}</span>
</li>
{% endif %}
{% if show_sub_nextdate and 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--subscription-nextdate">
<span class="fc-cart__item__option__name">{{ config.lang.cart_next_date|raw }}</span>:
<span class="fc-cart__item__option__value">{{ item.sub_nextdate }}</span>
</li>
{% endif %}
{% if show_sub_enddate and item.sub_enddate != "0000-00-00" %}
<li class="fc-cart__item__option--subscription-enddate">
<span class="fc-cart__item__option__name">{{ config.lang.cart_end_date|raw }}</span>:
<span class="fc-cart__item__option__value">{{ item.sub_enddate }}</span>
</li>
{% endif %}
</ul>
</li>
{% endif %}
{% if config.with_controls and checkout_sub_cancel == false and (item.parent_code == '' or (item.parent_code != '' and item.quantity_min == 0)) %}
<li class="fc-cart__item__actions">
<ul class="fc-actions-container">
<li class="fc-cart__item__remove">
<a href="#" title="{{ config.lang.cart_remove_item }}" data-fc-id="item-remove-link" data-fc-item-id="{{ item.id }}">{{ config.lang.cart_remove_item|raw }}</a>
</li>
</ul>
</li>
{% endif %}
</ul>
{% endblock %}
</div>
</div>
<div class="fc-cart__item__totals">
<div class="fc-container__row">
<div class="fc-cart__item__total">
{% if item.parent_code == '' or (item.parent_code != '' and item.price > 0) %}
<p>
{{ item.price|money_format }}{% if item.price_is_fractional %}<span title="{{ item.price }}">…</span>{% endif %}
</p>
{% endif %}
</div>
<div class="fc-cart__item__price">
{% if item.quantity != 1 %}
<p class="fc-cart__item__price__each">
{{ item.price_each|money_format }}{% if item.price_each_is_fractional %}<span title="{{ item.price_each }}">…</span>{% endif %}
<small>
{{ config.lang.cart_each|raw }}
</small>
</p>
{% endif %}
</div>
<div class="fc-cart__item__quantity">
{% if item.parent_code == '' or (item.parent_code != '' and item.quantity_min == 0) %}
{% if config.with_controls and checkout_sub_cancel == false %}
<input type="hidden" id="id{{ item.item_number }}" name="id{{ item.item_number }}" value="{{ item.id }}" />
<input class="fc-cart__item__quantity__input fc-form-control" type="number" name="quantity{{ item.item_number }}" id="quantity{{ item.item_number }}" min="1" value="{{ item.quantity }}" data-fc-id="item-quantity-input" data-fc-item-id="{{ item.id }}"/>
{% else %}
<p>{{ config.lang.cart_qty|raw }}: {{ item.quantity }}</p>
{% endif %}
{% else %}
<p>{{ config.lang.cart_qty|raw }}: {{ item.quantity }}</p>
{% endif %}
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% set info_string = utils.get_info_string('quantity', messages.info) %}
{% if info_string and context != 'cart' %}
<div class="alert">
{{ info_string }}
</div>
{% endif %}
{% endblock cart_items_divs %}
</div>
</div>
<div class="fc-sidebar fc-sidebar--cart">
{% block logo %}
<div class="fc-logo">
{% if config.store_logo_url %}
<img id="fc-logo" class="fc-logo__image" src="{{ config.cache_path }}{{ config.store_logo_url }}" alt="{{ config.store_name }}">
{% else %}
<h1 id="fc-logotype" class="fc-logotype">{{ config.store_name }}</h1>
{% endif %}
</div>
{% endblock logo %}
<div data-fc-id="block-address-entry">
{% block address_entry %}
{% if context == 'cart' and not has_multiple_addresses %}
{% if show_address_entry %}
<div class="fc-address-entry">
<h4>
<svg class="fc-svg-icon fc-icon-large" role="presentation">
{% if shipping_address.has_live_rate_shippable_products %}
<use xlink:href="#fa-truck" /></svg> {{ config.lang.cart_calculate_shipping|raw }}
{% else %}
<use xlink:href="#fa-bank" /></svg> {{ config.lang.cart_calculate_taxes|raw }}
{% endif %}
</h4>
{% include 'postal_code.inc.twig' with {'address': shipping_address} %}
{% if shipping_address.has_live_rate_shippable_products == false %}
<div class="fc-transaction__ui">
<button class="fc-transaction__ui__button fc-button" type="button" data-fc-id="change-address-button">
{{ config.lang.cart_calculate|raw }}
</button>
</div>
{% endif %}
<div data-fc-id="block-shipping-results">
{% block shipping_results %}
{% if shipping_address.loading_shipping_results %}
<div class="fc-spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
{% endif %}
{{ utils.shipping_results(shipping_address, "fc-input-group--sidebar", messages.errors, config.lang) }}
{% set error_string = utils.get_error_string('shipping-results',messages.errors) %}
{% if error_string %}
<div class="fc-alert fc-alert--danger">
{{ error_string }}
</div>
{% endif %}
{% endblock shipping_results %}
</div><!-- data-fc-id="fc-shipping-results" -->
</div><!-- .fc-address-entry -->
{% endif %}
{% endif %}
{% endblock address_entry %}
</div><!-- data-fc-id="block-address-entry" -->
<div data-fc-id="block-order-totals">
{% block order_totals %}
<h3 class="fc-transaction__header">{{ config.lang.cart_order_summary|raw }}</h3>
<ul class="fc-transaction">
{% if shipping_address.has_shippable_products or has_taxes or has_discounts %}
<li class="fc-transaction__subtotal fc-transaction__section">
{% if has_future_products %}<h5>{{ config.lang.cart_todays_charge|raw }}</h5>{% endif %}
<table>
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label"><h5>{{ config.lang.cart_subtotal|raw }}</h5></td>
<td class="fc-subtotal__value">{{ total_item_price|money_format }}</td>
</tr>
</table>
</li>
{% endif %}
{% set enable_coupon_controls = (has_eligible_coupons and config.with_controls) %}
{% if context == 'checkout' %}
{% set enable_coupon_controls = (has_eligible_coupons and config.template_config.custom_checkout_field_requirements.coupon_entry == 'enabled') %}
{% endif %}
{% if not is_subscription_cancel and (enable_coupon_controls or coupons|length > 0) %}
<li class="fc-transaction__discounts fc-transaction__section">
<div data-fc-id="block-coupon-entry">
{% block coupon_entry %}
<div class="fc-transaction__ui">
<h5 class="fc-transaction__ui__header">{{ config.lang.cart_discounts|raw }}</h5>
{% if enable_coupon_controls %}
<button class="fc-transaction__ui__toggle fc-button" type="button" data-fc-id="show-coupon-input-button">
{% if show_coupon_input_button %}
{{ config.lang.cart_hide_coupon_input|raw }}
{% else %}
{{ config.lang.cart_add_coupon|raw }}
{% endif %}
</button>
{% endif %}
</div>
{% set error_string = utils.get_error_string('coupon',messages.errors) %}
{% if enable_coupon_controls and show_coupon_input_button %}
<div class="fc-coupon-entry--input">
<input type="text"
name="coupon"
id="coupon"
value="{{ current_coupon_code }}"
class="fc-coupon-entry__input fc-form-control"
placeholder="{{ config.lang.cart_coupon_code }}"
autocomplete="off">
<span class="fc-input-group__button">
<button class="fc-button fc-coupon-entry__apply" type="button" data-fc-id="add-coupon-button">{{ config.lang.cart_apply|raw }}</button>
</span>
</div>
{% endif %}
{% if loading_coupons %}
<div class="fc-spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
{% endif %}
{% if error_string %}
<div class="fc-alert fc-alert--warning">
{{ error_string }}
</div>
{% endif %}
{% endblock coupon_entry %}
</div><!-- data-fc-id="block-coupon-entry" -->
{% if coupons|length > 0 %}
<table>
{% for key,coupon in coupons %}
<tr class="fc-subtotal--row {# if not coupon.is_applied %}fc-subtotal--row--inactive{% endif #}" data-fc-coupon-container-id="{{ coupon.id }}">
<td class="fc-subtotal__label">
<span class="fc-coupon__name">{{ coupon.name }}</span>:
<span class="fc-coupon__code">{{ key }}</span>
{% if enable_coupon_controls %}
<span class="fc-action--close">
<a href="https://{{ config.store_domain }}/cart?cart=remove_coupon&coupon_code_id={{ coupon.id }}&{{ session_name }}={{ session_id }}" title="{{ config.lang.cart_remove_coupon }}" data-fc-id="remove-coupon-link" data-fc-coupon-code-id="{{ coupon.id }}">
<svg class="fc-svg-icon" title="Remove Coupon" role="presentation"><use xlink:href="#fa-times-circle" /></svg>
</a>
</span>
{% endif %}
</td>
<td class="fc-subtotal__value">{{ coupon.amount|money_format }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
</li>
{% endif %}
{% if shipping_address.has_shippable_products %}
<li class="fc-transaction__shipping fc-transaction__section">
{% if context == 'cart' and not has_multiple_addresses %}
<div class="fc-transaction__ui">
<h5 class="fc-transaction__ui__header">{{ config.lang.cart_shipping_to|raw }}</h5>
{% if shipping_address.country and shipping_address.city and show_address_entry == false %}
<button data-fc-id="change-shipping-location-button" class="fc-button fc-transaction__ui__toggle" type="button">{{ config.lang.cart_change|raw }}</button>
{% endif %}
</div>
{% if shipping_address.country and shipping_address.city %}
<address class="fc-transaction__shipping-address">
{{ shipping_address.city }}, {{ shipping_address.region }} {{ shipping_address.postal_code }}
{% if config.template_config.foxycomplete.show_flags %}
<img src="//cdn.foxycart.com/static/images/icons/flags/famfamfam/{{ shipping_address.country|lower }}.png" alt="{{ shipping_address.country }}">
{% endif %}
</address>
{% endif %}
{% endif %}
{% set shipping_service_label = config.lang.cart_shipping_and_handling|raw %}
{% if shipping_address.shipping_service_id != 0 and shipping_address.shipping_service_description %}
{% set shipping_service_label = shipping_address.shipping_service_description %}
{% endif %}
<table>
<tbody class="fc-subtotal--shipping">
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label">{{ shipping_service_label|raw }}</td>
<td class="fc-subtotal__value">
{% if show_shipping_tbd %}
{{ config.lang.cart_tbd|raw }}
{% else %}
{{ total_shipping|money_format }}
{% endif %}
<input
id="total_shipping"
type="hidden"
name="total_shipping"
value="{{ total_shipping }}"
/>
<input
id="total_future_shipping"
type="hidden"
name="total_future_shipping"
value="{{ total_future_shipping }}"
/>
</td>
</tr>
</tbody>
</table>
</li>
{% elseif total_shipping > 0 %}
<li class="fc-transaction__shipping fc-transaction__section">
<table>
<tbody class="fc-subtotal--shipping">
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label">{{ shipping_and_handling_label|raw }}</td>
<td class="fc-subtotal__value">
{{ total_shipping|money_format }}
<input
id="total_shipping"
type="hidden"
name="total_shipping"
value="{{ total_shipping }}"
/>
</td>
</tr>
</tbody>
</table>
</li>
{% endif %}
{% if has_taxes %}
<li class="fc-transaction__taxes fc-transaction__section">
{% set show_tax_header = false %}
{% if has_multiple_addresses %}
{% for multiship in multiship_data %}
{% if multiship.taxes|length > 0 %}
{% set show_tax_header = true %}
{% endif %}
{% endfor %}
{% else %}
{% if shipping_address.taxes|length > 0 %}
{% set show_tax_header = true %}
{% endif %}
{% endif %}
{% if context == 'receipt' %}
{% set show_tax_header = false %}
{% endif %}
{% if show_tax_header %}
<div class="fc-transaction__ui">
<h5 class="fc-transaction__ui__header">{{ config.lang.cart_tax|raw }}</h5>
</div>
{% if loading_taxes %}
<div class="fc-spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
{% endif %}
{% endif %}
<table>
<tbody data-fc-id="taxes" class="fc-subtotal--taxes">
{% block taxes %}
{% if has_multiple_addresses %}
{% if context == 'checkout' %}
{% for multiship in multiship_data %}
{% for tax in multiship.taxes %}
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label">
{{ multiship.address_name }}: {{ tax.name }} (<span class="fc_cart_foot_tax_rate">{{ tax.rate }}</span>%):
</td>
<td class="fc-subtotal__value">
{{ tax.amount|money_format }}
</td>
</tr>
{% endfor %}
{% endfor %}
{% endif %}
{% if context == 'receipt' %}
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label">
{{ config.lang.cart_tax|raw }}
</td>
<td class="fc-subtotal__value">
{{ total_tax|money_format }}
</td>
</tr>
{% endif %}
{% else %}
{% for tax in shipping_address.taxes %}
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label">
{{ tax.name }} (<span class="fc_cart_foot_tax_rate">{{ tax.rate }}</span>%):
</td>
<td class="fc-subtotal__value">
{{ tax.amount|money_format }}
</td>
</tr>
{% endfor %}
{% endif %}
{% endblock %}
</tbody>
</table>
</li>
{% endif %}
<li class="fc-transaction__total fc-transaction__section">
<table>
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label">
{{ config.lang.cart_order_total|raw }}:
</td>
<td class="fc-subtotal__value">
{{ total_order|money_format }}
</td>
</tr>
</table>
</li>
</ul>
{% if context == "checkout" and has_multiple_addresses and multiship_data|length > 1 %}
<div class="fc-transaction fc-transaction--multiship">
<button type="button" class="fc-button fc-transaction__ui__toggle" data-fc-id="button-toggle-multiship-details">{{ config.lang.cart_details|raw }}</button>
{% for multiship in multiship_data %}
<div class="fc-transaction__ui">
<h5 class="fc-transaction__ui__header">{{ config.lang.cart_shipto|raw }}{{ multiship.address_name }}
<span class="fc-transaction__ui__header__value">{{ multiship.total_price|money_format }}</span></h5>
{% if show_multiship_details %}
<table>
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label"> {{ config.lang.checkout_shipment_subtotal|raw }}: </td>
<td class="fc-subtotal__value"> {{ multiship.total_item_price|money_format }} </td>
</tr>
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label"> {{ multiship.shipping_service_description|raw }}: </td>
<td class="fc-subtotal__value"> {{ multiship.total_shipping|money_format }} </td>
</tr>
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label"> {{ config.lang.checkout_shipment_tax|raw }}: </td>
<td class="fc-subtotal__value"> {{ multiship.total_tax|money_format }} </td>
</tr>
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label"> {{ config.lang.checkout_shipment_total|raw }}: </td>
<td class="fc-subtotal__value"> {{ multiship.total_price|money_format }} </td>
</tr>
</table>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
{% if has_future_products and not is_subscription_cancel %}
{% block future_products %}
<div class="fc-transaction fc-transaction--future">
{% set has_future_subscription_details = false %}
{% if future_subscription_totals_by_date|length > 0 and (has_future_shipping or future_coupons|length > 0 or has_future_taxes) %}
{% set has_future_subscription_details = true %}
{% endif %}
{% if (context == "cart" or context == "checkout") and has_future_subscription_details %}
<button type="button" class="fc-button fc-transaction__ui__toggle" data-fc-id="button-toggle-future-subscription-details">{{ config.lang.cart_details|raw }}</button>
{% endif %}
{% if future_subscription_totals_by_date|length > 0 %}
<h5 class="fc-transaction__ui__header">
{% if future_subscription_totals_by_date|length > 1 %}
{{ config.lang.cart_future_charges|raw }}
{% else %}
{{ config.lang.cart_future_charge|raw }}
{% endif %}
</h5>
{% endif %}
{% for key, subscription_item_total in future_subscription_totals_by_date %}
<div class="fc-transaction__ui">
<h5 class="fc-transaction__ui__header">{{ key|date("F jS, Y") }}
<span class="fc-transaction__ui__header__value">{{ subscription_item_total.total|money_format }}</span>
</h5>
{% if has_future_subscription_details and show_future_subscriptions_details %}
<table>
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label"> {{ config.lang.cart_subtotal|raw }}: </td>
<td class="fc-subtotal__value"> {{ subscription_item_total.total_item_price|money_format }} </td>
</tr>
{% for key,coupon in future_coupons %}
<tr class="fc-subtotal--row fc-transaction--future__discounts">
<td class="fc-subtotal__label">{{ coupon.name }}: {{ key }}</td>
<td class="fc-subtotal__value">{{ coupon.amount|money_format }}</td>
</tr>
{% endfor %}
{% if has_future_shipping %}
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label"> {{ shipping_address.future_shipping_service_description|raw }}: </td>
<td class="fc-subtotal__value"> {{ subscription_item_total.total_shipping|money_format }} </td>
</tr>
{% endif %}
{% if has_future_taxes %}
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label"> {{ config.lang.cart_tax|raw }}: </td>
<td class="fc-subtotal__value"> {{ subscription_item_total.total_tax|money_format }} </td>
</tr>
{% endif %}
<tr class="fc-subtotal--row">
<td class="fc-subtotal__label"> {{ config.lang.cart_total|raw }}: </td>
<td class="fc-subtotal__value"> {{ subscription_item_total.total|money_format }} </td>
</tr>
</table>
{% endif %}
</div>
{% endfor %}
</div>
{% endblock future_products %}
{% endif %}
{% endblock order_totals %}
</div><!-- data-fc-id="block-order-totals" -->
{% block order_payment_actions %}
{% if context == 'cart' %}
<div class="fc-actions--payment">
{% if items|length > 0 %}
{% block order_payment_action_checkout %}
<p class="fc-action--payment--checkout">
<a class="fc-action--checkout--button" href="https://{{ config.store_domain }}/checkout?{{ session_name }}={{ session_id }}" target="_top"><svg class="fc-svg-icon" role="presentation" title="Security Icon"><use xlink:href="#fa-lock" /></svg> {{ config.lang.cart_checkout|raw }}</a>
</p>
{% endblock order_payment_action_checkout %}
{% block order_payment_action_paypal_express %}
{% if total_order > 0 %}
{% if show_paypal_express_payment_option %}
<p class="fc-action--payment--or">—{{ config.lang.cart_or|raw }}—</p>
<p class="fc-action--payment--paypal-express-checkout">
<a data-fc-id="paypal-link" href="https://{{ config.store_domain }}/checkout?ThisAction=paypal_express&{{ session_name }}={{ session_id }}" target="_top">
<img src="{{ config.paypal_checkout_button_url }}" alt="{{ config.lang.cart_payment_method_paypal_express }}" />
</a>
</p>
{% endif %}
{% endif %}
{% endblock order_payment_action_paypal_express %}
{% block order_payment_options %}
{% if payment_info_required %}
{% for gateway in order_payment_options %}
<p class="fc-action--payment--or">—{{ config.lang.cart_or|raw }}—</p>
<p class="fc-action--payment--{{ gateway.name_dashed }}">
<a data-fc-id="{{ gateway.name_dashed }}-link" href="https://{{ config.store_domain }}/checkout?ThisAction=checkout&fc_payment_method={{ gateway.name }}&{{ session_name }}={{ session_id }}{%if gateway.additional_params%}&{{gateway.additional_params}}{% endif %}" target="_top">
<img src="{{ gateway.logo_url }}" />
</a>
</p>
{% endfor %}
{% endif %}{# payment_info_required #}
{% endblock order_payment_options %}
{% endif %}{# items|length > 0 #}
</div>
{% endif %}{# context == 'cart' #}
{% endblock order_payment_actions %}
</div>
{% block cart_form_end %}
{% if config.with_controls %}
</form>
{% endif %}
{% endblock cart_form_end %}
</div>{# .fc-cart-container #}
{% endif %} {# not is_updateinfo #}
</div>{# #fc-cart-responsive / #fc-cart-non-responsive #}
</div><!-- data-fc-container="cart" -->
{% endblock %}{# cart #}
{# ===================================================== #}