var/cache/dev/twig/b1/b1956ec8426227d4627040c117092e84.php line 57

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* ECommerce/App/Product/show.html.twig */
  16. class __TwigTemplate_f6e4129b212a416ca59d757064fcc94e extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->blocks = [
  28. 'title' => [$this, 'block_title'],
  29. 'content' => [$this, 'block_content'],
  30. ];
  31. }
  32. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33. {
  34. // line 1
  35. return "base.html.twig";
  36. }
  37. protected function doDisplay(array $context, array $blocks = []): iterable
  38. {
  39. $macros = $this->macros;
  40. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "ECommerce/App/Product/show.html.twig"));
  42. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "ECommerce/App/Product/show.html.twig"));
  44. // line 7
  45. $macros["͜macros"] = $this->macros["͜macros"] = $this->loadTemplate("ECommerce/App/Product/macros.html.twig", "ECommerce/App/Product/show.html.twig", 7)->unwrap();
  46. // line 1
  47. $this->parent = $this->loadTemplate("base.html.twig", "ECommerce/App/Product/show.html.twig", 1);
  48. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  49. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  50. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  51. }
  52. // line 5
  53. /**
  54. * @return iterable<null|scalar|\Stringable>
  55. */
  56. public function block_title(array $context, array $blocks = []): iterable
  57. {
  58. $macros = $this->macros;
  59. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  60. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  61. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  62. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  63. 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);
  64. yield " ";
  65. 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);
  66. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  67. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  68. yield from [];
  69. }
  70. // line 9
  71. /**
  72. * @return iterable<null|scalar|\Stringable>
  73. */
  74. public function block_content(array $context, array $blocks = []): iterable
  75. {
  76. $macros = $this->macros;
  77. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  78. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  79. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  80. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  81. // line 10
  82. yield " <div class=\"container-fluid\">
  83. <div class=\"container\">
  84. <div class=\"content\">
  85. <div class=\"row grid-1-3\">
  86. <div class=\"product-photo w-100 h-100\">";
  87. // line 16
  88. $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));
  89. // line 17
  90. 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)))) {
  91. // line 18
  92. yield "<img src=\"";
  93. 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);
  94. yield "\"
  95. class=\"img-fluid mx-auto d-block w-100 h-100\"
  96. alt=\"";
  97. // line 20
  98. 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);
  99. yield "\" data-lity
  100. data-lity-target=\"";
  101. // line 21
  102. 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);
  103. yield "\">";
  104. } else {
  105. // line 23
  106. yield "<img src=\"";
  107. 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);
  108. yield "\" class=\"img-fluid mx-auto d-block\"
  109. alt=\"";
  110. // line 24
  111. 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);
  112. yield "\">";
  113. }
  114. // line 26
  115. yield "</div>";
  116. // line 28
  117. $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));
  118. // line 29
  119. $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);
  120. // line 31
  121. $context["hasActiveDepot"] = false;
  122. // line 32
  123. yield " ";
  124. $context['_parent'] = $context;
  125. $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));
  126. foreach ($context['_seq'] as $context["_key"] => $context["depot"]) {
  127. // line 33
  128. yield " ";
  129. if ((CoreExtension::getAttribute($this->env, $this->source, $context["depot"], "quantity", [], "any", false, false, false, 33) > 0)) {
  130. // line 34
  131. yield " ";
  132. $context["hasActiveDepot"] = true;
  133. // line 35
  134. yield " ";
  135. }
  136. // line 36
  137. yield " ";
  138. }
  139. $_parent = $context['_parent'];
  140. unset($context['_seq'], $context['_key'], $context['depot'], $context['_parent']);
  141. $context = array_intersect_key($context, $_parent) + $_parent;
  142. // line 37
  143. yield " <div class=\"product-info d-flex flex-column\">
  144. <h1 class=\"text-left line-height-95 font-weight-bold font-45\">";
  145. // line 38
  146. 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);
  147. yield "</h1>
  148. <p class=\"line-height-95 font-weight-medium font-28 mb-40\">";
  149. // line 39
  150. 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);
  151. yield "</p>
  152. <div class=\"dimensions d-inline-flex align-items-center\">
  153. <img src=\"";
  154. // line 41
  155. 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);
  156. yield "\" alt=\"Outer Diameter\">
  157. <p class=\"m-0 font-26 ml-3\">";
  158. // line 42
  159. 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);
  160. yield " mm</p>
  161. </div>
  162. <div class=\"dimensions d-inline-flex align-items-center\">
  163. <img src=\"";
  164. // line 45
  165. 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);
  166. yield "\" alt=\"Inner Diameter\">
  167. <p class=\"m-0 font-26 ml-3\">";
  168. // line 46
  169. 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);
  170. yield " mm</p>
  171. </div>
  172. <div class=\"dimensions d-inline-flex align-items-center last mb-4\">
  173. <img src=\"";
  174. // line 49
  175. 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);
  176. yield "\" alt=\"Width\">
  177. <p class=\"m-0 font-26 ml-3\">";
  178. // line 50
  179. 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);
  180. yield " mm</p>
  181. </div>
  182. <div class=\"price d-inline-flex align-items-center\">
  183. <p class=\"line-height-95 m-0 font-weight-medium font-28 text-uppercase\">";
  184. // line 53
  185. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product.price", [], "ECommerceBundle"), "html", null, true);
  186. yield "</p>
  187. <p class=\"line-height-95 mb-0 ml-auto font-weight-medium font-28\">";
  188. // line 54
  189. 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);
  190. yield " ";
  191. 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);
  192. yield "</p>
  193. </div>
  194. <div class=\"price d-inline-flex align-items-end\">
  195. <p class=\"line-height-95 m-0 mt-3 font-weight-medium font-28 color-blue text-uppercase mw-10\">";
  196. // line 57
  197. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product.label_discount_price", [], "ECommerceBundle"), "html", null, true);
  198. yield "</p>
  199. ";
  200. // line 58
  201. if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_CLIENT")) {
  202. // line 59
  203. yield " <p class=\"line-height-95 mb-0 ml-auto font-weight-medium font-28 color-blue\">";
  204. 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);
  205. yield " ";
  206. 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);
  207. yield "</p>
  208. ";
  209. } else {
  210. // line 61
  211. yield " <p class=\"line-height-95 mb-0 ml-auto font-weight-medium font-28 color-blue\">";
  212. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product.log-in", [], "ECommerceBundle"), "html", null, true);
  213. yield "</p>
  214. ";
  215. }
  216. // line 63
  217. yield " </div>
  218. </div>
  219. <div class=\"border-rounded w-100 h-100 d-flex\">
  220. <div class=\"col-depot-info";
  221. // line 67
  222. 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") : (""));
  223. yield " w-100\">
  224. ";
  225. // line 68
  226. if ((isset($context["firstDepot"]) || array_key_exists("firstDepot", $context) ? $context["firstDepot"] : (function () { throw new RuntimeError('Variable "firstDepot" does not exist.', 68, $this->source); })())) {
  227. // line 69
  228. yield " ";
  229. 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))) {
  230. // line 70
  231. yield " ";
  232. $context["depotProduct"] = (isset($context["firstDepot"]) || array_key_exists("firstDepot", $context) ? $context["firstDepot"] : (function () { throw new RuntimeError('Variable "firstDepot" does not exist.', 70, $this->source); })());
  233. // line 71
  234. yield " ";
  235. yield from $this->loadTemplate("ECommerce/App/Product/partials/product_amount.html.twig", "ECommerce/App/Product/show.html.twig", 71)->unwrap()->yield($context);
  236. // line 72
  237. yield " ";
  238. }
  239. // line 73
  240. yield " ";
  241. }
  242. // line 74
  243. yield "
  244. ";
  245. // line 75
  246. $context['_parent'] = $context;
  247. $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); })()));
  248. $context['loop'] = [
  249. 'parent' => $context['_parent'],
  250. 'index0' => 0,
  251. 'index' => 1,
  252. 'first' => true,
  253. ];
  254. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  255. $length = count($context['_seq']);
  256. $context['loop']['revindex0'] = $length - 1;
  257. $context['loop']['revindex'] = $length;
  258. $context['loop']['length'] = $length;
  259. $context['loop']['last'] = 1 === $length;
  260. }
  261. foreach ($context['_seq'] as $context["_key"] => $context["depot"]) {
  262. // line 76
  263. yield " ";
  264. 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))) {
  265. // line 77
  266. yield " ";
  267. $context["depotProduct"] = $context["depot"];
  268. // line 78
  269. yield " ";
  270. yield from $this->loadTemplate("ECommerce/App/Product/partials/product_amount.html.twig", "ECommerce/App/Product/show.html.twig", 78)->unwrap()->yield($context);
  271. // line 79
  272. yield " ";
  273. }
  274. // line 80
  275. yield " ";
  276. ++$context['loop']['index0'];
  277. ++$context['loop']['index'];
  278. $context['loop']['first'] = false;
  279. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  280. --$context['loop']['revindex0'];
  281. --$context['loop']['revindex'];
  282. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  283. }
  284. }
  285. $_parent = $context['_parent'];
  286. unset($context['_seq'], $context['_key'], $context['depot'], $context['_parent'], $context['loop']);
  287. $context = array_intersect_key($context, $_parent) + $_parent;
  288. // line 81
  289. yield " </div>
  290. </div>
  291. </div>
  292. <div class=\"row single-product-description\">
  293. <a class=\"mt-3\" href=\"";
  294. // line 86
  295. 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);
  296. yield "\" target=\"_blank\" rel=\"nofollow\">
  297. <h3 class=\"text-uppercase line-height-95 font-weight-normal font-28\">";
  298. // line 87
  299. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("product.more_info", [], "ECommerceBundle"), "html", null, true);
  300. yield "</h3>
  301. </a>
  302. </div>
  303. <div class=\"row justify-content-center\">
  304. <div class=\"synonym-products\">
  305. <div id=\"interchange-wrapper\" class=\"mt-3 mb-5\">
  306. <div class=\"row justify-content-center\">
  307. <div class=\"col-12 mb-5 text-center\">
  308. <h1>";
  309. // line 96
  310. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("general.interchange_button_title", [], "ECommerceBundle"), "html", null, true);
  311. yield "</h1>
  312. <a class=\"btn btn-primary mt-4\"
  313. href=\"";
  314. // line 98
  315. 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")]);
  316. yield "\"
  317. data-intro=\"";
  318. // line 99
  319. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("intro.interchange", [], "ECommerceBundle"), "html", null, true);
  320. yield "\"
  321. data-toggle=\"replace\"
  322. data-trigger=\"#interchange-wrapper\">
  323. <span class=\"text-capitalize font-21 font-weight-normal\">";
  324. // line 102
  325. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("general.interchange_button_search", [], "ECommerceBundle"), "html", null, true);
  326. yield "</span>
  327. <img src=\"";
  328. // line 103
  329. 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);
  330. yield "\" class=\"img-fluid ml-5\"
  331. alt=\"found in interchange catalogue\">
  332. </a>
  333. </div>
  334. </div>
  335. </div>
  336. </div>
  337. </div>
  338. <div class=\"row catalog\">
  339. <a class=\"w-100\" href=\"";
  340. // line 113
  341. 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)]);
  342. yield "\">
  343. <img class=\"w-100\" src=\"";
  344. // line 114
  345. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/static/catalog-background.png"), "html", null, true);
  346. yield "\" aria-label=\"Catalog background\" alt=\"Catalog background\"/>
  347. <h1 class=\"font-72 text-capitalize text-decoration-none text-white\">Pogledaj katalog</h1>
  348. <p class=\"font-26 text-white pb-3\">Otkrij vise<img src=\"";
  349. // line 116
  350. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/static/arrow-button.svg"), "html", null, true);
  351. yield "\" alt=\"Arrow button\"/></p>
  352. </a>
  353. </div>
  354. </div>
  355. </div>
  356. </div>
  357. ";
  358. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  359. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  360. yield from [];
  361. }
  362. /**
  363. * @codeCoverageIgnore
  364. */
  365. public function getTemplateName(): string
  366. {
  367. return "ECommerce/App/Product/show.html.twig";
  368. }
  369. /**
  370. * @codeCoverageIgnore
  371. */
  372. public function isTraitable(): bool
  373. {
  374. return false;
  375. }
  376. /**
  377. * @codeCoverageIgnore
  378. */
  379. public function getDebugInfo(): array
  380. {
  381. 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,);
  382. }
  383. public function getSourceContext(): Source
  384. {
  385. return new Source("{% extends 'base.html.twig' %}
  386. {% trans_default_domain 'ECommerceBundle' %}
  387. {% block title %}{{ product.originalTitle }} {{ product.origin }}{% endblock %}
  388. {%- import 'ECommerce/App/Product/macros.html.twig' as macros -%}
  389. {% block content %}
  390. <div class=\"container-fluid\">
  391. <div class=\"container\">
  392. <div class=\"content\">
  393. <div class=\"row grid-1-3\">
  394. <div class=\"product-photo w-100 h-100\">
  395. {%- set photo = product.photos|first -%}
  396. {%- if photo is not empty and photo.url is not empty -%}
  397. <img src=\"{{ asset(photo.url)|imagine_filter('product_thumbnail') }}\"
  398. class=\"img-fluid mx-auto d-block w-100 h-100\"
  399. alt=\"{{ product.title }}\" data-lity
  400. data-lity-target=\"{{ asset(photo.url)|imagine_filter('product_small') }}\">
  401. {%- else -%}
  402. <img src=\"{{ preload(asset('/assets/static/no-photo.jpg')) }}\" class=\"img-fluid mx-auto d-block\"
  403. alt=\"{{ product.title }}\">
  404. {%- endif -%}
  405. </div>
  406. {%- set firstDepot = product.quantities|first -%}
  407. {%- set restDepots = product.quantities[1:] -%}
  408. {% set hasActiveDepot = false %}
  409. {% for depot in product.quantities %}
  410. {% if depot.quantity > 0 %}
  411. {% set hasActiveDepot = true %}
  412. {% endif %}
  413. {% endfor %}
  414. <div class=\"product-info d-flex flex-column\">
  415. <h1 class=\"text-left line-height-95 font-weight-bold font-45\">{{ product.title }}</h1>
  416. <p class=\"line-height-95 font-weight-medium font-28 mb-40\">{{ product.manufacturer }}</p>
  417. <div class=\"dimensions d-inline-flex align-items-center\">
  418. <img src=\"{{ preload(asset('assets/static/outer-diameter.svg')) }}\" alt=\"Outer Diameter\">
  419. <p class=\"m-0 font-26 ml-3\">{{ product.outerDiameter|number_format(2) }} mm</p>
  420. </div>
  421. <div class=\"dimensions d-inline-flex align-items-center\">
  422. <img src=\"{{ preload(asset('assets/static/inner-diameter.svg')) }}\" alt=\"Inner Diameter\">
  423. <p class=\"m-0 font-26 ml-3\">{{ product.innerDiameter|number_format(2) }} mm</p>
  424. </div>
  425. <div class=\"dimensions d-inline-flex align-items-center last mb-4\">
  426. <img src=\"{{ preload(asset('assets/static/width.svg')) }}\" alt=\"Width\">
  427. <p class=\"m-0 font-26 ml-3\">{{ product.width|number_format(2) }} mm</p>
  428. </div>
  429. <div class=\"price d-inline-flex align-items-center\">
  430. <p class=\"line-height-95 m-0 font-weight-medium font-28 text-uppercase\">{{ 'product.price'|trans }}</p>
  431. <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>
  432. </div>
  433. <div class=\"price d-inline-flex align-items-end\">
  434. <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>
  435. {% if is_granted('ROLE_CLIENT') %}
  436. <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>
  437. {% else %}
  438. <p class=\"line-height-95 mb-0 ml-auto font-weight-medium font-28 color-blue\">{{ 'product.log-in'|trans }}</p>
  439. {% endif %}
  440. </div>
  441. </div>
  442. <div class=\"border-rounded w-100 h-100 d-flex\">
  443. <div class=\"col-depot-info{{ hasActiveDepot ? ' has-active-depot' : '' }} w-100\">
  444. {% if firstDepot %}
  445. {% if not hasActiveDepot or firstDepot.quantity > 0 %}
  446. {% set depotProduct = firstDepot %}
  447. {% include 'ECommerce/App/Product/partials/product_amount.html.twig' %}
  448. {% endif %}
  449. {% endif %}
  450. {% for depot in restDepots %}
  451. {% if not hasActiveDepot or depot.quantity > 0 %}
  452. {% set depotProduct = depot %}
  453. {% include 'ECommerce/App/Product/partials/product_amount.html.twig' %}
  454. {% endif %}
  455. {% endfor %}
  456. </div>
  457. </div>
  458. </div>
  459. <div class=\"row single-product-description\">
  460. <a class=\"mt-3\" href=\"{{ product.link }}\" target=\"_blank\" rel=\"nofollow\">
  461. <h3 class=\"text-uppercase line-height-95 font-weight-normal font-28\">{{ 'product.more_info'|trans }}</h3>
  462. </a>
  463. </div>
  464. <div class=\"row justify-content-center\">
  465. <div class=\"synonym-products\">
  466. <div id=\"interchange-wrapper\" class=\"mt-3 mb-5\">
  467. <div class=\"row justify-content-center\">
  468. <div class=\"col-12 mb-5 text-center\">
  469. <h1>{{ 'general.interchange_button_title'|trans }}</h1>
  470. <a class=\"btn btn-primary mt-4\"
  471. href=\"{{ path('mdl_app_synonym_product_find', { 'title': (product.title|trim('*', 'left')) }) }}\"
  472. data-intro=\"{{ ('intro.interchange'|trans) }}\"
  473. data-toggle=\"replace\"
  474. data-trigger=\"#interchange-wrapper\">
  475. <span class=\"text-capitalize font-21 font-weight-normal\">{{ 'general.interchange_button_search'|trans }}</span>
  476. <img src=\"{{ asset('assets/static/arrows-both-way.svg') }}\" class=\"img-fluid ml-5\"
  477. alt=\"found in interchange catalogue\">
  478. </a>
  479. </div>
  480. </div>
  481. </div>
  482. </div>
  483. </div>
  484. <div class=\"row catalog\">
  485. <a class=\"w-100\" href=\"{{ path('mdl_public_page_show', {'slug': 'media', 'category': product.manufacturer.name}) }}\">
  486. <img class=\"w-100\" src=\"{{ asset('assets/static/catalog-background.png') }}\" aria-label=\"Catalog background\" alt=\"Catalog background\"/>
  487. <h1 class=\"font-72 text-capitalize text-decoration-none text-white\">Pogledaj katalog</h1>
  488. <p class=\"font-26 text-white pb-3\">Otkrij vise<img src=\"{{ asset('assets/static/arrow-button.svg') }}\" alt=\"Arrow button\"/></p>
  489. </a>
  490. </div>
  491. </div>
  492. </div>
  493. </div>
  494. {% endblock %}", "ECommerce/App/Product/show.html.twig", "/var/www/rs.optima.staging/templates/ECommerce/App/Product/show.html.twig");
  495. }
  496. }