var/cache/dev/twig/84/840ceb251c6b6219d3ab8c7393b9f80a.php line 33

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* VisualMediaOrderBundle/views/Cart/cart.html.twig */
  14. class __TwigTemplate_30ac645f21d4433721daaeca2dd896b4 extends \Twig\Template
  15. {
  16. private $source;
  17. private $macros = [];
  18. public function __construct(Environment $env)
  19. {
  20. parent::__construct($env);
  21. $this->source = $this->getSourceContext();
  22. $this->parent = false;
  23. $this->blocks = [
  24. ];
  25. }
  26. protected function doDisplay(array $context, array $blocks = [])
  27. {
  28. $macros = $this->macros;
  29. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "VisualMediaOrderBundle/views/Cart/cart.html.twig"));
  31. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "VisualMediaOrderBundle/views/Cart/cart.html.twig"));
  33. // line 1
  34. echo "<div class=\"cart\">
  35. ";
  36. // line 2
  37. echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 2, $this->source); })()), 'form_start', ["attr" => ["class" => "form-horizontal validation"]]);
  38. echo "
  39. ";
  40. // line 3
  41. echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 3, $this->source); })()), 'errors');
  42. echo "
  43. <table class=\"table table-hover table-borderless\">
  44. <thead>
  45. <tr>
  46. <th style=\"width: 150px;\"></th>
  47. <th>";
  48. // line 9
  49. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.product", [], "frontend"), "html", null, true);
  50. echo "</th>
  51. <th style=\"width: 15%;\">";
  52. // line 10
  53. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.amount", [], "frontend"), "html", null, true);
  54. echo "</th>
  55. <th class=\"text-right\">";
  56. // line 11
  57. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.price", [], "frontend"), "html", null, true);
  58. echo "</th>
  59. <th class=\"text-left\">";
  60. // line 12
  61. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.total", [], "frontend"), "html", null, true);
  62. echo "</th>
  63. <th></th>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. ";
  68. // line 18
  69. $context['_parent'] = $context;
  70. $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 18, $this->source); })()), "items", [], "any", false, false, false, 18));
  71. $context['_iterated'] = false;
  72. foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
  73. // line 19
  74. echo " ";
  75. $this->loadTemplate("@VisualMediaOrder/Cart/item.html.twig", "VisualMediaOrderBundle/views/Cart/cart.html.twig", 19)->display(twig_to_array(["form" => $context["child"]]));
  76. // line 20
  77. echo " ";
  78. $context['_iterated'] = true;
  79. }
  80. if (!$context['_iterated']) {
  81. // line 21
  82. echo " <tr>
  83. <td></td>
  84. <td colspan=\"5\">";
  85. // line 23
  86. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.empty", [], "frontend"), "html", null, true);
  87. echo "</td>
  88. </tr>
  89. ";
  90. }
  91. $_parent = $context['_parent'];
  92. unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
  93. $context = array_intersect_key($context, $_parent) + $_parent;
  94. // line 26
  95. echo " </tbody>
  96. <tfoot>
  97. ";
  98. // line 29
  99. if ( !twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 29, $this->source); })()), "empty", [], "any", false, false, false, 29)) {
  100. // line 30
  101. echo " <tr>
  102. <th colspan=\"4\" class=\"text-right\">";
  103. // line 31
  104. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.subtotal", [], "frontend"), "html", null, true);
  105. echo "</th>
  106. <th class=\"text-left\">&euro; ";
  107. // line 32
  108. echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigFormatHelper']->priceFormat(twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 32, $this->source); })()), "subtotal", [], "any", false, false, false, 32)), "html", null, true);
  109. echo "</th>
  110. </tr>
  111. ";
  112. // line 35
  113. if ( !(null === twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 35, $this->source); })()), "order", [], "any", false, false, false, 35))) {
  114. // line 36
  115. echo " ";
  116. if ( !(null === twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 36, $this->source); })()), "order", [], "any", false, false, false, 36), "discount", [], "any", false, false, false, 36))) {
  117. // line 37
  118. echo " <tr>
  119. <th colspan=\"4\" class=\"text-right\">";
  120. // line 38
  121. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.discount", [], "frontend"), "html", null, true);
  122. echo " <sup>(";
  123. echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 38, $this->source); })()), "order", [], "any", false, false, false, 38), "discount", [], "any", false, false, false, 38), "code", [], "any", false, false, false, 38), "html", null, true);
  124. echo ")</sup></th>
  125. <th class=\"text-left\">&euro; ";
  126. // line 39
  127. echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigFormatHelper']->priceFormat(twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 39, $this->source); })()), "discountPrice", [], "any", false, false, false, 39)), "html", null, true);
  128. echo "</th>
  129. </tr>
  130. ";
  131. }
  132. // line 42
  133. echo " ";
  134. }
  135. // line 43
  136. echo "
  137. <tr>
  138. <th colspan=\"4\" class=\"text-right\">";
  139. // line 45
  140. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.shipping_costs", [], "frontend"), "html", null, true);
  141. echo ":</th>
  142. <th class=\"text-left\">
  143. ";
  144. // line 47
  145. if ((twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 47, $this->source); })()), "shippingCosts", [], "any", false, false, false, 47) > 0)) {
  146. // line 48
  147. echo " &euro; ";
  148. echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigFormatHelper']->priceFormat(twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 48, $this->source); })()), "shippingCosts", [], "any", false, false, false, 48)), "html", null, true);
  149. echo "
  150. ";
  151. } else {
  152. // line 50
  153. echo " <span class=\"free\">";
  154. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.free", [], "frontend"), "html", null, true);
  155. echo "</span>
  156. ";
  157. }
  158. // line 52
  159. echo " </th>
  160. <th></th>
  161. </tr>
  162. ";
  163. // line 56
  164. if ((twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 56, $this->source); })()), "paymentCosts", [], "any", false, false, false, 56) > 0)) {
  165. // line 57
  166. echo " <tr>
  167. <th colspan=\"4\" class=\"text-right\">";
  168. // line 58
  169. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.payment_costs", [], "frontend"), "html", null, true);
  170. echo ":</th>
  171. <th class=\"text-left\">
  172. &euro; ";
  173. // line 60
  174. echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigFormatHelper']->priceFormat(twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 60, $this->source); })()), "paymentCosts", [], "any", false, false, false, 60)), "html", null, true);
  175. echo "
  176. </th>
  177. <th></th>
  178. </tr>
  179. ";
  180. }
  181. // line 65
  182. echo "
  183. <tr>
  184. <th colspan=\"4\" class=\"text-right\">";
  185. // line 67
  186. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.total", [], "frontend"), "html", null, true);
  187. echo "</th>
  188. <th class=\"text-left\">&euro; ";
  189. // line 68
  190. echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigFormatHelper']->priceFormat(twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 68, $this->source); })()), "total", [], "any", false, false, false, 68)), "html", null, true);
  191. echo "</th>
  192. <th></th>
  193. </tr>
  194. ";
  195. }
  196. // line 72
  197. echo " </tfoot>
  198. </table>
  199. <div class=\"row\">
  200. <div class=\"col-12\">
  201. <a class=\"btn btn-primary\" href=\"";
  202. // line 77
  203. echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("home");
  204. echo "\">";
  205. echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.continue_shopping", [], "frontend"), "html", null, true);
  206. echo "</a>
  207. ";
  208. // line 79
  209. echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 79, $this->source); })()), "submit", [], "any", false, false, false, 79), 'widget', ["attr" => ["class" => "btn btn-success float-right"]]);
  210. echo "
  211. </div>
  212. </div>
  213. ";
  214. // line 83
  215. echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 83, $this->source); })()), 'form_end');
  216. echo "
  217. </div>
  218. ";
  219. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  220. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  221. }
  222. public function getTemplateName()
  223. {
  224. return "VisualMediaOrderBundle/views/Cart/cart.html.twig";
  225. }
  226. public function isTraitable()
  227. {
  228. return false;
  229. }
  230. public function getDebugInfo()
  231. {
  232. return array ( 232 => 83, 225 => 79, 218 => 77, 211 => 72, 204 => 68, 200 => 67, 196 => 65, 188 => 60, 183 => 58, 180 => 57, 178 => 56, 172 => 52, 166 => 50, 160 => 48, 158 => 47, 153 => 45, 149 => 43, 146 => 42, 140 => 39, 134 => 38, 131 => 37, 128 => 36, 126 => 35, 120 => 32, 116 => 31, 113 => 30, 111 => 29, 106 => 26, 97 => 23, 93 => 21, 88 => 20, 85 => 19, 80 => 18, 71 => 12, 67 => 11, 63 => 10, 59 => 9, 50 => 3, 46 => 2, 43 => 1,);
  233. }
  234. public function getSourceContext()
  235. {
  236. return new Source("<div class=\"cart\">
  237. {{ form_start(form, { attr: { class: 'form-horizontal validation' }}) }}
  238. {{ form_errors(form) }}
  239. <table class=\"table table-hover table-borderless\">
  240. <thead>
  241. <tr>
  242. <th style=\"width: 150px;\"></th>
  243. <th>{{ 'cart.product'|trans({}, 'frontend') }}</th>
  244. <th style=\"width: 15%;\">{{ 'cart.amount'|trans({}, 'frontend') }}</th>
  245. <th class=\"text-right\">{{ 'cart.price'|trans({}, 'frontend') }}</th>
  246. <th class=\"text-left\">{{ 'cart.total'|trans({}, 'frontend') }}</th>
  247. <th></th>
  248. </tr>
  249. </thead>
  250. <tbody>
  251. {% for child in form.items %}
  252. {% include '@VisualMediaOrder/Cart/item.html.twig' with { form: child } only %}
  253. {% else %}
  254. <tr>
  255. <td></td>
  256. <td colspan=\"5\">{{ 'cart.empty'|trans({}, 'frontend') }}</td>
  257. </tr>
  258. {% endfor %}
  259. </tbody>
  260. <tfoot>
  261. {% if not cart.empty %}
  262. <tr>
  263. <th colspan=\"4\" class=\"text-right\">{{ 'cart.subtotal'|trans({}, 'frontend') }}</th>
  264. <th class=\"text-left\">&euro; {{ cart.subtotal|price_format }}</th>
  265. </tr>
  266. {% if cart.order is not null %}
  267. {% if cart.order.discount is not null %}
  268. <tr>
  269. <th colspan=\"4\" class=\"text-right\">{{ 'cart.discount'|trans({}, 'frontend') }} <sup>({{ cart.order.discount.code }})</sup></th>
  270. <th class=\"text-left\">&euro; {{ cart.discountPrice|price_format }}</th>
  271. </tr>
  272. {% endif %}
  273. {% endif %}
  274. <tr>
  275. <th colspan=\"4\" class=\"text-right\">{{ 'cart.shipping_costs'|trans({}, 'frontend') }}:</th>
  276. <th class=\"text-left\">
  277. {% if cart.shippingCosts > 0 %}
  278. &euro; {{ cart.shippingCosts|price_format }}
  279. {% else %}
  280. <span class=\"free\">{{ 'cart.free'|trans({}, 'frontend') }}</span>
  281. {% endif %}
  282. </th>
  283. <th></th>
  284. </tr>
  285. {% if cart.paymentCosts > 0 %}
  286. <tr>
  287. <th colspan=\"4\" class=\"text-right\">{{ 'cart.payment_costs'|trans({}, 'frontend') }}:</th>
  288. <th class=\"text-left\">
  289. &euro; {{ cart.paymentCosts|price_format }}
  290. </th>
  291. <th></th>
  292. </tr>
  293. {% endif %}
  294. <tr>
  295. <th colspan=\"4\" class=\"text-right\">{{ 'cart.total'|trans({}, 'frontend') }}</th>
  296. <th class=\"text-left\">&euro; {{ cart.total|price_format }}</th>
  297. <th></th>
  298. </tr>
  299. {% endif %}
  300. </tfoot>
  301. </table>
  302. <div class=\"row\">
  303. <div class=\"col-12\">
  304. <a class=\"btn btn-primary\" href=\"{{ path('home') }}\">{{ 'cart.continue_shopping'|trans({}, 'frontend') }}</a>
  305. {{ form_widget(form.submit, { attr: { class: 'btn btn-success float-right' }}) }}
  306. </div>
  307. </div>
  308. {{ form_end(form) }}
  309. </div>
  310. ", "VisualMediaOrderBundle/views/Cart/cart.html.twig", "/var/www/public_html/templates/VisualMediaOrderBundle/views/Cart/cart.html.twig");
  311. }
  312. }