<?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;
/* Shop/list.html.twig */
class __TwigTemplate_8581aac9306aac82ce324486e5783c7c 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 "product.html.twig";
}
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", "Shop/list.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Shop/list.html.twig"));
$this->parent = $this->loadTemplate("product.html.twig", "Shop/list.html.twig", 1);
$this->parent->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 "<script src=\"/website/static/js/productfilters.js\" defer></script>
<!-- Added Comment- -->
<div class=\"breadcrumb-block\">
<div class=\"container\">
<!-- breadcrumb of the page -->
<ul class=\"breadcrumb\">
<li><a href=\"/";
// line 13
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["locale"]) || array_key_exists("locale", $context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.', 13, $this->source); })()), 13, $this->source), "html", null, true);
echo "\" class=\"home\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("espirits.header.home"), "html", null, true);
echo "</a></li>
<li><a href=\"";
// line 15
((((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 15, $this->source); })()) || (isset($context["preview"]) || array_key_exists("preview", $context) ? $context["preview"] : (function () { throw new RuntimeError('Variable "preview" does not exist.', 15, $this->source); })()))) ? (print ("")) : (print (twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("product-landing", ["prefix" => (isset($context["locale"]) || array_key_exists("locale", $context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.', 15, $this->source); })())], false), "html", null, true))));
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("espirits.header.our-products"), "html", null, true);
echo "</a></li>
";
// line 16
$context["parenturl"] = "";
// line 17
echo " ";
if ((array_key_exists("category", $context) && !twig_test_empty((isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 17, $this->source); })())))) {
// line 18
echo " ";
$context["parentcategory"] = twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 18, $this->source); })()), "getParent", [], "method", false, false, true, 18);
// line 19
echo " ";
$context["heading"] = twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 19, $this->source); })()), "getName", [], "method", false, false, true, 19);
// line 20
echo " ";
if ((((isset($context["parentcategory"]) || array_key_exists("parentcategory", $context) ? $context["parentcategory"] : (function () { throw new RuntimeError('Variable "parentcategory" does not exist.', 20, $this->source); })()) && (twig_get_attribute($this->env, $this->source, (isset($context["parentcategory"]) || array_key_exists("parentcategory", $context) ? $context["parentcategory"] : (function () { throw new RuntimeError('Variable "parentcategory" does not exist.', 20, $this->source); })()), "getType", [], "method", false, false, true, 20) == "object")) && (twig_get_attribute($this->env, $this->source, (isset($context["parentcategory"]) || array_key_exists("parentcategory", $context) ? $context["parentcategory"] : (function () { throw new RuntimeError('Variable "parentcategory" does not exist.', 20, $this->source); })()), "getClassname", [], "method", false, false, true, 20) == "CategoryAlcoholType"))) {
// line 21
echo " ";
$context["parenturl"] = twig_get_attribute($this->env, $this->source, (isset($context["parentcategory"]) || array_key_exists("parentcategory", $context) ? $context["parentcategory"] : (function () { throw new RuntimeError('Variable "parentcategory" does not exist.', 21, $this->source); })()), "getDetailUrl", [["rootCategory" => (isset($context["parentcategory"]) || array_key_exists("parentcategory", $context) ? $context["parentcategory"] : (function () { throw new RuntimeError('Variable "parentcategory" does not exist.', 21, $this->source); })()), "document" => (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 21, $this->source); })())]], "method", false, false, true, 21);
// line 22
echo "
<li><a href=\"";
// line 23
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["parenturl"]) || array_key_exists("parenturl", $context) ? $context["parenturl"] : (function () { throw new RuntimeError('Variable "parenturl" does not exist.', 23, $this->source); })()), 23, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["parentcategory"]) || array_key_exists("parentcategory", $context) ? $context["parentcategory"] : (function () { throw new RuntimeError('Variable "parentcategory" does not exist.', 23, $this->source); })()), "getName", [], "method", false, false, true, 23), 23, $this->source), "html", null, true);
echo "</a></li>
";
}
// line 25
echo " ";
} elseif (((array_key_exists("BrandName", $context) && !twig_test_empty((isset($context["BrandName"]) || array_key_exists("BrandName", $context) ? $context["BrandName"] : (function () { throw new RuntimeError('Variable "BrandName" does not exist.', 25, $this->source); })()))) && (twig_length_filter($this->env, (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 25, $this->source); })())) != 0))) {
// line 26
echo " ";
$context["heading"] = (isset($context["BrandName"]) || array_key_exists("BrandName", $context) ? $context["BrandName"] : (function () { throw new RuntimeError('Variable "BrandName" does not exist.', 26, $this->source); })());
// line 27
echo " <li><a href=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["parenturl"]) || array_key_exists("parenturl", $context) ? $context["parenturl"] : (function () { throw new RuntimeError('Variable "parenturl" does not exist.', 27, $this->source); })()), 27, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["BrandName"]) || array_key_exists("BrandName", $context) ? $context["BrandName"] : (function () { throw new RuntimeError('Variable "BrandName" does not exist.', 27, $this->source); })()), 27, $this->source), "html", null, true);
echo "</a></li>
";
} else {
// line 29
echo " ";
$context["heading"] = $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("espirits.header.our-products");
echo " \t\t\t
";
}
// line 31
echo " <li class=\"active\">";
(((array_key_exists("category", $context) && !twig_test_empty((isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 31, $this->source); })())))) ? (print (twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 31, $this->source); })()), "getName", [], "method", false, false, true, 31), "html", null, true))) : (print ("")));
echo "</li>
</ul>
</div>
</div>
<div class=\"container\">
";
// line 36
if ((twig_length_filter($this->env, (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 36, $this->source); })())) == 0)) {
// line 37
echo " <div class=\"heading-holder\">
<h1>";
// line 38
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("espirits.search.results"), "html", null, true);
echo "</h1>
</div>
<h3>";
// line 40
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("shop.empty-result"), "html", null, true);
echo "</h3>
";
} else {
// line 42
echo " <div class=\"heading-holder\">
<!-- main heading of the page -->
<h1>";
// line 44
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["heading"]) || array_key_exists("heading", $context) ? $context["heading"] : (function () { throw new RuntimeError('Variable "heading" does not exist.', 44, $this->source); })()), 44, $this->source), "html", null, true);
echo "</h1>
</div>
<div class=\"row\">
<div class=\"col-sm-4 col-md-3\">
<div class=\"filter-block\">
<a href=\"#\" class=\"filter-opener\">filter products</a>
<div class=\"filter-slide\">
<!-- filter form of the page -->
<form class=\"filter-form\" id=\"js_filterfield\" action=\"\" method=\"get\">
";
// line 54
if (twig_get_attribute($this->env, $this->source, (isset($context["filterDefinitionObject"]) || array_key_exists("filterDefinitionObject", $context) ? $context["filterDefinitionObject"] : (function () { throw new RuntimeError('Variable "filterDefinitionObject" does not exist.', 54, $this->source); })()), "getFilters", [], "method", false, false, true, 54)) {
// line 55
echo " <div class=\"widget\">
";
// line 56
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["filterDefinitionObject"]) || array_key_exists("filterDefinitionObject", $context) ? $context["filterDefinitionObject"] : (function () { throw new RuntimeError('Variable "filterDefinitionObject" does not exist.', 56, $this->source); })()), "getFilters", [], "method", false, false, true, 56));
foreach ($context['_seq'] as $context["_key"] => $context["filter"]) {
// line 57
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["filter"], "getLabel", [], "method", false, false, true, 57) != "Country Availability")) {
// line 58
echo " ";
echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["filterService"]) || array_key_exists("filterService", $context) ? $context["filterService"] : (function () { throw new RuntimeError('Variable "filterService" does not exist.', 58, $this->source); })()), "getFilterFrontend", [$context["filter"], (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 58, $this->source); })()), (isset($context["currentFilter"]) || array_key_exists("currentFilter", $context) ? $context["currentFilter"] : (function () { throw new RuntimeError('Variable "currentFilter" does not exist.', 58, $this->source); })())], "method", false, false, true, 58), 58, $this->source);
echo "
";
}
// line 60
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['filter'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 61
echo " </div>
";
}
// line 63
echo " ";
if ((array_key_exists("search", $context) && !twig_test_empty((isset($context["search"]) || array_key_exists("search", $context) ? $context["search"] : (function () { throw new RuntimeError('Variable "search" does not exist.', 63, $this->source); })())))) {
// line 64
echo " <input name=\"search\" value=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["search"]) || array_key_exists("search", $context) ? $context["search"] : (function () { throw new RuntimeError('Variable "search" does not exist.', 64, $this->source); })()), 64, $this->source), "html", null, true);
echo "\" type=\"hidden\"/>
";
}
// line 66
echo " </form>
</div>
</div>
</div>
<div class=\"col-sm-8 col-md-9\">
";
// line 71
$this->loadTemplate("Shop/includes/pagination.html.twig", "Shop/list.html.twig", 71)->display($context);
// line 72
echo "
<div class=\"product-list same-height-holder\">
";
// line 75
$this->loadTemplate("Shop/list/products.html.twig", "Shop/list.html.twig", 75)->display(twig_array_merge($context, ["products" => (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 75, $this->source); })()), "locale" => (isset($context["locale"]) || array_key_exists("locale", $context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.', 75, $this->source); })()), "country" => (isset($context["country"]) || array_key_exists("country", $context) ? $context["country"] : (function () { throw new RuntimeError('Variable "country" does not exist.', 75, $this->source); })()), "lastlogin" => (isset($context["lastlogin"]) || array_key_exists("lastlogin", $context) ? $context["lastlogin"] : (function () { throw new RuntimeError('Variable "lastlogin" does not exist.', 75, $this->source); })()), "preview" => (isset($context["preview"]) || array_key_exists("preview", $context) ? $context["preview"] : (function () { throw new RuntimeError('Variable "preview" does not exist.', 75, $this->source); })()), "editmode" => (isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 75, $this->source); })())]));
echo "
</div>
";
// line 78
$this->loadTemplate("Shop/includes/pagination.html.twig", "Shop/list.html.twig", 78)->display($context);
// line 79
echo "
</div>
</div>
</div>
";
}
// line 84
echo " </div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "Shop/list.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 248 => 84, 241 => 79, 239 => 78, 233 => 75, 228 => 72, 226 => 71, 219 => 66, 213 => 64, 210 => 63, 206 => 61, 200 => 60, 194 => 58, 191 => 57, 187 => 56, 184 => 55, 182 => 54, 169 => 44, 165 => 42, 160 => 40, 155 => 38, 152 => 37, 150 => 36, 141 => 31, 135 => 29, 127 => 27, 124 => 26, 121 => 25, 114 => 23, 111 => 22, 108 => 21, 105 => 20, 102 => 19, 99 => 18, 96 => 17, 94 => 16, 88 => 15, 81 => 13, 70 => 4, 60 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'product.html.twig' %}
{% block content %}
<script src=\"/website/static/js/productfilters.js\" defer></script>
<!-- Added Comment- -->
<div class=\"breadcrumb-block\">
<div class=\"container\">
<!-- breadcrumb of the page -->
<ul class=\"breadcrumb\">
<li><a href=\"/{{ locale }}\" class=\"home\">{{ \"espirits.header.home\"|trans }}</a></li>
<li><a href=\"{{ editmode or preview ? '' : path('product-landing',{ prefix: locale }, false) }}\">{{ \"espirits.header.our-products\"| trans }}</a></li>
{% set parenturl = '' %}
{% if category is defined and category is not empty %}
{% set parentcategory = category.getParent() %}
{% set heading = category.getName() %}
{% if parentcategory and parentcategory.getType() == \"object\" and parentcategory.getClassname() == \"CategoryAlcoholType\" %}
{% set parenturl = parentcategory.getDetailUrl({\"rootCategory\" : parentcategory, \"document\" : document}) %}
<li><a href=\"{{ parenturl }}\">{{ parentcategory.getName() }}</a></li>
{% endif %}
{% elseif BrandName is defined and BrandName is not empty and products|length != 0 %}
{% set heading = BrandName %}
<li><a href=\"{{ parenturl }}\">{{ BrandName }}</a></li>
{% else %}
{% set heading = \"espirits.header.our-products\"|trans %} \t\t\t
{% endif %}
<li class=\"active\">{{ category is defined and category is not empty ? category.getName() : \"\" }}</li>
</ul>
</div>
</div>
<div class=\"container\">
{% if products|length == 0 %}
<div class=\"heading-holder\">
<h1>{{ \"espirits.search.results\"|trans }}</h1>
</div>
<h3>{{ \"shop.empty-result\"|trans }}</h3>
{% else %}
<div class=\"heading-holder\">
<!-- main heading of the page -->
<h1>{{ heading }}</h1>
</div>
<div class=\"row\">
<div class=\"col-sm-4 col-md-3\">
<div class=\"filter-block\">
<a href=\"#\" class=\"filter-opener\">filter products</a>
<div class=\"filter-slide\">
<!-- filter form of the page -->
<form class=\"filter-form\" id=\"js_filterfield\" action=\"\" method=\"get\">
{% if filterDefinitionObject.getFilters() %}
<div class=\"widget\">
{% for filter in filterDefinitionObject.getFilters() %}
{% if filter.getLabel() != 'Country Availability' %}
{{ filterService.getFilterFrontend(filter, products, currentFilter)|raw }}
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if search is defined and search is not empty %}
<input name=\"search\" value=\"{{ search }}\" type=\"hidden\"/>
{% endif %}
</form>
</div>
</div>
</div>
<div class=\"col-sm-8 col-md-9\">
{% include 'Shop/includes/pagination.html.twig' %}
<div class=\"product-list same-height-holder\">
{% include 'Shop/list/products.html.twig' with {'products' : products, 'locale' : locale, 'country' : country, 'lastlogin' : lastlogin, 'preview' : preview, 'editmode' : editmode} %}
</div>
{% include 'Shop/includes/pagination.html.twig' %}
</div>
</div>
</div>
{% endif %}
</div>
{% endblock %}
", "Shop/list.html.twig", "/var/www/vhosts/centricdxb.com/pim2.centricdxb.com/templates/Shop/list.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 16, "if" => 17, "for" => 56, "include" => 71);
static $filters = array("escape" => 13, "trans" => 13, "length" => 25, "raw" => 58);
static $functions = array("path" => 15);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for', 'include'],
['escape', 'trans', 'length', 'raw'],
['path']
);
} 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;
}
}
}