<?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;
/* @BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig */
class __TwigTemplate_4933a95860add25b15e45b4193482b4bb27327900bbf29356feedff668aabe2f 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig"));
// line 1
$macros["messages"] = $this->macros["messages"] = $this->loadTemplate("@SyliusShop/Common/Macro/messages.html.twig", "@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig", 1)->unwrap();
// line 2
$macros["money"] = $this->macros["money"] = $this->loadTemplate("@SyliusShop/Common/Macro/money.html.twig", "@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig", 2)->unwrap();
// line 3
$macros["pagination"] = $this->macros["pagination"] = $this->loadTemplate("@SyliusShop/Common/Macro/pagination.html.twig", "@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig", 3)->unwrap();
// line 4
echo "
";
// line 5
echo $this->env->getRuntime('Sonata\BlockBundle\Templating\Helper\BlockHelper')->renderEvent("sylius.shop.product.index.before_search", ["products" => (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 5, $this->source); })())]);
echo "
";
// line 8
echo "
";
// line 9
echo $this->env->getRuntime('Sonata\BlockBundle\Templating\Helper\BlockHelper')->renderEvent("sylius.shop.product.index.after_search", ["products" => (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 9, $this->source); })())]);
echo "
";
// line 11
echo $this->env->getRuntime('Sonata\BlockBundle\Templating\Helper\BlockHelper')->renderEvent("sylius.shop.product.index.before_list", ["products" => (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 11, $this->source); })())]);
echo "
<div class=\"container\">
<div class=\"row mb-2\">
<div class=\"col-6\">";
// line 15
$this->loadTemplate("@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_pagination.html.twig", "@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig", 15)->display($context);
echo "</div>
<div class=\"col-6 text-right\">";
// line 16
$this->loadTemplate("@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_sorting.html.twig", "@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig", 16)->display($context);
echo "</div>
</div>
";
// line 18
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.', 18, $this->source); })())) > 0)) {
// line 19
echo " <div class=\"row row-sm product-wrapper equal-height\" id=\"products\" itemprop=\"result\" itemscope=\"\"
itemtype=\"http://schema.org/ItemList\">
";
// line 21
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 21, $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["product"]) {
// line 22
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["product"], "imagesByType", [0 => "thumbnail"], "method", false, false, false, 22))) {
// line 23
echo " ";
$context["path"] = $this->extensions['Sylius\Bundle\CoreBundle\Twig\FilterExtension']->filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "imagesByType", [0 => "thumbnail"], "method", false, false, false, 23), "first", [], "any", false, false, false, 23), "path", [], "any", false, false, false, 23), ((array_key_exists("filter", $context)) ? (_twig_default_filter((isset($context["filter"]) || array_key_exists("filter", $context) ? $context["filter"] : (function () { throw new RuntimeError('Variable "filter" does not exist.', 23, $this->source); })()), "sylius_shop_product_thumbnail_webp")) : ("sylius_shop_product_thumbnail_webp")));
// line 24
echo " ";
} elseif (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "images", [], "any", false, false, false, 24), "first", [], "any", false, false, false, 24)) {
// line 25
echo " ";
$context["path"] = $this->extensions['Sylius\Bundle\CoreBundle\Twig\FilterExtension']->filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "images", [], "any", false, false, false, 25), "first", [], "any", false, false, false, 25), "path", [], "any", false, false, false, 25), ((array_key_exists("filter", $context)) ? (_twig_default_filter((isset($context["filter"]) || array_key_exists("filter", $context) ? $context["filter"] : (function () { throw new RuntimeError('Variable "filter" does not exist.', 25, $this->source); })()), "sylius_shop_product_thumbnail_webp")) : ("sylius_shop_product_thumbnail_webp")));
// line 26
echo " ";
} else {
// line 27
echo " ";
if ( !array_key_exists("defaultWidth", $context)) {
// line 28
echo " ";
$context["defaultWidth"] = 110;
// line 29
echo " ";
}
// line 30
echo " ";
if ( !array_key_exists("defaultHeight", $context)) {
// line 31
echo " ";
$context["defaultHeight"] = 200;
// line 32
echo " ";
}
// line 33
echo " ";
$context["path"] = ((("//via.placeholder.com/" . (isset($context["defaultHeight"]) || array_key_exists("defaultHeight", $context) ? $context["defaultHeight"] : (function () { throw new RuntimeError('Variable "defaultHeight" does not exist.', 33, $this->source); })())) . "x") . (isset($context["defaultWidth"]) || array_key_exists("defaultWidth", $context) ? $context["defaultWidth"] : (function () { throw new RuntimeError('Variable "defaultWidth" does not exist.', 33, $this->source); })()));
// line 34
echo " ";
}
// line 35
echo " <div class=\"col-6 col-md-4 col-lg-3\" itemprop=\"itemListElement\" itemscope=\"\" itemtype=\"http://schema.org/Product http://schema.org/ListItem\">
<meta itemprop=\"position\" content=\"";
// line 36
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 36), "html", null, true);
echo "\">
<meta itemprop=\"name\" content=\"";
// line 37
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "name", [], "any", false, false, false, 37), "html", null, true);
echo "\">
<meta itemprop=\"url\"
content=\"";
// line 39
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_show", ["slug" => twig_get_attribute($this->env, $this->source, $context["product"], "slug", [], "any", false, false, false, 39), "_locale" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["product"], "translation", [], "any", false, false, false, 39), "locale", [], "any", false, false, false, 39)]), "html", null, true);
echo "\">
<div itemprop=\"offers\" itemscope=\"\" itemtype=\"http://schema.org/Offer\">
<meta itemprop=\"priceCurrency\" content=\"CZK\">
<meta itemprop=\"price\" content=\"";
// line 42
echo twig_call_macro($macros["money"], "macro_calculatePrice", [call_user_func_array($this->env->getFilter('sylius_resolve_variant')->getCallable(), [$context["product"]])], 42, $context, $this->getSourceContext());
echo "\">
</div>
<meta itemprop=\"image\" content=\"";
// line 44
echo twig_escape_filter($this->env, $this->extensions['App\Twig\AppExtension']->spaceCdn((isset($context["path"]) || array_key_exists("path", $context) ? $context["path"] : (function () { throw new RuntimeError('Variable "path" does not exist.', 44, $this->source); })())), "html", null, true);
echo "\">
<meta itemprop=\"sku\" content=\"";
// line 45
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "code", [], "any", false, false, false, 45), "html", null, true);
echo "\">
";
// line 46
$this->loadTemplate("@SyliusShop/Product/_boxModern.html.twig", "@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig", 46)->display($context);
// line 47
echo " </div>
";
++$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['product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 49
echo " </div>
";
// line 51
echo $this->env->getRuntime('Sonata\BlockBundle\Templating\Helper\BlockHelper')->renderEvent("sylius.shop.product.index.before_pagination", ["products" => (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 51, $this->source); })())]);
echo "
<nav class=\"toolbox toolbox-pagination\">
";
// line 54
echo twig_call_macro($macros["pagination"], "macro_simple", [(isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 54, $this->source); })())], 54, $context, $this->getSourceContext());
echo "
</nav>
";
} else {
// line 58
echo " ";
echo twig_call_macro($macros["messages"], "macro_info", ["sylius.ui.no_results_to_display"], 58, $context, $this->getSourceContext());
echo "
";
}
// line 60
echo "
";
// line 62
echo " ";
// line 63
echo " ";
// line 64
echo "</div><!-- End .container -->
";
// line 82
echo "
";
// line 86
echo "
";
// line 95
echo "
";
// line 113
echo "
";
// line 117
echo "
";
// line 133
echo "
";
// line 141
echo "
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 244 => 141, 241 => 133, 238 => 117, 235 => 113, 232 => 95, 229 => 86, 226 => 82, 221 => 64, 219 => 63, 217 => 62, 214 => 60, 208 => 58, 201 => 54, 195 => 51, 191 => 49, 176 => 47, 174 => 46, 170 => 45, 166 => 44, 161 => 42, 155 => 39, 150 => 37, 146 => 36, 143 => 35, 140 => 34, 137 => 33, 134 => 32, 131 => 31, 128 => 30, 125 => 29, 122 => 28, 119 => 27, 116 => 26, 113 => 25, 110 => 24, 107 => 23, 104 => 22, 87 => 21, 83 => 19, 81 => 18, 76 => 16, 72 => 15, 65 => 11, 60 => 9, 57 => 8, 52 => 5, 49 => 4, 47 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% import '@SyliusShop/Common/Macro/messages.html.twig' as messages %}
{% import '@SyliusShop/Common/Macro/money.html.twig' as money %}
{% import '@SyliusShop/Common/Macro/pagination.html.twig' as pagination %}
{{ sonata_block_render_event('sylius.shop.product.index.before_search', {'products': products}) }}
{# {% include '@SyliusShop/Product/Index/_search.html.twig' %} #}
{{ sonata_block_render_event('sylius.shop.product.index.after_search', {'products': products}) }}
{{ sonata_block_render_event('sylius.shop.product.index.before_list', {'products': products}) }}
<div class=\"container\">
<div class=\"row mb-2\">
<div class=\"col-6\">{% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_pagination.html.twig' %}</div>
<div class=\"col-6 text-right\">{% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_sorting.html.twig' %}</div>
</div>
{% if products|length > 0 %}
<div class=\"row row-sm product-wrapper equal-height\" id=\"products\" itemprop=\"result\" itemscope=\"\"
itemtype=\"http://schema.org/ItemList\">
{% for product in products %}
{% if product.imagesByType('thumbnail') is not empty %}
{% set path = product.imagesByType('thumbnail').first.path|imagine_filter(filter|default('sylius_shop_product_thumbnail_webp')) %}
{% elseif product.images.first %}
{% set path = product.images.first.path|imagine_filter(filter|default('sylius_shop_product_thumbnail_webp')) %}
{% else %}
{% if(defaultWidth is not defined) %}
{% set defaultWidth = 110 %}
{% endif %}
{% if(defaultHeight is not defined) %}
{% set defaultHeight = 200 %}
{% endif %}
{% set path = '//via.placeholder.com/' ~ defaultHeight ~ 'x' ~ defaultWidth %}
{% endif %}
<div class=\"col-6 col-md-4 col-lg-3\" itemprop=\"itemListElement\" itemscope=\"\" itemtype=\"http://schema.org/Product http://schema.org/ListItem\">
<meta itemprop=\"position\" content=\"{{ loop.index }}\">
<meta itemprop=\"name\" content=\"{{ product.name }}\">
<meta itemprop=\"url\"
content=\"{{ path('sylius_shop_product_show', {'slug': product.slug, '_locale': product.translation.locale}) }}\">
<div itemprop=\"offers\" itemscope=\"\" itemtype=\"http://schema.org/Offer\">
<meta itemprop=\"priceCurrency\" content=\"CZK\">
<meta itemprop=\"price\" content=\"{{ money.calculatePrice(product|sylius_resolve_variant) }}\">
</div>
<meta itemprop=\"image\" content=\"{{ path|space_cdn }}\">
<meta itemprop=\"sku\" content=\"{{ product.code }}\">
{% include '@SyliusShop/Product/_boxModern.html.twig' %}
</div>
{% endfor %}
</div>
{{ sonata_block_render_event('sylius.shop.product.index.before_pagination', {'products': products}) }}
<nav class=\"toolbox toolbox-pagination\">
{{ pagination.simple(products) }}
</nav>
{% else %}
{{ messages.info('sylius.ui.no_results_to_display') }}
{% endif %}
{# </div> #}
{# </div> #}
{# </div> #}
</div><!-- End .container -->
{# <div class=\"main-content\"> #}
{# <div class=\"toolbox-wrap\"> #}
{# <aside class=\"sidebar sidebar-fixed shop-sidebar closed\"> #}
{# <div class=\"sidebar-overlay\"></div> #}
{# <a class=\"sidebar-close\" href=\"#\"><i class=\"d-icon-times\"></i></a> #}
{# <div class=\"sidebar-content\"> #}
{# <div class=\"mb-0 mb-lg-4\"> #}
{# <div class=\"filter-actions\"> #}
{# <a href=\"#\" #}
{# class=\"sidebar-toggle-btn toggle-remain btn btn-sm btn-outline btn-rounded btn-primary\">Filter<i #}
{# class=\"d-icon-arrow-left\"></i></a> #}
{# #}{# <a href=\"#\" class=\"filter-clean\">Clean All</a> #}
{# </div> #}
{# <div class=\"row cols-lg-4\"> #}
{# {% for attributeGroup in form.options %} #}
{# {% if(attributeGroup.children|length > 0) %} #}
{# <div class=\"widget\"> #}
{# <h3 class=\"widget-title\">{{ attributeGroup.vars.label }}</h3> #}
{# {% if(attributeGroup.vars.id=='options_option_pr1') %} #}
{# <select class=\"form-control\" name=\"attributes[{{ attributeGroup.vars.name }}][]\" id=\"{{ attributeGroup.vars.id }}\"> #}
{# <option value=\"\">-- vyberte --</option> #}
{# {% for attribute in attributeGroup.children %} #}
{# <option value=\"{{ attribute.vars.value }}\">{{ attribute.vars.value }}</option> #}
{# {% endfor %} #}
{# </select> #}
{# {% else %} #}
{# <ul class=\"widget-body filter-items\"> #}
{# {% for attribute in attributeGroup.children %} #}
{# <li>{{ form_row(attribute) }}</li> #}
{# {% endfor %} #}
{# </ul> #}
{# {% endif %} #}
{# </div> #}
{# {% endif %} #}
{# {% endfor %} #}
{# </div> #}
{# <div class=\"row\"> #}
{# #}{# <div class=\"ui search\" id=\"products-search\"> #}
{# #}{# <div class=\"ui fluid large left icon input\"> #}
{# #}{# {{ form_widget(form.name, {'attr': {'placeholder': 'sylius.ui.search', 'class': 'prompt'}}) }} #}
{# #}{# <i class=\"search icon\"></i> #}
{# #}{# </div> #}
{# #}{# </div> #}
{# <button type=\"submit\" class=\"btn-primary btn btn-icon\" style=\"width: 100%;\"><i #}
{# class=\"search icon\"></i> {{ 'bitbag_sylius_elasticsearch_plugin.ui.filter'|trans }} #}
{# </button> #}
{# </div> #}
{# </div> #}
{# </div> #}
{# </aside> #}
{# <div class=\"toolbox\"> #}
{# {% if(form.attributes|length > 0) %} #}
{# <div class=\"toolbox-left\"> #}
{# <a href=\"#\" #}
{# class=\"toolbox-item left-sidebar-toggle btn btn-outline btn-primary btn-rounded btn-icon-left font-primary\"><i #}
{# class=\"d-icon-filter-2\"></i>Filtr</a> #}
{# </div> #}
{# {% endif %} #}
{# <div class=\"toolbox-right\"> #}
{# {% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_pagination.html.twig' %} #}
{# {% include '@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_sorting.html.twig' %} #}
{# #}{# <div class=\"toolbox-item toolbox-layout\"> #}
{# #}{# <a href=\"shop-list.html\" class=\"d-icon-mode-list btn-layout\"></a> #}
{# #}{# <a href=\"shop.html\" class=\"d-icon-mode-grid btn-layout active\"></a> #}
{# #}{# </div> #}
{# </div> #}
{# </div> #}
{# </div> #}
", "@BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig", "/home/forge/new.profilteam.cz/templates/bundles/BitBagSyliusElasticsearchPlugin/Shop/Product/Index/_main.html.twig");
}
}