<?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;
/* cart/index.html.twig */
class __TwigTemplate_cb0b20ae2de5f9c744fd78329f6bb38e extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 1
return $this->loadTemplate($this->extensions['App\Twig\Extension\WebsiteExtension']->getBaseLayout(), "cart/index.html.twig", 1);
}
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", "cart/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "cart/index.html.twig"));
$this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_content($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(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
echo " <div class=\"container mb-5\">
<div class=\"row mb-3\">
<div class=\"col-12\">
<h1 class=\"text-center mb-5\">
<span class=\"heading-line primary\">
";
// line 10
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Winkelmandje"), "html", null, true);
echo "
</span>
</h1>
</div>
</div>
";
// line 17
if (array_key_exists("cartItems", $context)) {
// line 18
echo " <div>
";
// line 19
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["cartItems"]) || array_key_exists("cartItems", $context) ? $context["cartItems"] : (function () { throw new RuntimeError('Variable "cartItems" does not exist.', 19, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["cartItem"]) {
// line 20
echo " ";
$this->loadTemplate("cart/item.html.twig", "cart/index.html.twig", 20)->display(twig_array_merge($context, ["amountIsEditable" => (isset($context["amountIsEditable"]) || array_key_exists("amountIsEditable", $context) ? $context["amountIsEditable"] : (function () { throw new RuntimeError('Variable "amountIsEditable" does not exist.', 20, $this->source); })())]));
// line 21
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['cartItem'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 22
echo " <hr/>
<div class=\"row mb-3\">
<div class=\"col-6 text-start\">
<a href=\"#\" id=\"clear_cart\"><i class=\"fas fa-trash me-1\"></i>";
// line 26
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Empty Cart"), "html", null, true);
echo "</a>
</div>
<div class=\"col-6 text-end\">
<b>";
// line 29
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Totaal (excl. verzending)"), "html", null, true);
echo "</b> <span id=\"cartTotal\">€";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["cartTotal"]) || array_key_exists("cartTotal", $context) ? $context["cartTotal"] : (function () { throw new RuntimeError('Variable "cartTotal" does not exist.', 29, $this->source); })()), 29, $this->source), "html", null, true);
echo "</span>
</div>
</div>
</div>
";
// line 36
if (twig_test_empty((isset($context["user"]) || array_key_exists("user", $context) ? $context["user"] : (function () { throw new RuntimeError('Variable "user" does not exist.', 36, $this->source); })()))) {
// line 37
echo " <div class=\"row mt-5\">
<div class=\"col text-center\">
<p>";
// line 39
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Log in of maak een account om de bestelling af te ronden."), "html", null, true);
echo "</p>
<a href=\"";
// line 40
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("login-page");
echo "\" class=\"btn btn-primary me-3\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Inloggen"), "html", null, true);
echo "</a>
<a href=\"";
// line 41
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("signup-page");
echo "\" class=\"btn btn-outline-primary\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Registreren"), "html", null, true);
echo "</a>
</div>
</div>
";
} else {
// line 46
echo " <div class=\"row\">
<div class=\"col-12 d-flex justify-content-center\">
<a href=\"";
// line 48
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("cart-delivery");
echo "\" class=\"btn btn-primary btn-lg\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Levering"), "html", null, true);
echo "</a>
</div>
</div>
";
}
// line 52
echo " ";
} else {
// line 53
echo " <p>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Nog geen producten in het winkelkarretje, bekijk het aanbod om aan de slag te gaan."), "html", null, true);
echo "</p>
";
}
// line 55
echo " <br/>
<br/>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "cart/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 198 => 55, 192 => 53, 189 => 52, 180 => 48, 176 => 46, 166 => 41, 160 => 40, 156 => 39, 152 => 37, 150 => 36, 138 => 29, 132 => 26, 126 => 22, 112 => 21, 109 => 20, 92 => 19, 89 => 18, 87 => 17, 77 => 10, 69 => 4, 59 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends base_layout() %}
{% block content %}
<div class=\"container mb-5\">
<div class=\"row mb-3\">
<div class=\"col-12\">
<h1 class=\"text-center mb-5\">
<span class=\"heading-line primary\">
{{ 'Winkelmandje' | trans }}
</span>
</h1>
</div>
</div>
{% if cartItems is defined %}
<div>
{% for cartItem in cartItems %}
{% include 'cart/item.html.twig' with {'amountIsEditable' : amountIsEditable} %}
{% endfor %}
<hr/>
<div class=\"row mb-3\">
<div class=\"col-6 text-start\">
<a href=\"#\" id=\"clear_cart\"><i class=\"fas fa-trash me-1\"></i>{{ 'Empty Cart' | trans }}</a>
</div>
<div class=\"col-6 text-end\">
<b>{{ 'Totaal (excl. verzending)' | trans }}</b> <span id=\"cartTotal\">€{{ cartTotal }}</span>
</div>
</div>
</div>
{% if user is empty %}
<div class=\"row mt-5\">
<div class=\"col text-center\">
<p>{{ 'Log in of maak een account om de bestelling af te ronden.'|trans }}</p>
<a href=\"{{ path(\"login-page\") }}\" class=\"btn btn-primary me-3\">{{ 'Inloggen'|trans }}</a>
<a href=\"{{ path(\"signup-page\") }}\" class=\"btn btn-outline-primary\">{{ 'Registreren'|trans }}</a>
</div>
</div>
{% else %}
<div class=\"row\">
<div class=\"col-12 d-flex justify-content-center\">
<a href=\"{{ path(\"cart-delivery\") }}\" class=\"btn btn-primary btn-lg\">{{ 'Levering'|trans }}</a>
</div>
</div>
{% endif %}
{% else %}
<p>{{ 'Nog geen producten in het winkelkarretje, bekijk het aanbod om aan de slag te gaan.'|trans }}</p>
{% endif %}
<br/>
<br/>
</div>
{% endblock %}", "cart/index.html.twig", "/var/www/clients/client2/web42/web/pc/templates/cart/index.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 17, "for" => 19, "include" => 20);
static $filters = array("escape" => 10, "trans" => 10);
static $functions = array("path" => 40, "base_layout" => 1);
try {
$this->sandbox->checkSecurity(
['if', 'for', 'include'],
['escape', 'trans'],
['path', 'base_layout']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}