<?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;
use Twig\TemplateWrapper;
/* ECommerce/App/Product/show.html.twig */
class __TwigTemplate_de73296bf90ae01be9f74e82ef176891 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "ECommerce/App/Product/show.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "ECommerce/App/Product/show.html.twig"));
// line 7
$macros["͜macros"] = $this->macros["͜macros"] = $this->load("ECommerce/App/Product/macros.html.twig", 7)->unwrap();
// line 1
$this->parent = $this->load("base.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 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$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", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(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.', 5, $this->source); })()), "originalTitle", [], "any", false, false, false, 5), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(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.', 5, $this->source); })()), "origin", [], "any", false, false, false, 5), "html", null, true);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 9
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$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 10
yield " <div class=\"container-fluid\">
<div class=\"container\">
<div class=\"content\">
<div class=\"row product-path\">
<p class=\"m-0\">
";
// line 15
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["breadcrumbs"]) || array_key_exists("breadcrumbs", $context) ? $context["breadcrumbs"] : (function () { throw new RuntimeError('Variable "breadcrumbs" does not exist.', 15, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["crumb"]) {
// line 16
yield " ";
if (CoreExtension::getAttribute($this->env, $this->source, $context["crumb"], "url", [], "any", true, true, false, 16)) {
// line 17
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["crumb"], "url", [], "any", false, false, false, 17), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(CoreExtension::getAttribute($this->env, $this->source, $context["crumb"], "label", [], "any", false, false, false, 17), [], "ECommerceBundle"), "html", null, true);
yield "</a> <span>/</span>
";
} else {
// line 18
yield "<span>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["crumb"], "label", [], "any", false, false, false, 18), "html", null, true);
yield "</span>";
}
// line 19
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['crumb'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 20
yield " </p>
</div>
<div class=\"row grid-1-3\">
<div class=\"product-photo w-100 h-100\">";
// line 25
$context["photo"] = Twig\Extension\CoreExtension::first($this->env->getCharset(), 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.', 25, $this->source); })()), "photos", [], "any", false, false, false, 25));
// line 26
if (( !Twig\Extension\CoreExtension::testEmpty((isset($context["photo"]) || array_key_exists("photo", $context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.', 26, $this->source); })())) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["photo"]) || array_key_exists("photo", $context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.', 26, $this->source); })()), "url", [], "any", false, false, false, 26)))) {
// line 27
yield "<img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env, $this->source, (isset($context["photo"]) || array_key_exists("photo", $context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.', 27, $this->source); })()), "url", [], "any", false, false, false, 27)), "product_thumbnail"), "html", null, true);
yield "\"
class=\"img-fluid mx-auto d-block w-100 h-100\"
alt=\"";
// line 29
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(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.', 29, $this->source); })()), "title", [], "any", false, false, false, 29), "html", null, true);
yield "\" data-lity
data-lity-target=\"";
// line 30
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env, $this->source, (isset($context["photo"]) || array_key_exists("photo", $context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.', 30, $this->source); })()), "url", [], "any", false, false, false, 30)), "product_small"), "html", null, true);
yield "\">";
} else {
// line 32
yield "<img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\WebLinkExtension']->preload($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/assets/static/no-photo.jpg")), "html", null, true);
yield "\" class=\"img-fluid mx-auto d-block\"
alt=\"";
// line 33
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(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.', 33, $this->source); })()), "title", [], "any", false, false, false, 33), "html", null, true);
yield "\">";
}
// line 35
yield "</div>";
// line 37
$context["firstDepot"] = Twig\Extension\CoreExtension::first($this->env->getCharset(), 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.', 37, $this->source); })()), "quantities", [], "any", false, false, false, 37));
// line 38
$context["restDepots"] = Twig\Extension\CoreExtension::slice($this->env->getCharset(), 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.', 38, $this->source); })()), "quantities", [], "any", false, false, false, 38), 1, null);
// line 40
$context["hasActiveDepot"] = false;
// line 41
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(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.', 41, $this->source); })()), "quantities", [], "any", false, false, false, 41));
foreach ($context['_seq'] as $context["_key"] => $context["depot"]) {
// line 42
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["depot"], "quantity", [], "any", false, false, false, 42) > 0)) {
// line 43
yield " ";
$context["hasActiveDepot"] = true;
// line 44
yield " ";
}
// line 45
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['depot'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 46
yield " <div class=\"product-info d-flex flex-column\">
<h2 class=\"text-left line-height-95 font-weight-bold font-45\">";
// line 47
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(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.', 47, $this->source); })()), "title", [], "any", false, false, false, 47), "html", null, true);
yield "</h2>
<p class=\"line-height-95 font-weight-medium font-28 mb-40\">";
// line 48
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(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); })()), "manufacturer", [], "any", false, false, false, 48), "html", null, true);
yield "</p>
<div class=\"dimensions-wrapper\">
<div class=\"dimensions d-inline-flex align-items-center\">
<img src=\"";
// line 52
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\WebLinkExtension']->preload($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/static/inner-diameter.svg")), "html", null, true);
yield "\" alt=\"Inner Diameter\">
<p class=\"m-0 font-26 ml-3\">";
// line 53
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(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.', 53, $this->source); })()), "innerDiameter", [], "any", false, false, false, 53), 2), "html", null, true);
yield " mm</p>
</div>
<div class=\"dimensions d-inline-flex align-items-center\">
<img src=\"";
// line 57
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\WebLinkExtension']->preload($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/static/outer-diameter.svg")), "html", null, true);
yield "\" alt=\"Outer Diameter\">
<p class=\"m-0 font-26 ml-3\">";
// line 58
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(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.', 58, $this->source); })()), "outerDiameter", [], "any", false, false, false, 58), 2), "html", null, true);
yield " mm</p>
</div>
<div class=\"dimensions d-inline-flex align-items-center last mb-4\">
<img src=\"";
// line 62
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\WebLinkExtension']->preload($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/static/width.svg")), "html", null, true);
yield "\" alt=\"Width\">
<p class=\"m-0 font-26 ml-3\">";
// line 63
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(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.', 63, $this->source); })()), "width", [], "any", false, false, false, 63), 2), "html", null, true);
yield " mm</p>
</div>
</div>
<div class=\"price d-inline-flex align-items-center mt-5\">
<p class=\"line-height-95 m-0 font-weight-medium font-28 text-uppercase\">";
// line 68
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product.price", [], "ECommerceBundle"), "html", null, true);
yield "</p>
<p class=\"line-height-95 mb-0 ml-auto font-weight-medium font-28\">";
// line 69
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber($this->extensions['App\Service\ECommerce\ProductTwigExtension']->depotProductPriceFilter((isset($context["firstDepot"]) || array_key_exists("firstDepot", $context) ? $context["firstDepot"] : (function () { throw new RuntimeError('Variable "firstDepot" does not exist.', 69, $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.', 69, $this->source); })()), "user", [], "any", false, false, false, 69)), 2), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Service\ECommerce\ProductTwigExtension']->currencyCodeFunction(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.', 69, $this->source); })()), "user", [], "any", false, false, false, 69)), "html", null, true);
yield "</p>
</div>
";
// line 80
yield " </div>
<div class=\"border-rounded w-100 h-100 d-flex flex-column text-center\">
<h4 class=\"m-0\">";
// line 83
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("availability", [], "ECommerceBundle"), "html", null, true);
yield "</h4>
<div class=\"col-depot-info";
// line 84
yield (((($tmp = (isset($context["hasActiveDepot"]) || array_key_exists("hasActiveDepot", $context) ? $context["hasActiveDepot"] : (function () { throw new RuntimeError('Variable "hasActiveDepot" does not exist.', 84, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? (" has-active-depot") : (""));
yield " w-100 text-left\">
";
// line 85
if ((($tmp = (isset($context["firstDepot"]) || array_key_exists("firstDepot", $context) ? $context["firstDepot"] : (function () { throw new RuntimeError('Variable "firstDepot" does not exist.', 85, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 86
yield " ";
if (( !(isset($context["hasActiveDepot"]) || array_key_exists("hasActiveDepot", $context) ? $context["hasActiveDepot"] : (function () { throw new RuntimeError('Variable "hasActiveDepot" does not exist.', 86, $this->source); })()) || (CoreExtension::getAttribute($this->env, $this->source, (isset($context["firstDepot"]) || array_key_exists("firstDepot", $context) ? $context["firstDepot"] : (function () { throw new RuntimeError('Variable "firstDepot" does not exist.', 86, $this->source); })()), "quantity", [], "any", false, false, false, 86) > 0))) {
// line 87
yield " ";
$context["depotProduct"] = (isset($context["firstDepot"]) || array_key_exists("firstDepot", $context) ? $context["firstDepot"] : (function () { throw new RuntimeError('Variable "firstDepot" does not exist.', 87, $this->source); })());
// line 88
yield " ";
yield from $this->load("ECommerce/App/Product/partials/product_amount.html.twig", 88)->unwrap()->yield($context);
// line 89
yield " ";
}
// line 90
yield " ";
}
// line 91
yield "
";
// line 92
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["restDepots"]) || array_key_exists("restDepots", $context) ? $context["restDepots"] : (function () { throw new RuntimeError('Variable "restDepots" does not exist.', 92, $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["depot"]) {
// line 93
yield " ";
if (( !(isset($context["hasActiveDepot"]) || array_key_exists("hasActiveDepot", $context) ? $context["hasActiveDepot"] : (function () { throw new RuntimeError('Variable "hasActiveDepot" does not exist.', 93, $this->source); })()) || (CoreExtension::getAttribute($this->env, $this->source, $context["depot"], "quantity", [], "any", false, false, false, 93) > 0))) {
// line 94
yield " ";
$context["depotProduct"] = $context["depot"];
// line 95
yield " ";
yield from $this->load("ECommerce/App/Product/partials/product_amount.html.twig", 95)->unwrap()->yield($context);
// line 96
yield " ";
}
// line 97
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['depot'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 98
yield " </div>
</div>
</div>
<div class=\"row single-product-description\">
<a class=\"mt-3\" href=\"";
// line 103
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(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.', 103, $this->source); })()), "link", [], "any", false, false, false, 103), "html", null, true);
yield "\" target=\"_blank\" rel=\"nofollow\">
<h3 class=\"text-uppercase line-height-95 font-weight-normal font-28\">";
// line 104
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product.more_info", [], "ECommerceBundle"), "html", null, true);
yield "</h3>
</a>
";
// line 106
if ((($tmp = !Twig\Extension\CoreExtension::testEmpty(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.', 106, $this->source); })()), "infoCodes", [], "any", false, false, false, 106))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 107
yield " <h4 class=\"font-21 line-height-95 font-weight-normal text-uppercase mt-3\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product.description", [], "ECommerceBundle"), "html", null, true);
yield "</h4>
<p class=\"line-height-113 text-color-grey mt-4 font-weight-normal font-26\">";
// line 108
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 108, $this->source); })()), "infoCodes", [], "any", false, false, false, 108), "first", [], "any", false, false, false, 108), "translate", [], "any", false, false, false, 108), "description", [], "any", false, false, false, 108), "html", null, true);
yield "</p>
";
}
// line 110
yield " </div>
<div class=\"row justify-content-center\">
<div class=\"synonym-products\">
<div id=\"interchange-wrapper\" class=\"mt-3 mb-5\">
<div class=\"row justify-content-center\">
<div class=\"col-12 mb-5 text-center\">
<h1>";
// line 117
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("general.interchange_button_title", [], "ECommerceBundle"), "html", null, true);
yield "</h1>
<a class=\"btn btn-primary mt-4\"
href=\"";
// line 119
yield $this->extensions['App\Service\App\PublicTwig']->pathFunction("mdl_app_synonym_product_find", ["title" => Twig\Extension\CoreExtension::trim(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.', 119, $this->source); })()), "title", [], "any", false, false, false, 119), "*", "left")]);
yield "\"
data-intro=\"";
// line 120
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("intro.interchange", [], "ECommerceBundle"), "html", null, true);
yield "\"
data-toggle=\"replace\"
data-trigger=\"#interchange-wrapper\">
<span class=\"text-capitalize font-21 font-weight-normal\">";
// line 123
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("general.interchange_button_search", [], "ECommerceBundle"), "html", null, true);
yield "</span>
<img src=\"";
// line 124
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/static/arrows-both-way.svg"), "html", null, true);
yield "\" class=\"img-fluid ml-5\"
alt=\"found in interchange catalogue\">
</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"row catalog\">
";
// line 134
$context["routeParams"] = ["slug" => "media"];
// line 135
yield " ";
if ((($tmp = !(null === 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.', 135, $this->source); })()), "manufacturer", [], "any", false, false, false, 135))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 136
yield " ";
$context["routeParams"] = Twig\Extension\CoreExtension::merge((isset($context["routeParams"]) || array_key_exists("routeParams", $context) ? $context["routeParams"] : (function () { throw new RuntimeError('Variable "routeParams" does not exist.', 136, $this->source); })()), ["category" => 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.', 136, $this->source); })()), "manufacturer", [], "any", false, false, false, 136), "name", [], "any", false, false, false, 136)]);
// line 137
yield " ";
}
// line 138
yield "
<a class=\"w-100\" href=\"";
// line 139
yield $this->extensions['App\Service\App\PublicTwig']->pathFunction("mdl_public_page_show", (isset($context["routeParams"]) || array_key_exists("routeParams", $context) ? $context["routeParams"] : (function () { throw new RuntimeError('Variable "routeParams" does not exist.', 139, $this->source); })()));
yield "\">
<img class=\"w-100\" src=\"";
// line 140
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/static/catalog-background.png"), "html", null, true);
yield "\" aria-label=\"Catalog background\" alt=\"Catalog background\"/>
<h1 class=\"font-72 text-capitalize text-decoration-none text-white\">";
// line 141
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("look-catalogue", [], "ECommerceBundle"), "html", null, true);
yield "</h1>
<p class=\"font-26 text-white pb-3\">";
// line 142
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("find-out-more", [], "ECommerceBundle"), "html", null, true);
yield "<img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/static/arrow-button.svg"), "html", null, true);
yield "\" alt=\"Arrow button\"/></p>
</a>
</div>
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "ECommerce/App/Product/show.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 430 => 142, 426 => 141, 422 => 140, 418 => 139, 415 => 138, 412 => 137, 409 => 136, 406 => 135, 404 => 134, 391 => 124, 387 => 123, 381 => 120, 377 => 119, 372 => 117, 363 => 110, 358 => 108, 353 => 107, 351 => 106, 346 => 104, 342 => 103, 335 => 98, 321 => 97, 318 => 96, 315 => 95, 312 => 94, 309 => 93, 292 => 92, 289 => 91, 286 => 90, 283 => 89, 280 => 88, 277 => 87, 274 => 86, 272 => 85, 268 => 84, 264 => 83, 259 => 80, 251 => 69, 247 => 68, 239 => 63, 235 => 62, 228 => 58, 224 => 57, 217 => 53, 213 => 52, 206 => 48, 202 => 47, 199 => 46, 193 => 45, 190 => 44, 187 => 43, 184 => 42, 179 => 41, 177 => 40, 175 => 38, 173 => 37, 171 => 35, 167 => 33, 162 => 32, 158 => 30, 154 => 29, 148 => 27, 146 => 26, 144 => 25, 138 => 20, 132 => 19, 127 => 18, 119 => 17, 116 => 16, 112 => 15, 105 => 10, 92 => 9, 67 => 5, 56 => 1, 54 => 7, 41 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'base.html.twig' %}
{% trans_default_domain 'ECommerceBundle' %}
{% block title %}{{ product.originalTitle }} {{ product.origin }}{% endblock %}
{%- import 'ECommerce/App/Product/macros.html.twig' as macros -%}
{% block content %}
<div class=\"container-fluid\">
<div class=\"container\">
<div class=\"content\">
<div class=\"row product-path\">
<p class=\"m-0\">
{% for crumb in breadcrumbs %}
{% if crumb.url is defined %}
<a href=\"{{ crumb.url }}\">{{ crumb.label|trans }}</a> <span>/</span>
{% else %}<span>{{ crumb.label }}</span>{% endif %}
{% endfor %}
</p>
</div>
<div class=\"row grid-1-3\">
<div class=\"product-photo w-100 h-100\">
{%- set photo = product.photos|first -%}
{%- if photo is not empty and photo.url is not empty -%}
<img src=\"{{ asset(photo.url)|imagine_filter('product_thumbnail') }}\"
class=\"img-fluid mx-auto d-block w-100 h-100\"
alt=\"{{ product.title }}\" data-lity
data-lity-target=\"{{ asset(photo.url)|imagine_filter('product_small') }}\">
{%- else -%}
<img src=\"{{ preload(asset('/assets/static/no-photo.jpg')) }}\" class=\"img-fluid mx-auto d-block\"
alt=\"{{ product.title }}\">
{%- endif -%}
</div>
{%- set firstDepot = product.quantities|first -%}
{%- set restDepots = product.quantities[1:] -%}
{% set hasActiveDepot = false %}
{% for depot in product.quantities %}
{% if depot.quantity > 0 %}
{% set hasActiveDepot = true %}
{% endif %}
{% endfor %}
<div class=\"product-info d-flex flex-column\">
<h2 class=\"text-left line-height-95 font-weight-bold font-45\">{{ product.title }}</h2>
<p class=\"line-height-95 font-weight-medium font-28 mb-40\">{{ product.manufacturer }}</p>
<div class=\"dimensions-wrapper\">
<div class=\"dimensions d-inline-flex align-items-center\">
<img src=\"{{ preload(asset('assets/static/inner-diameter.svg')) }}\" alt=\"Inner Diameter\">
<p class=\"m-0 font-26 ml-3\">{{ product.innerDiameter|number_format(2) }} mm</p>
</div>
<div class=\"dimensions d-inline-flex align-items-center\">
<img src=\"{{ preload(asset('assets/static/outer-diameter.svg')) }}\" alt=\"Outer Diameter\">
<p class=\"m-0 font-26 ml-3\">{{ product.outerDiameter|number_format(2) }} mm</p>
</div>
<div class=\"dimensions d-inline-flex align-items-center last mb-4\">
<img src=\"{{ preload(asset('assets/static/width.svg')) }}\" alt=\"Width\">
<p class=\"m-0 font-26 ml-3\">{{ product.width|number_format(2) }} mm</p>
</div>
</div>
<div class=\"price d-inline-flex align-items-center mt-5\">
<p class=\"line-height-95 m-0 font-weight-medium font-28 text-uppercase\">{{ 'product.price'|trans }}</p>
<p class=\"line-height-95 mb-0 ml-auto font-weight-medium font-28\">{{ firstDepot|depot_product_price(app.user)|number_format(2) }} {{ currency_code(app.user) }}</p>
</div>
{# <div class=\"price d-inline-flex align-items-end\">#}
{# <p class=\"line-height-95 m-0 mt-3 font-weight-medium font-28 color-blue text-uppercase mw-10\">{{ 'product.label_discount_price'|trans }}</p>#}
{# {% if is_granted('ROLE_CLIENT') %}#}
{# <p class=\"line-height-95 mb-0 ml-auto font-weight-medium font-28 color-blue\">{{ firstDepot|depot_product_price(app.user, true)|number_format(2) }} {{ currency_code(app.user) }}</p>#}
{# {% else %}#}
{# <p class=\"line-height-95 mb-0 ml-auto font-weight-medium font-28 color-blue\">{{ 'product.log-in'|trans }}</p>#}
{# {% endif %}#}
{# </div>#}
</div>
<div class=\"border-rounded w-100 h-100 d-flex flex-column text-center\">
<h4 class=\"m-0\">{{ 'availability'|trans }}</h4>
<div class=\"col-depot-info{{ hasActiveDepot ? ' has-active-depot' : '' }} w-100 text-left\">
{% if firstDepot %}
{% if not hasActiveDepot or firstDepot.quantity > 0 %}
{% set depotProduct = firstDepot %}
{% include 'ECommerce/App/Product/partials/product_amount.html.twig' %}
{% endif %}
{% endif %}
{% for depot in restDepots %}
{% if not hasActiveDepot or depot.quantity > 0 %}
{% set depotProduct = depot %}
{% include 'ECommerce/App/Product/partials/product_amount.html.twig' %}
{% endif %}
{% endfor %}
</div>
</div>
</div>
<div class=\"row single-product-description\">
<a class=\"mt-3\" href=\"{{ product.link }}\" target=\"_blank\" rel=\"nofollow\">
<h3 class=\"text-uppercase line-height-95 font-weight-normal font-28\">{{ 'product.more_info'|trans }}</h3>
</a>
{% if product.infoCodes is not empty %}
<h4 class=\"font-21 line-height-95 font-weight-normal text-uppercase mt-3\">{{ 'product.description'|trans }}</h4>
<p class=\"line-height-113 text-color-grey mt-4 font-weight-normal font-26\">{{ product.infoCodes.first.translate.description }}</p>
{% endif %}
</div>
<div class=\"row justify-content-center\">
<div class=\"synonym-products\">
<div id=\"interchange-wrapper\" class=\"mt-3 mb-5\">
<div class=\"row justify-content-center\">
<div class=\"col-12 mb-5 text-center\">
<h1>{{ 'general.interchange_button_title'|trans }}</h1>
<a class=\"btn btn-primary mt-4\"
href=\"{{ path('mdl_app_synonym_product_find', { 'title': (product.title|trim('*', 'left')) }) }}\"
data-intro=\"{{ ('intro.interchange'|trans) }}\"
data-toggle=\"replace\"
data-trigger=\"#interchange-wrapper\">
<span class=\"text-capitalize font-21 font-weight-normal\">{{ 'general.interchange_button_search'|trans }}</span>
<img src=\"{{ asset('assets/static/arrows-both-way.svg') }}\" class=\"img-fluid ml-5\"
alt=\"found in interchange catalogue\">
</a>
</div>
</div>
</div>
</div>
</div>
<div class=\"row catalog\">
{% set routeParams = {'slug': 'media'} %}
{% if product.manufacturer is not null %}
{% set routeParams = routeParams|merge({'category': product.manufacturer.name}) %}
{% endif %}
<a class=\"w-100\" href=\"{{ path('mdl_public_page_show', routeParams) }}\">
<img class=\"w-100\" src=\"{{ asset('assets/static/catalog-background.png') }}\" aria-label=\"Catalog background\" alt=\"Catalog background\"/>
<h1 class=\"font-72 text-capitalize text-decoration-none text-white\">{{ 'look-catalogue'|trans }}</h1>
<p class=\"font-26 text-white pb-3\">{{ 'find-out-more'|trans }}<img src=\"{{ asset('assets/static/arrow-button.svg') }}\" alt=\"Arrow button\"/></p>
</a>
</div>
</div>
</div>
</div>
{% endblock %}", "ECommerce/App/Product/show.html.twig", "/var/www/rs.optima/templates/ECommerce/App/Product/show.html.twig");
}
}