<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* VisualMediaOrderBundle/views/Cart/cart.html.twig */
class __TwigTemplate_30ac645f21d4433721daaeca2dd896b4 extends \Twig\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;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "VisualMediaOrderBundle/views/Cart/cart.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "VisualMediaOrderBundle/views/Cart/cart.html.twig"));
// line 1
echo "<div class=\"cart\">
";
// line 2
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"]]);
echo "
";
// line 3
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');
echo "
<table class=\"table table-hover table-borderless\">
<thead>
<tr>
<th style=\"width: 150px;\"></th>
<th>";
// line 9
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.product", [], "frontend"), "html", null, true);
echo "</th>
<th style=\"width: 15%;\">";
// line 10
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.amount", [], "frontend"), "html", null, true);
echo "</th>
<th class=\"text-right\">";
// line 11
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.price", [], "frontend"), "html", null, true);
echo "</th>
<th class=\"text-left\">";
// line 12
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.total", [], "frontend"), "html", null, true);
echo "</th>
<th></th>
</tr>
</thead>
<tbody>
";
// line 18
$context['_parent'] = $context;
$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));
$context['_iterated'] = false;
foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
// line 19
echo " ";
$this->loadTemplate("@VisualMediaOrder/Cart/item.html.twig", "VisualMediaOrderBundle/views/Cart/cart.html.twig", 19)->display(twig_to_array(["form" => $context["child"]]));
// line 20
echo " ";
$context['_iterated'] = true;
}
if (!$context['_iterated']) {
// line 21
echo " <tr>
<td></td>
<td colspan=\"5\">";
// line 23
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.empty", [], "frontend"), "html", null, true);
echo "</td>
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 26
echo " </tbody>
<tfoot>
";
// line 29
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)) {
// line 30
echo " <tr>
<th colspan=\"4\" class=\"text-right\">";
// line 31
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.subtotal", [], "frontend"), "html", null, true);
echo "</th>
<th class=\"text-left\">€ ";
// line 32
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);
echo "</th>
</tr>
";
// line 35
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))) {
// line 36
echo " ";
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))) {
// line 37
echo " <tr>
<th colspan=\"4\" class=\"text-right\">";
// line 38
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.discount", [], "frontend"), "html", null, true);
echo " <sup>(";
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);
echo ")</sup></th>
<th class=\"text-left\">€ ";
// line 39
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);
echo "</th>
</tr>
";
}
// line 42
echo " ";
}
// line 43
echo "
<tr>
<th colspan=\"4\" class=\"text-right\">";
// line 45
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.shipping_costs", [], "frontend"), "html", null, true);
echo ":</th>
<th class=\"text-left\">
";
// line 47
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)) {
// line 48
echo " € ";
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);
echo "
";
} else {
// line 50
echo " <span class=\"free\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.free", [], "frontend"), "html", null, true);
echo "</span>
";
}
// line 52
echo " </th>
<th></th>
</tr>
";
// line 56
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)) {
// line 57
echo " <tr>
<th colspan=\"4\" class=\"text-right\">";
// line 58
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.payment_costs", [], "frontend"), "html", null, true);
echo ":</th>
<th class=\"text-left\">
€ ";
// line 60
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);
echo "
</th>
<th></th>
</tr>
";
}
// line 65
echo "
<tr>
<th colspan=\"4\" class=\"text-right\">";
// line 67
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.total", [], "frontend"), "html", null, true);
echo "</th>
<th class=\"text-left\">€ ";
// line 68
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);
echo "</th>
<th></th>
</tr>
";
}
// line 72
echo " </tfoot>
</table>
<div class=\"row\">
<div class=\"col-12\">
<a class=\"btn btn-primary\" href=\"";
// line 77
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("home");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.continue_shopping", [], "frontend"), "html", null, true);
echo "</a>
";
// line 79
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"]]);
echo "
</div>
</div>
";
// line 83
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');
echo "
</div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "VisualMediaOrderBundle/views/Cart/cart.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("<div class=\"cart\">
{{ form_start(form, { attr: { class: 'form-horizontal validation' }}) }}
{{ form_errors(form) }}
<table class=\"table table-hover table-borderless\">
<thead>
<tr>
<th style=\"width: 150px;\"></th>
<th>{{ 'cart.product'|trans({}, 'frontend') }}</th>
<th style=\"width: 15%;\">{{ 'cart.amount'|trans({}, 'frontend') }}</th>
<th class=\"text-right\">{{ 'cart.price'|trans({}, 'frontend') }}</th>
<th class=\"text-left\">{{ 'cart.total'|trans({}, 'frontend') }}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for child in form.items %}
{% include '@VisualMediaOrder/Cart/item.html.twig' with { form: child } only %}
{% else %}
<tr>
<td></td>
<td colspan=\"5\">{{ 'cart.empty'|trans({}, 'frontend') }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
{% if not cart.empty %}
<tr>
<th colspan=\"4\" class=\"text-right\">{{ 'cart.subtotal'|trans({}, 'frontend') }}</th>
<th class=\"text-left\">€ {{ cart.subtotal|price_format }}</th>
</tr>
{% if cart.order is not null %}
{% if cart.order.discount is not null %}
<tr>
<th colspan=\"4\" class=\"text-right\">{{ 'cart.discount'|trans({}, 'frontend') }} <sup>({{ cart.order.discount.code }})</sup></th>
<th class=\"text-left\">€ {{ cart.discountPrice|price_format }}</th>
</tr>
{% endif %}
{% endif %}
<tr>
<th colspan=\"4\" class=\"text-right\">{{ 'cart.shipping_costs'|trans({}, 'frontend') }}:</th>
<th class=\"text-left\">
{% if cart.shippingCosts > 0 %}
€ {{ cart.shippingCosts|price_format }}
{% else %}
<span class=\"free\">{{ 'cart.free'|trans({}, 'frontend') }}</span>
{% endif %}
</th>
<th></th>
</tr>
{% if cart.paymentCosts > 0 %}
<tr>
<th colspan=\"4\" class=\"text-right\">{{ 'cart.payment_costs'|trans({}, 'frontend') }}:</th>
<th class=\"text-left\">
€ {{ cart.paymentCosts|price_format }}
</th>
<th></th>
</tr>
{% endif %}
<tr>
<th colspan=\"4\" class=\"text-right\">{{ 'cart.total'|trans({}, 'frontend') }}</th>
<th class=\"text-left\">€ {{ cart.total|price_format }}</th>
<th></th>
</tr>
{% endif %}
</tfoot>
</table>
<div class=\"row\">
<div class=\"col-12\">
<a class=\"btn btn-primary\" href=\"{{ path('home') }}\">{{ 'cart.continue_shopping'|trans({}, 'frontend') }}</a>
{{ form_widget(form.submit, { attr: { class: 'btn btn-success float-right' }}) }}
</div>
</div>
{{ form_end(form) }}
</div>
", "VisualMediaOrderBundle/views/Cart/cart.html.twig", "/var/www/public_html/templates/VisualMediaOrderBundle/views/Cart/cart.html.twig");
}
}