<?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_f6e4129b212a416ca59d757064fcc94e 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->loadTemplate("ECommerce/App/Product/macros.html.twig", "ECommerce/App/Product/show.html.twig", 7)->unwrap();
// line 1
$this->parent = $this->loadTemplate("base.html.twig", "ECommerce/App/Product/show.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 grid-1-3\">
<div class=\"product-photo w-100 h-100\">";
// line 16
$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.', 16, $this->source); })()), "photos", [], "any", false, false, false, 16));
// line 17
if (( !Twig\Extension\CoreExtension::testEmpty((isset($context["photo"]) || array_key_exists("photo", $context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.', 17, $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.', 17, $this->source); })()), "url", [], "any", false, false, false, 17)))) {
// line 18
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.', 18, $this->source); })()), "url", [], "any", false, false, false, 18)), "product_thumbnail"), "html", null, true);
yield "\"
class=\"img-fluid mx-auto d-block w-100 h-100\"
alt=\"";
// line 20
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.', 20, $this->source); })()), "title", [], "any", false, false, false, 20), "html", null, true);
yield "\" data-lity
data-lity-target=\"";
// line 21
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.', 21, $this->source); })()), "url", [], "any", false, false, false, 21)), "product_small"), "html", null, true);
yield "\">";
} else {
// line 23
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 24
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.', 24, $this->source); })()), "title", [], "any", false, false, false, 24), "html", null, true);
yield "\">";
}
// line 26
yield "</div>";
// line 28
$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.', 28, $this->source); })()), "quantities", [], "any", false, false, false, 28));
// line 29
$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.', 29, $this->source); })()), "quantities", [], "any", false, false, false, 29), 1, null);
// line 31
$context["hasActiveDepot"] = false;
// line 32
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.', 32, $this->source); })()), "quantities", [], "any", false, false, false, 32));
foreach ($context['_seq'] as $context["_key"] => $context["depot"]) {
// line 33
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["depot"], "quantity", [], "any", false, false, false, 33) > 0)) {
// line 34
yield " ";
$context["hasActiveDepot"] = true;
// line 35
yield " ";
}
// line 36
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['depot'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 37
yield " <div class=\"product-info d-flex flex-column\">
<h1 class=\"text-left line-height-95 font-weight-bold font-45\">";
// line 38
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.', 38, $this->source); })()), "title", [], "any", false, false, false, 38), "html", null, true);
yield "</h1>
<p class=\"line-height-95 font-weight-medium font-28 mb-40\">";
// line 39
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.', 39, $this->source); })()), "manufacturer", [], "any", false, false, false, 39), "html", null, true);
yield "</p>
<div class=\"dimensions d-inline-flex align-items-center\">
<img src=\"";
// line 41
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 42
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.', 42, $this->source); })()), "outerDiameter", [], "any", false, false, false, 42), 2), "html", null, true);
yield " mm</p>
</div>
<div class=\"dimensions d-inline-flex align-items-center\">
<img src=\"";
// line 45
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 46
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.', 46, $this->source); })()), "innerDiameter", [], "any", false, false, false, 46), 2), "html", null, true);
yield " mm</p>
</div>
<div class=\"dimensions d-inline-flex align-items-center last mb-4\">
<img src=\"";
// line 49
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 50
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.', 50, $this->source); })()), "width", [], "any", false, false, false, 50), 2), "html", null, true);
yield " mm</p>
</div>
<div class=\"price d-inline-flex align-items-center\">
<p class=\"line-height-95 m-0 font-weight-medium font-28 text-uppercase\">";
// line 53
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 54
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.', 54, $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.', 54, $this->source); })()), "user", [], "any", false, false, false, 54)), 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.', 54, $this->source); })()), "user", [], "any", false, false, false, 54)), "html", null, true);
yield "</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\">";
// line 57
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product.label_discount_price", [], "ECommerceBundle"), "html", null, true);
yield "</p>
";
// line 58
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_CLIENT")) {
// line 59
yield " <p class=\"line-height-95 mb-0 ml-auto font-weight-medium font-28 color-blue\">";
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.', 59, $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.', 59, $this->source); })()), "user", [], "any", false, false, false, 59), true), 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.', 59, $this->source); })()), "user", [], "any", false, false, false, 59)), "html", null, true);
yield "</p>
";
} else {
// line 61
yield " <p class=\"line-height-95 mb-0 ml-auto font-weight-medium font-28 color-blue\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product.log-in", [], "ECommerceBundle"), "html", null, true);
yield "</p>
";
}
// line 63
yield " </div>
</div>
<div class=\"border-rounded w-100 h-100 d-flex\">
<div class=\"col-depot-info";
// line 67
yield (((isset($context["hasActiveDepot"]) || array_key_exists("hasActiveDepot", $context) ? $context["hasActiveDepot"] : (function () { throw new RuntimeError('Variable "hasActiveDepot" does not exist.', 67, $this->source); })())) ? (" has-active-depot") : (""));
yield " w-100\">
";
// line 68
if ((isset($context["firstDepot"]) || array_key_exists("firstDepot", $context) ? $context["firstDepot"] : (function () { throw new RuntimeError('Variable "firstDepot" does not exist.', 68, $this->source); })())) {
// line 69
yield " ";
if (( !(isset($context["hasActiveDepot"]) || array_key_exists("hasActiveDepot", $context) ? $context["hasActiveDepot"] : (function () { throw new RuntimeError('Variable "hasActiveDepot" does not exist.', 69, $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.', 69, $this->source); })()), "quantity", [], "any", false, false, false, 69) > 0))) {
// line 70
yield " ";
$context["depotProduct"] = (isset($context["firstDepot"]) || array_key_exists("firstDepot", $context) ? $context["firstDepot"] : (function () { throw new RuntimeError('Variable "firstDepot" does not exist.', 70, $this->source); })());
// line 71
yield " ";
yield from $this->loadTemplate("ECommerce/App/Product/partials/product_amount.html.twig", "ECommerce/App/Product/show.html.twig", 71)->unwrap()->yield($context);
// line 72
yield " ";
}
// line 73
yield " ";
}
// line 74
yield "
";
// line 75
$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.', 75, $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 76
yield " ";
if (( !(isset($context["hasActiveDepot"]) || array_key_exists("hasActiveDepot", $context) ? $context["hasActiveDepot"] : (function () { throw new RuntimeError('Variable "hasActiveDepot" does not exist.', 76, $this->source); })()) || (CoreExtension::getAttribute($this->env, $this->source, $context["depot"], "quantity", [], "any", false, false, false, 76) > 0))) {
// line 77
yield " ";
$context["depotProduct"] = $context["depot"];
// line 78
yield " ";
yield from $this->loadTemplate("ECommerce/App/Product/partials/product_amount.html.twig", "ECommerce/App/Product/show.html.twig", 78)->unwrap()->yield($context);
// line 79
yield " ";
}
// line 80
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 81
yield " </div>
</div>
</div>
<div class=\"row single-product-description\">
<a class=\"mt-3\" href=\"";
// line 86
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.', 86, $this->source); })()), "link", [], "any", false, false, false, 86), "html", null, true);
yield "\" target=\"_blank\" rel=\"nofollow\">
<h3 class=\"text-uppercase line-height-95 font-weight-normal font-28\">";
// line 87
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>
</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 96
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 98
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.', 98, $this->source); })()), "title", [], "any", false, false, false, 98), "*", "left")]);
yield "\"
data-intro=\"";
// line 99
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 102
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 103
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\">
<a class=\"w-100\" href=\"";
// line 113
yield $this->extensions['App\Service\App\PublicTwig']->pathFunction("mdl_public_page_show", ["slug" => "media", "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.', 113, $this->source); })()), "manufacturer", [], "any", false, false, false, 113), "name", [], "any", false, false, false, 113)]);
yield "\">
<img class=\"w-100\" src=\"";
// line 114
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\">Pogledaj katalog</h1>
<p class=\"font-26 text-white pb-3\">Otkrij vise<img src=\"";
// line 116
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 ( 378 => 116, 373 => 114, 369 => 113, 356 => 103, 352 => 102, 346 => 99, 342 => 98, 337 => 96, 325 => 87, 321 => 86, 314 => 81, 300 => 80, 297 => 79, 294 => 78, 291 => 77, 288 => 76, 271 => 75, 268 => 74, 265 => 73, 262 => 72, 259 => 71, 256 => 70, 253 => 69, 251 => 68, 247 => 67, 241 => 63, 235 => 61, 227 => 59, 225 => 58, 221 => 57, 213 => 54, 209 => 53, 203 => 50, 199 => 49, 193 => 46, 189 => 45, 183 => 42, 179 => 41, 174 => 39, 170 => 38, 167 => 37, 161 => 36, 158 => 35, 155 => 34, 152 => 33, 147 => 32, 145 => 31, 143 => 29, 141 => 28, 139 => 26, 135 => 24, 130 => 23, 126 => 21, 122 => 20, 116 => 18, 114 => 17, 112 => 16, 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 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\">
<h1 class=\"text-left line-height-95 font-weight-bold font-45\">{{ product.title }}</h1>
<p class=\"line-height-95 font-weight-medium font-28 mb-40\">{{ product.manufacturer }}</p>
<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\">
<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 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 class=\"price d-inline-flex align-items-center\">
<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\">
<div class=\"col-depot-info{{ hasActiveDepot ? ' has-active-depot' : '' }} w-100\">
{% 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>
</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\">
<a class=\"w-100\" href=\"{{ path('mdl_public_page_show', {'slug': 'media', 'category': product.manufacturer.name}) }}\">
<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\">Pogledaj katalog</h1>
<p class=\"font-26 text-white pb-3\">Otkrij vise<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.staging/templates/ECommerce/App/Product/show.html.twig");
}
}