1b36afa6f8db6d983cb067deac84dc51.php
11.1 KB
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
<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* default/template/common/cart.twig */
class __TwigTemplate_1689113732a81c49ad473b69c9220dbd extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
yield "<div id=\"cart\" class=\"btn-group btn-block\">
<button type=\"button\" data-toggle=\"dropdown\" data-loading-text=\"";
// line 2
yield ($context["text_loading"] ?? null);
yield "\" class=\"btn btn-inverse btn-block btn-lg dropdown-toggle\"><i class=\"fa fa-shopping-cart\"></i> <span id=\"cart-total\">";
yield ($context["text_items"] ?? null);
yield "</span></button>
<ul class=\"dropdown-menu pull-right\">
";
// line 4
if ((($context["products"] ?? null) || ($context["vouchers"] ?? null))) {
// line 5
yield " <li>
<table class=\"table table-striped\">
";
// line 7
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(($context["products"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
// line 8
yield " <tr>
<td class=\"text-center\">";
// line 9
if (CoreExtension::getAttribute($this->env, $this->source, $context["product"], "thumb", [], "any", false, false, false, 9)) {
yield " <a href=\"";
yield CoreExtension::getAttribute($this->env, $this->source, $context["product"], "href", [], "any", false, false, false, 9);
yield "\"><img src=\"";
yield CoreExtension::getAttribute($this->env, $this->source, $context["product"], "thumb", [], "any", false, false, false, 9);
yield "\" alt=\"";
yield CoreExtension::getAttribute($this->env, $this->source, $context["product"], "name", [], "any", false, false, false, 9);
yield "\" title=\"";
yield CoreExtension::getAttribute($this->env, $this->source, $context["product"], "name", [], "any", false, false, false, 9);
yield "\" class=\"img-thumbnail\" /></a> ";
}
yield "</td>
<td class=\"text-left\"><a href=\"";
// line 10
yield CoreExtension::getAttribute($this->env, $this->source, $context["product"], "href", [], "any", false, false, false, 10);
yield "\">";
yield CoreExtension::getAttribute($this->env, $this->source, $context["product"], "name", [], "any", false, false, false, 10);
yield "</a> ";
if (CoreExtension::getAttribute($this->env, $this->source, $context["product"], "option", [], "any", false, false, false, 10)) {
// line 11
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "option", [], "any", false, false, false, 11));
foreach ($context['_seq'] as $context["_key"] => $context["option"]) {
yield " <br />
- <small>";
// line 12
yield CoreExtension::getAttribute($this->env, $this->source, $context["option"], "name", [], "any", false, false, false, 12);
yield " ";
yield CoreExtension::getAttribute($this->env, $this->source, $context["option"], "value", [], "any", false, false, false, 12);
yield "</small> ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['option'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 13
yield " ";
}
// line 14
yield " ";
if (CoreExtension::getAttribute($this->env, $this->source, $context["product"], "recurring", [], "any", false, false, false, 14)) {
yield " <br />
- <small>";
// line 15
yield ($context["text_recurring"] ?? null);
yield " ";
yield CoreExtension::getAttribute($this->env, $this->source, $context["product"], "recurring", [], "any", false, false, false, 15);
yield "</small> ";
}
yield "</td>
<td class=\"text-right\">x ";
// line 16
yield CoreExtension::getAttribute($this->env, $this->source, $context["product"], "quantity", [], "any", false, false, false, 16);
yield "</td>
<td class=\"text-right\">";
// line 17
yield CoreExtension::getAttribute($this->env, $this->source, $context["product"], "total", [], "any", false, false, false, 17);
yield "</td>
<td class=\"text-center\"><button type=\"button\" onclick=\"cart.remove('";
// line 18
yield CoreExtension::getAttribute($this->env, $this->source, $context["product"], "cart_id", [], "any", false, false, false, 18);
yield "');\" title=\"";
yield ($context["button_remove"] ?? null);
yield "\" class=\"btn btn-danger btn-xs\"><i class=\"fa fa-times\"></i></button></td>
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(($context["vouchers"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["voucher"]) {
// line 22
yield " <tr>
<td class=\"text-center\"></td>
<td class=\"text-left\">";
// line 24
yield CoreExtension::getAttribute($this->env, $this->source, $context["voucher"], "description", [], "any", false, false, false, 24);
yield "</td>
<td class=\"text-right\">x 1</td>
<td class=\"text-right\">";
// line 26
yield CoreExtension::getAttribute($this->env, $this->source, $context["voucher"], "amount", [], "any", false, false, false, 26);
yield "</td>
<td class=\"text-center text-danger\"><button type=\"button\" onclick=\"voucher.remove('";
// line 27
yield CoreExtension::getAttribute($this->env, $this->source, $context["voucher"], "key", [], "any", false, false, false, 27);
yield "');\" title=\"";
yield ($context["button_remove"] ?? null);
yield "\" class=\"btn btn-danger btn-xs\"><i class=\"fa fa-times\"></i></button></td>
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['voucher'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 30
yield " </table>
</li>
<li>
<div>
<table class=\"table table-bordered\">
";
// line 35
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(($context["totals"] ?? null));
foreach ($context['_seq'] as $context["_key"] => $context["total"]) {
// line 36
yield " <tr>
<td class=\"text-right\"><strong>";
// line 37
yield CoreExtension::getAttribute($this->env, $this->source, $context["total"], "title", [], "any", false, false, false, 37);
yield "</strong></td>
<td class=\"text-right\">";
// line 38
yield CoreExtension::getAttribute($this->env, $this->source, $context["total"], "text", [], "any", false, false, false, 38);
yield "</td>
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['total'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 41
yield " </table>
<p class=\"text-right\"><a href=\"";
// line 42
yield ($context["cart"] ?? null);
yield "\"><strong><i class=\"fa fa-shopping-cart\"></i> ";
yield ($context["text_cart"] ?? null);
yield "</strong></a> <a href=\"";
yield ($context["checkout"] ?? null);
yield "\"><strong><i class=\"fa fa-share\"></i> ";
yield ($context["text_checkout"] ?? null);
yield "</strong></a></p>
</div>
</li>
";
} else {
// line 46
yield " <li>
<p class=\"text-center\">";
// line 47
yield ($context["text_empty"] ?? null);
yield "</p>
</li>
";
}
// line 50
yield " </ul>
</div>
";
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "default/template/common/cart.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 213 => 50, 207 => 47, 204 => 46, 191 => 42, 188 => 41, 179 => 38, 175 => 37, 172 => 36, 168 => 35, 161 => 30, 150 => 27, 146 => 26, 141 => 24, 137 => 22, 132 => 21, 121 => 18, 117 => 17, 113 => 16, 105 => 15, 100 => 14, 97 => 13, 88 => 12, 81 => 11, 75 => 10, 61 => 9, 58 => 8, 54 => 7, 50 => 5, 48 => 4, 41 => 2, 38 => 1,);
}
public function getSourceContext()
{
return new Source("", "default/template/common/cart.twig", "");
}
}