blob: b4248f6a01c6a5e2ae5f6ae18f7efb17d83c185e (
plain)
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
|
[tmp page_title]__COMPANY__ -- [L]Shopping Cart[/L][/tmp]
@_TOP_@
<!-- BEGIN CONTENT -->
<div class="container p-4">
<!-- Hero Section-->
<div class="py-2">
<div class="text-start">
<h1>[L]Shopping cart[/L]</h1>
</div>
<!-- Cart subheading -->
<div>
<p class="lead text-muted">
You have [nitems] items in your shopping cart.
</p>
</div>
<!-- End of cart subheading -->
</div>
<!-- End of Hero section -->
<!-- Shopping Cart Section-->
<div class="container">
<div class="container">
<div class="container">
<div class="container">
[edisplay]
[calc]
my $cname = $Config->{CookieName} || 'MV_SESSION_ID';
$Scratch->{have_cookie} = $Tag->read_cookie($cname)
and delete $Scratch->{tried};
return;
[/calc]
[if scratch have_cookie]
[elsif scratch tried]
[L CART_MSG1]You must have cookies set to leave the basket. Check out now or forever lose your shopping cart.[/L]
[/elsif]
[else]
[set tried]1[/set]
[bounce href="[area ord/basket]"]
[/else]
[/if]
<form action="[process secure=1]" method=POST name="basket" class="form-horizontal" id="form">
[form-session-id]
<input type="hidden" name="mv_doit" value="refresh">
<input type="hidden" name="mv_orderpage" value="ord/basket">
<input type="hidden" name="mv_nextpage" value="index">
<input type="hidden" name="mv_nlines" value="[nitems lines=1]">
<div class="cart">
<div class="cart-header text-center">
<div class="row">
<div class="col-md-5">[L]Item[/L]</div>
<div class="col-md-7 d-none d-md-block">
<div class="row">
<div class="col-md-3">[L]Price[/L]</div>
<div class="col-md-4">[L]Qty[/L]</div>
<div class="col-md-3">[L]Total[/L]</div>
<div class="col-md-2"></div>
</div>
</div>
</div>
</div>
<div class="cart-body">
[if items]
[then]
[item-list]
[item-calc]
#Log("Checking master item $master");
$row_class = ++$count % 2 ? 'cartnorm' : 'cartalt';
my $item = '[item-increment]';
my $up = q{[item-data merchandising upsell_to]};
my $cr = q{[item-data merchandising cross_sell]};
$upsell_remove{'[item-code]'} = 1;
$cross_remove{'[item-code]'} = 1;
my %seen = ( '' => 1 );
$Scratch->{upsell} .= " $up" if $up;
$Scratch->{cross_codes} .= " $cr" if $cr;
my @up = split /\s+/, $Scratch->{upsell};
my @cr = split /\s+/, $Scratch->{cross_codes};
@up = grep ( (!$seen{$_}++ && ! $upsell_remove{$_}), @up);
@cr = grep ( (!$seen{$_}++ && ! $cross_remove{$_}), @cr);
$Scratch->{upsell} = join " ", @up;
$Scratch->{cross_codes} = join " ", @cr;
return;
[/item-calc]
<!-- Cart item -->
<div class="cart-item">
<div class="row d-flex align-items-center text-left text-md-center">
<div class="col-12 col-md-5">
<a class="cart-remove close mt-3 d-md-none" href="#">
<span class="material-icons-outlined">highlight_off</span>
</a>
<div class="d-flex align-items-center">
<a href="[area href="[item-sku]"]">
<img src=__IMAGE_DIR__/items/[item-field image] class="rounded cart-item-img">
</a>
<div class="cart-title text-left"><a href="[area href="[item-sku]"]"><strong>[item-description]</strong></a><br><span class="text-muted text-sm">Size: Large</span><br><span class="text-muted text-sm">Colour: Green</span>
</div>
</div>
</div>
<div class="col-12 col-md-7 mt-4 mt-md-0">
<div class="row align-items-center">
<div class="col-md-3">
<div class="row">
<div class="col-6 d-md-none text-muted">[L]Price[/L]</div>
<div class="col-6 col-md-12 text-right text-md-center">[item-discount-price]</div>
</div>
</div>
<div class="col-md-4">
<div class="row align-items-center">
<div class="d-md-none col-7 col-sm-9 text-muted">[L]Quantity[/L]</div>
<div class="col-5 col-sm-3 col-md-12">
<div class="d-flex align-items-center">
<div class="btn btn-items btn-items-decrease" onclick="document.getElementById('[item-quantity-name]').value--; document.getElementById('form').submit()">-</div>
<input class="form-control text-center border-0 border-md input-items" type="text" value="[item-quantity]" name="[item-quantity-name]" id="[item-quantity-name]" onchange="this.form.submit()">
<div class="btn btn-items btn-items-increase" onclick="document.getElementById('[item-quantity-name]').value++; document.getElementById('form').submit()">+</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="row">
<div class="col-6 d-md-none text-muted">[L]Total price[/L]</div>
<div class="col-6 col-md-12 text-right text-md-center">[subtotal]</div>
</div>
</div>
<div class="col-md-2 d-none d-md-block text-center">
<a class="cart-remove" href="#" onclick="document.getElementById('[item-quantity-name]').value = 0; document.getElementById('form').submit()">
<span class="material-icons-outlined">
highlight_off
</span>
</a>
</div>
</div>
</div>
</div>
</div>
[/item-list]
[/then]
[/if]
<!-- End of Cart item -->
</div>
</div>
<div class="my-5 d-flex justify-content-between flex-column flex-lg-row">
<a class="btn btn-link text-decoration-none text-muted d-flex justify-content-center align-content-between" href="[area All-Products]">
<span class="material-icons-outlined">
chevron_left
</span>
[L]Continue Shopping[/L]
</a>
<a class="btn btn-dark d-flex justify-content-center align-content-between" href="[area ord/checkout]">
<span class="material-icons-outlined"> payments</span>
[L]Proceed to checkout[/L]
</a>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- End of Shopping cart section -->
</div>
<!-- END CONTENT -->
@_BOTTOM_@
|