<?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;
/* ecom/brandcategories.html.twig */
class __TwigTemplate_420012ace300814398339bf38e8d365b extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.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", "ecom/brandcategories.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "ecom/brandcategories.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "ecom/brandcategories.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
public function block_body($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", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 3
yield " <div class=\"container-fluid main-holder px-5 bg-light\">
<div class=\"row\">
<div class=\"col-lg-3\">
<select class=\"form-select rounded-pill py-3 px-3 shadow-none border-0 fs-5 bg-transparent fw-bold mb-3\" id=\"citydropdown\" onchange=\"city_select(this)\">
<option selected>Select a City</option>
";
// line 8
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["ecomvariables"]) || array_key_exists("ecomvariables", $context) ? $context["ecomvariables"] : (function () { throw new RuntimeError('Variable "ecomvariables" does not exist.', 8, $this->source); })()), "cities", [], "method", false, false, false, 8));
foreach ($context['_seq'] as $context["_key"] => $context["c"]) {
// line 9
yield " <option value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["c"], "id", [], "any", false, false, false, 9), "html", null, true);
yield "\" ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["c"], "name", [], "any", false, false, false, 9) == CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 9, $this->source); })()), "session", [], "any", false, false, false, 9), "get", ["mycity"], "method", false, false, false, 9))) {
yield "selected";
}
yield ">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["c"], "name", [], "any", false, false, false, 9), "html", null, true);
yield "</option>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['c'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 11
yield " </select>
</div>
</div>
</div>
<div class=\"container-fluid px-5 mt-5\">
<div class=\"row\">
<div class=\"col-lg-12\">
<h1 class=\"fw-bolder\">";
// line 18
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["brand"]) || array_key_exists("brand", $context) ? $context["brand"] : (function () { throw new RuntimeError('Variable "brand" does not exist.', 18, $this->source); })()), "title", [], "any", false, false, false, 18), "html", null, true);
yield " <img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("uploads/brand/" . CoreExtension::getAttribute($this->env, $this->source, (isset($context["brand"]) || array_key_exists("brand", $context) ? $context["brand"] : (function () { throw new RuntimeError('Variable "brand" does not exist.', 18, $this->source); })()), "image", [], "any", false, false, false, 18))), "html", null, true);
yield "\" alt=\"\" class=\"img-fluid\" style=\"width:30px;\"></h1>
<h6>Explore ";
// line 19
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["brand"]) || array_key_exists("brand", $context) ? $context["brand"] : (function () { throw new RuntimeError('Variable "brand" does not exist.', 19, $this->source); })()), "title", [], "any", false, false, false, 19), "html", null, true);
yield " products</h6>
</div>
</div>
<div class=\"row mb-5\">
";
// line 23
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 23, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["c"]) {
// line 24
yield " <div class=\"col-lg-4 mt-4\"> <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sajong_ecom_products_store", ["style" => CoreExtension::getAttribute($this->env, $this->source, $context["c"], "id", [], "any", false, false, false, 24)]), "html", null, true);
yield "\">
<div class=\"card border-0 rounded-5 p-0 overflow-hidden shadow-sm\"> <img src=\"";
// line 25
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("uploads/categories/" . CoreExtension::getAttribute($this->env, $this->source, $context["c"], "image", [], "any", false, false, false, 25))), "html", null, true);
yield "\" alt=\"\" class=\"img-fluid\"> </div>
<h6 class=\"fw-bold mt-3 mb-4\">";
// line 26
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["c"], "name", [], "any", false, false, false, 26), "html", null, true);
yield "</h6>
</a>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['c'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 30
yield " </div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "ecom/brandcategories.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 140 => 30, 130 => 26, 126 => 25, 121 => 24, 117 => 23, 110 => 19, 104 => 18, 95 => 11, 80 => 9, 76 => 8, 69 => 3, 59 => 2, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block body %}
<div class=\"container-fluid main-holder px-5 bg-light\">
<div class=\"row\">
<div class=\"col-lg-3\">
<select class=\"form-select rounded-pill py-3 px-3 shadow-none border-0 fs-5 bg-transparent fw-bold mb-3\" id=\"citydropdown\" onchange=\"city_select(this)\">
<option selected>Select a City</option>
{% for c in ecomvariables.cities() %}
<option value=\"{{ c.id }}\" {% if (c.name == app.session.get('mycity')) %}selected{% endif %}>{{ c.name }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
<div class=\"container-fluid px-5 mt-5\">
<div class=\"row\">
<div class=\"col-lg-12\">
<h1 class=\"fw-bolder\">{{ brand.title }} <img src=\"{{ asset('uploads/brand/' ~ brand.image) }}\" alt=\"\" class=\"img-fluid\" style=\"width:30px;\"></h1>
<h6>Explore {{ brand.title }} products</h6>
</div>
</div>
<div class=\"row mb-5\">
{% for c in categories %}
<div class=\"col-lg-4 mt-4\"> <a href=\"{{ path('sajong_ecom_products_store', {'style':c.id }) }}\">
<div class=\"card border-0 rounded-5 p-0 overflow-hidden shadow-sm\"> <img src=\"{{ asset('uploads/categories/' ~ c.image) }}\" alt=\"\" class=\"img-fluid\"> </div>
<h6 class=\"fw-bold mt-3 mb-4\">{{ c.name }}</h6>
</a>
</div>
{% endfor %}
</div>
</div>
{% endblock %}", "ecom/brandcategories.html.twig", "/var/www/commerce8/noble_natives/templates/ecom/brandcategories.html.twig");
}
}