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