<?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;
/* front/product.html.twig */
class __TwigTemplate_1ecb7a1881e5ddb95a0b6922267a4b5bb7f7befa54c14f295f856831c745786d extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
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", "front/product.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/product.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "front/product.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_content($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(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
yield " <div class=\"page page--main\">
<div class=\"container\">
<div class=\"page__header\">
<h1>";
// line 7
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 7, $this->source); })()), "translate", [], "any", false, false, false, 7), "name", [], "any", false, false, false, 7), "html", null, true);
yield "</h1>
</div>
</div>
</div>
<div class=\"wave wave--main\"></div>
<section class=\"product\">
<div class=\"product__before\" style=\"background-image: url('";
// line 14
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((((((isset($context["path_media"]) || array_key_exists("path_media", $context) ? $context["path_media"] : (function () { throw new RuntimeError('Variable "path_media" does not exist.', 14, $this->source); })()) . "/") . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 14, $this->source); })()), "file", [], "any", false, false, false, 14), "directoryName", [], "any", false, false, false, 14)) . "/") . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 14, $this->source); })()), "file", [], "any", false, false, false, 14), "media", [], "any", false, false, false, 14)), "html", null, true);
yield "')\"></div>
<div class=\"container container--product\">
<div class=\"row\">
<div class=\"col-lg-4 col-12 offset-lg-1\">
";
// line 18
yield from $this->loadTemplate("front/product/media.html.twig", "front/product.html.twig", 18)->unwrap()->yield(CoreExtension::toArray(["product" => (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 18, $this->source); })()), "lang" => (isset($context["lang"]) || array_key_exists("lang", $context) ? $context["lang"] : (function () { throw new RuntimeError('Variable "lang" does not exist.', 18, $this->source); })())]));
// line 19
yield " </div>
<div class=\"col-lg-7 col-12\">
<div class=\"product__content\">
<div class=\"product__desc\">
<div class=\"product__tag ";
// line 23
if ((0 !== CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 23, $this->source); })()), "newProduct", [], "any", false, false, false, 23), 0))) {
yield " is-new";
}
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Novinka"), "html", null, true);
yield "</div>
<div class=\"product__description\">
<div class=\"text text--bigger\">
";
// line 26
yield from $this->loadTemplate("front/product/shortDescription.html.twig", "front/product.html.twig", 26)->unwrap()->yield(CoreExtension::toArray(["product" => (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 26, $this->source); })()), "lang" => (isset($context["lang"]) || array_key_exists("lang", $context) ? $context["lang"] : (function () { throw new RuntimeError('Variable "lang" does not exist.', 26, $this->source); })())]));
// line 27
yield " </div>
</div>
";
// line 29
yield from $this->loadTemplate("front/snippet/delivery-free.html.twig", "front/product.html.twig", 29)->unwrap()->yield($context);
// line 30
yield " </div>
<div class=\"product__main\">
<div class=\"product__select\">
<div class=\"product__select-header\">
<p class=\"product__select-title text--sanchez\">";
// line 34
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Vyberte variantu"), "html", null, true);
yield ":</p>
</div>
<select name=\"\" id=\"\" class=\"js-select\">
";
// line 37
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 37, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["variant"]) {
// line 38
yield " ";
if ((1 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "translate", [], "any", false, false, false, 38), "price", [], "any", false, false, false, 38), 0))) {
// line 39
yield " <option
";
// line 40
if ((CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "file", [], "any", true, true, false, 40) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "file", [], "any", false, false, false, 40)))) {
// line 41
yield " data-p-image=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['NexCRM\BaseBundle\Service\ImagineExtension']->filter((((((isset($context["path_media"]) || array_key_exists("path_media", $context) ? $context["path_media"] : (function () { throw new RuntimeError('Variable "path_media" does not exist.', 41, $this->source); })()) . "/") . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "file", [], "any", false, false, false, 41), "directoryName", [], "any", false, false, false, 41)) . "/") . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "file", [], "any", false, false, false, 41), "media", [], "any", false, false, false, 41)), "product_thumbnail"), "html", null, true);
yield "\"
";
}
// line 43
yield " data-p-price=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "translate", [], "any", false, false, false, 43), "price", [], "any", false, false, false, 43), 0, "", " "), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Kč"), "html", null, true);
yield "\"
";
// line 44
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "translate", [], "any", false, true, false, 44), "units", [], "any", true, true, false, 44) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "translate", [], "any", false, false, false, 44), "units", [], "any", false, false, false, 44)))) {
// line 45
yield " data-p-mj=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "translate", [], "any", false, false, false, 45), "units", [], "any", false, false, false, 45), "html", null, true);
yield "\"
";
}
// line 47
yield " value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "id", [], "any", false, false, false, 47), "html", null, true);
yield "\"";
// line 48
if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 48, $this->source); })()), "id", [], "any", false, false, false, 48), CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "id", [], "any", false, false, false, 48)))) {
yield " selected";
}
// line 49
yield ">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["variant"], "translate", [], "any", false, false, false, 49), "name", [], "any", false, false, false, 49), "html", null, true);
yield "
</option>
";
}
// line 52
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['variant'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 53
yield " </select>
</div>
<div class=\"product__buy";
// line 55
if (CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 55, $this->source); })()), "soldOut", [], "any", false, false, false, 55)) {
yield " pb-4";
}
yield "\">
";
// line 56
if ( !CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 56, $this->source); })()), "soldOut", [], "any", false, false, false, 56)) {
// line 57
yield " <div class=\"product__row\">
<div class=\"counter\">
<div class=\"counter__row\">
<div class=\"counter__minus js-counter-minus\">
<div class=\"icon icon--minus\"></div>
</div>
<div class=\"counter__input\">
<input type=\"text\" value=\"1\" class=\"js-counter-input\">
<span>";
// line 65
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ks"), "html", null, true);
yield "</span>
</div>
<div class=\"counter__plus js-counter-plus\">
<div class=\"icon icon--plus\"></div>
</div>
</div>
</div>
<div class=\"product__button\">
<a href=\"#box\"
class=\"button button--product js-add-to-cart\" data-path=\"";
// line 74
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("cart_add", ["_locale" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 74, $this->source); })()), "currentLocale", [], "any", false, false, false, 74), "id" => 0, "amount" => 0]), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Přidat Jerky do košíku"), "html", null, true);
yield "</a>
</div>
</div>
";
} else {
// line 78
yield " <div class=\"product__row category__row--sold\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Vyprodáno"), "html", null, true);
yield "</div>
";
}
// line 80
yield " <div class=\"category__item__add\"><div class=\"category__item__add__icon\"></div><div class=\"category__item__add__text\"></div></div>
</div>
";
// line 82
if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 82, $this->source); })()), "translate", [], "any", false, false, false, 82), "description", [], "any", false, false, false, 82))) {
// line 83
yield " ";
yield from $this->loadTemplate("front/product/description.html.twig", "front/product.html.twig", 83)->unwrap()->yield(CoreExtension::toArray(["product" => (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 83, $this->source); })()), "lang" => (isset($context["lang"]) || array_key_exists("lang", $context) ? $context["lang"] : (function () { throw new RuntimeError('Variable "lang" does not exist.', 83, $this->source); })())]));
// line 84
yield " ";
}
// line 85
yield " </div>
</div>
</div>
</div>
</div>
";
// line 90
yield from $this->loadTemplate("front/snippet/sidebar.html.twig", "front/product.html.twig", 90)->unwrap()->yield($context);
// line 91
yield " </section>
<section class=\"nutrition\">
<div class=\"wave wave--nutrition\"></div>
";
// line 94
yield from $this->loadTemplate("front/product/parameters.html.twig", "front/product.html.twig", 94)->unwrap()->yield(CoreExtension::toArray(["product" => (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 94, $this->source); })()), "lang" => (isset($context["lang"]) || array_key_exists("lang", $context) ? $context["lang"] : (function () { throw new RuntimeError('Variable "lang" does not exist.', 94, $this->source); })())]));
// line 95
yield " </section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "front/product.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 260 => 95, 258 => 94, 253 => 91, 251 => 90, 244 => 85, 241 => 84, 238 => 83, 236 => 82, 232 => 80, 226 => 78, 217 => 74, 205 => 65, 195 => 57, 193 => 56, 187 => 55, 183 => 53, 177 => 52, 170 => 49, 166 => 48, 162 => 47, 156 => 45, 154 => 44, 147 => 43, 141 => 41, 139 => 40, 136 => 39, 133 => 38, 129 => 37, 123 => 34, 117 => 30, 115 => 29, 111 => 27, 109 => 26, 99 => 23, 93 => 19, 91 => 18, 84 => 14, 74 => 7, 69 => 4, 59 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block content %}
<div class=\"page page--main\">
<div class=\"container\">
<div class=\"page__header\">
<h1>{{ category.translate.name }}</h1>
</div>
</div>
</div>
<div class=\"wave wave--main\"></div>
<section class=\"product\">
<div class=\"product__before\" style=\"background-image: url('{{ (path_media ~ '/' ~ category.file.directoryName ~ '/' ~ category.file.media) }}')\"></div>
<div class=\"container container--product\">
<div class=\"row\">
<div class=\"col-lg-4 col-12 offset-lg-1\">
{% include('front/product/media.html.twig') with {'product': product, 'lang': lang} only %}
</div>
<div class=\"col-lg-7 col-12\">
<div class=\"product__content\">
<div class=\"product__desc\">
<div class=\"product__tag {% if product.newProduct != 0 %} is-new{% endif %}\">{{ 'Novinka'|trans }}</div>
<div class=\"product__description\">
<div class=\"text text--bigger\">
{% include('front/product/shortDescription.html.twig') with {'product': product, 'lang': lang} only %}
</div>
</div>
{% include('front/snippet/delivery-free.html.twig') %}
</div>
<div class=\"product__main\">
<div class=\"product__select\">
<div class=\"product__select-header\">
<p class=\"product__select-title text--sanchez\">{{ 'Vyberte variantu'|trans }}:</p>
</div>
<select name=\"\" id=\"\" class=\"js-select\">
{% for variant in products %}
{% if variant.translate.price > 0 %}
<option
{% if variant.file is defined and variant.file is not empty %}
data-p-image=\"{{ (path_media ~ '/' ~ variant.file.directoryName ~ '/' ~ variant.file.media) | imagine_filter('product_thumbnail') }}\"
{% endif %}
data-p-price=\"{{ variant.translate.price|number_format(0, '', ' ') }} {{ 'Kč'|trans }}\"
{% if variant.translate.units is defined and variant.translate.units is not empty %}
data-p-mj=\"{{ variant.translate.units }}\"
{% endif %}
value=\"{{ variant.id }}\"
{%- if product.id==variant.id %} selected{%- endif -%}
>{{ variant.translate.name }}
</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class=\"product__buy{% if product.soldOut %} pb-4{% endif %}\">
{% if not product.soldOut %}
<div class=\"product__row\">
<div class=\"counter\">
<div class=\"counter__row\">
<div class=\"counter__minus js-counter-minus\">
<div class=\"icon icon--minus\"></div>
</div>
<div class=\"counter__input\">
<input type=\"text\" value=\"1\" class=\"js-counter-input\">
<span>{{ 'ks'|trans }}</span>
</div>
<div class=\"counter__plus js-counter-plus\">
<div class=\"icon icon--plus\"></div>
</div>
</div>
</div>
<div class=\"product__button\">
<a href=\"#box\"
class=\"button button--product js-add-to-cart\" data-path=\"{{ path('cart_add', {_locale: category.currentLocale, id: 0, amount: 0}) }}\">{{ 'Přidat Jerky do košíku'|trans }}</a>
</div>
</div>
{% else %}
<div class=\"product__row category__row--sold\">{{ 'Vyprodáno'|trans }}</div>
{% endif %}
<div class=\"category__item__add\"><div class=\"category__item__add__icon\"></div><div class=\"category__item__add__text\"></div></div>
</div>
{% if product.translate.description is not empty %}
{% include('front/product/description.html.twig') with {'product': product, 'lang': lang} only %}
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% include('front/snippet/sidebar.html.twig') %}
</section>
<section class=\"nutrition\">
<div class=\"wave wave--nutrition\"></div>
{% include('front/product/parameters.html.twig') with {'product': product, 'lang': lang} only %}
</section>
{% endblock content %}
", "front/product.html.twig", "/home/web/nexgen.cz/dev58/templates/front/product.html.twig");
}
}