var/cache/dev/twig/1e/1ec8a501a5ffdd74dc14cde6e109f57a.php line 88

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. /* front/catalog/model/view/list-item.html.twig */
  16. class __TwigTemplate_5f3aa650b8e18a94185e482e99aa5d34 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->parent = false;
  28. $this->blocks = [
  29. ];
  30. }
  31. protected function doDisplay(array $context, array $blocks = []): iterable
  32. {
  33. $macros = $this->macros;
  34. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/model/view/list-item.html.twig"));
  36. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/model/view/list-item.html.twig"));
  38. // line 1
  39. if ((($tmp = !array_key_exists("productTitleTag", $context)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  40. // line 2
  41. yield " ";
  42. $context["productTitleTag"] = "div";
  43. }
  44. // line 4
  45. if ((($tmp = !array_key_exists("priceGroup", $context)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  46. // line 5
  47. yield " ";
  48. $context["priceGroup"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["customerMgr"]) || array_key_exists("customerMgr", $context) ? $context["customerMgr"] : (function () { throw new RuntimeError('Variable "customerMgr" does not exist.', 5, $this->source); })()), "getPriceContext", [], "method", false, false, false, 5);
  49. }
  50. // line 7
  51. yield "<li class=\"product\" data-pid=\"";
  52. 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.', 7, $this->source); })()), "id", [], "any", false, false, false, 7), "html", null, true);
  53. yield "\">
  54. ";
  55. // line 8
  56. if (array_key_exists("removeBt", $context)) {
  57. // line 9
  58. yield " <a class=\"";
  59. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["removeBt"]) || array_key_exists("removeBt", $context) ? $context["removeBt"] : (function () { throw new RuntimeError('Variable "removeBt" does not exist.', 9, $this->source); })()), "html", null, true);
  60. yield "\" data-product=\"";
  61. 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.', 9, $this->source); })()), "id", [], "any", false, false, false, 9), "html", null, true);
  62. yield "\">
  63. <svg xmlns=\"http://www.w3.org/2000/svg\" id=\"Calque_2\" viewBox=\"0 0 11.25 11.05\">
  64. <line style=\"fill:none;stroke:#000;stroke-miterlimit:10;\" x1=\".56\" y1=\".35\" x2=\"10.9\" y2=\"10.69\"/>
  65. <line style=\"fill:none;stroke:#000;stroke-miterlimit:10;\" x1=\"10.69\" y1=\".35\" x2=\".35\" y2=\"10.69\"/>
  66. </svg>
  67. </a>
  68. ";
  69. }
  70. // line 16
  71. yield " <div class=\"picture\">
  72. ";
  73. // line 17
  74. if ((Twig\Extension\CoreExtension::length($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.', 17, $this->source); })()), "pictures", [], "any", false, false, false, 17)) > 0)) {
  75. // line 18
  76. yield " <img src=\"";
  77. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Liip\ImagineBundle\Templating\LazyFilterRuntime')->filter($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(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.', 18, $this->source); })()), "pictures", [], "any", false, false, false, 18), 0, [], "any", false, false, false, 18), "webPath", [], "any", false, false, false, 18)), "product_medium"), "html", null, true);
  78. yield "\" width=\"300\" height=\"300\" alt=\"";
  79. 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.', 18, $this->source); })()), "name", [], "any", false, false, false, 18), "html", null, true);
  80. yield "\">
  81. ";
  82. } elseif ((CoreExtension::getAttribute($this->env, $this->source, // line 19
  83. (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 19, $this->source); })()), "parent", [], "any", false, false, false, 19) && (Twig\Extension\CoreExtension::length($this->env->getCharset(), 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.', 19, $this->source); })()), "parent", [], "any", false, false, false, 19), "pictures", [], "any", false, false, false, 19)) > 0))) {
  84. // line 20
  85. yield " <img src=\"";
  86. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Liip\ImagineBundle\Templating\LazyFilterRuntime')->filter($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(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.', 20, $this->source); })()), "parent", [], "any", false, false, false, 20), "pictures", [], "any", false, false, false, 20), 0, [], "any", false, false, false, 20), "webPath", [], "any", false, false, false, 20)), "product_medium"), "html", null, true);
  87. yield "\" width=\"300\" height=\"300\" alt=\"";
  88. 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); })()), "name", [], "any", false, false, false, 20), "html", null, true);
  89. yield "\">
  90. ";
  91. } else {
  92. // line 22
  93. yield " <img src=\"";
  94. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Liip\ImagineBundle\Templating\LazyFilterRuntime')->filter($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("img/img-default.png"), "product_medium"), "html", null, true);
  95. yield "\" width=\"300\" height=\"300\" alt=\"";
  96. 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.', 22, $this->source); })()), "name", [], "any", false, false, false, 22), "html", null, true);
  97. yield "\">
  98. ";
  99. }
  100. // line 24
  101. yield " </div>
  102. <div class=\"manufacturer\">
  103. ";
  104. // line 26
  105. if ((($tmp = 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.', 26, $this->source); })()), "manufacturer", [], "any", false, false, false, 26)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  106. // line 27
  107. yield " ";
  108. $context["slug"] = 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.', 27, $this->source); })()), "manufacturer", [], "any", false, false, false, 27), "getUrl", [CoreExtension::getAttribute($this->env, $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.', 27, $this->source); })()), "request", [], "any", false, false, false, 27), "locale", [], "any", false, false, false, 27)], "method", false, false, false, 27);
  109. // line 28
  110. yield " <a href=\"";
  111. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("manufacturer", ["id" => 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.', 28, $this->source); })()), "manufacturer", [], "any", false, false, false, 28), "id", [], "any", false, false, false, 28), "url" => (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 28, $this->source); })())]), "html", null, true);
  112. yield "\">
  113. ";
  114. // line 29
  115. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(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.', 29, $this->source); })()), "manufacturer", [], "any", false, false, false, 29), "name", [], "any", false, false, false, 29), "html", null, true);
  116. yield "
  117. </a>
  118. ";
  119. }
  120. // line 32
  121. yield " </div>
  122. ";
  123. // line 33
  124. if ((($tmp = 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); })()), "hasParent", [], "method", false, false, false, 33)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  125. // line 34
  126. yield " ";
  127. $context["productUrl"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("product", ["id" => 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.', 34, $this->source); })()), "parent", [], "any", false, false, false, 34), "id", [], "any", false, false, false, 34), "url" => 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.', 34, $this->source); })()), "parent", [], "any", false, false, false, 34), "url", [], "any", false, false, false, 34)]);
  128. // line 35
  129. yield " ";
  130. } else {
  131. // line 36
  132. yield " ";
  133. $context["productUrl"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("product", ["id" => 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.', 36, $this->source); })()), "id", [], "any", false, false, false, 36), "url" => 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.', 36, $this->source); })()), "url", [], "any", false, false, false, 36)]);
  134. // line 37
  135. yield " ";
  136. }
  137. // line 38
  138. yield " <";
  139. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["productTitleTag"]) || array_key_exists("productTitleTag", $context) ? $context["productTitleTag"] : (function () { throw new RuntimeError('Variable "productTitleTag" does not exist.', 38, $this->source); })()), "html", null, true);
  140. yield " class=\"title\"><a href=\"";
  141. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["productUrl"]) || array_key_exists("productUrl", $context) ? $context["productUrl"] : (function () { throw new RuntimeError('Variable "productUrl" does not exist.', 38, $this->source); })()), "html", null, true);
  142. yield "\">";
  143. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\TextExtension']->excerptFilter(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); })()), "name", [], "any", false, false, false, 38), 60, ""), "html", null, true);
  144. yield "</a></";
  145. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["productTitleTag"]) || array_key_exists("productTitleTag", $context) ? $context["productTitleTag"] : (function () { throw new RuntimeError('Variable "productTitleTag" does not exist.', 38, $this->source); })()), "html", null, true);
  146. yield ">
  147. ";
  148. // line 39
  149. if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["customerMgr"]) || array_key_exists("customerMgr", $context) ? $context["customerMgr"] : (function () { throw new RuntimeError('Variable "customerMgr" does not exist.', 39, $this->source); })()), "canSeePrices", [], "method", false, false, false, 39) && 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); })()), "hasPrice", [CoreExtension::getAttribute($this->env, $this->source, (isset($context["customerMgr"]) || array_key_exists("customerMgr", $context) ? $context["customerMgr"] : (function () { throw new RuntimeError('Variable "customerMgr" does not exist.', 39, $this->source); })()), "priceContext", [], "any", false, false, false, 39)], "method", false, false, false, 39))) {
  150. // line 40
  151. yield " ";
  152. $context["country"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["customerMgr"]) || array_key_exists("customerMgr", $context) ? $context["customerMgr"] : (function () { throw new RuntimeError('Variable "customerMgr" does not exist.', 40, $this->source); })()), "getCustomerCountry", [], "method", false, false, false, 40);
  153. // line 41
  154. yield " ";
  155. if ((($tmp = 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); })()), "isAvailableForCountry", [(isset($context["country"]) || array_key_exists("country", $context) ? $context["country"] : (function () { throw new RuntimeError('Variable "country" does not exist.', 41, $this->source); })())], "method", false, false, false, 41)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  156. // line 42
  157. yield " ";
  158. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["customerMgr"]) || array_key_exists("customerMgr", $context) ? $context["customerMgr"] : (function () { throw new RuntimeError('Variable "customerMgr" does not exist.', 42, $this->source); })()), "isExpert", [], "method", false, false, false, 42)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  159. // line 43
  160. yield " ";
  161. if ((($tmp = !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.', 43, $this->source); })()), "isGift", [], "method", false, false, false, 43)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  162. // line 44
  163. yield " <div class=\"price-ctn cf\">
  164. ";
  165. // line 45
  166. if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 45, $this->source); })()), "hasChildren", [], "method", false, false, false, 45) && 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.', 45, $this->source); })()), "getFromPrice", [true, (isset($context["priceGroup"]) || array_key_exists("priceGroup", $context) ? $context["priceGroup"] : (function () { throw new RuntimeError('Variable "priceGroup" does not exist.', 45, $this->source); })()), true], "method", false, false, false, 45))) {
  167. // line 46
  168. yield " <div class=\"from-price\">
  169. <span class=\"from\">";
  170. // line 47
  171. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("A partir de :", [], "messages");
  172. yield "</span>
  173. <span class=\"price\">";
  174. // line 48
  175. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\PriceExtension']->priceFilter(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); })()), "getFromPrice", [true, (isset($context["priceGroup"]) || array_key_exists("priceGroup", $context) ? $context["priceGroup"] : (function () { throw new RuntimeError('Variable "priceGroup" does not exist.', 48, $this->source); })())], "method", false, false, false, 48)), "html", null, true);
  176. yield "</span>
  177. </div>
  178. <span class=\"price-tax-incl\">";
  179. // line 50
  180. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\PriceExtension']->priceFilter(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); })()), "getFromPrice", [true, (isset($context["priceGroup"]) || array_key_exists("priceGroup", $context) ? $context["priceGroup"] : (function () { throw new RuntimeError('Variable "priceGroup" does not exist.', 50, $this->source); })()), true], "method", false, false, false, 50)), "html", null, true);
  181. yield "<sup>";
  182. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ttc"), "html", null, true);
  183. yield "</sup></span>
  184. ";
  185. } else {
  186. // line 52
  187. yield " <span class=\"price\">";
  188. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\PriceExtension']->priceFilter(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.', 52, $this->source); })()), "getPrice", [true, (isset($context["priceGroup"]) || array_key_exists("priceGroup", $context) ? $context["priceGroup"] : (function () { throw new RuntimeError('Variable "priceGroup" does not exist.', 52, $this->source); })())], "method", false, false, false, 52)), "html", null, true);
  189. yield "</span>
  190. <span class=\"price-tax-incl\">";
  191. // line 53
  192. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\PriceExtension']->priceFilter(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); })()), "getPrice", [true, (isset($context["priceGroup"]) || array_key_exists("priceGroup", $context) ? $context["priceGroup"] : (function () { throw new RuntimeError('Variable "priceGroup" does not exist.', 53, $this->source); })()), true], "method", false, false, false, 53)), "html", null, true);
  193. yield "<sup>";
  194. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ttc"), "html", null, true);
  195. yield "</sup></span>
  196. ";
  197. }
  198. // line 55
  199. yield " </div>
  200. ";
  201. }
  202. // line 57
  203. yield " ";
  204. } else {
  205. // line 58
  206. yield " ";
  207. $context["normalPrice"] = 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); })()), "getPrice", [false, (isset($context["priceGroup"]) || array_key_exists("priceGroup", $context) ? $context["priceGroup"] : (function () { throw new RuntimeError('Variable "priceGroup" does not exist.', 58, $this->source); })())], "method", false, false, false, 58);
  208. // line 59
  209. yield " ";
  210. $context["reducedPrice"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["priceMgr"]) || array_key_exists("priceMgr", $context) ? $context["priceMgr"] : (function () { throw new RuntimeError('Variable "priceMgr" does not exist.', 59, $this->source); })()), "getPrice", [(isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 59, $this->source); })()), 1, false], "method", false, false, false, 59);
  211. // line 60
  212. yield " <div class=\"price-ctn cf\">
  213. ";
  214. // line 61
  215. if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 61, $this->source); })()), "hasChildren", [], "method", false, false, false, 61) && 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.', 61, $this->source); })()), "getFromPrice", [true, (isset($context["priceGroup"]) || array_key_exists("priceGroup", $context) ? $context["priceGroup"] : (function () { throw new RuntimeError('Variable "priceGroup" does not exist.', 61, $this->source); })())], "method", false, false, false, 61))) {
  216. // line 62
  217. yield " <span class=\"from\">";
  218. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("A partir de :", [], "messages");
  219. yield "</span>
  220. <span class=\"price\">";
  221. // line 63
  222. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\PriceExtension']->priceFilter(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); })()), "getFromPrice", [true, (isset($context["priceGroup"]) || array_key_exists("priceGroup", $context) ? $context["priceGroup"] : (function () { throw new RuntimeError('Variable "priceGroup" does not exist.', 63, $this->source); })())], "method", false, false, false, 63)), "html", null, true);
  223. yield "</span>
  224. ";
  225. } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, // line 64
  226. (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 64, $this->source); })()), "getPrice", [false, (isset($context["priceGroup"]) || array_key_exists("priceGroup", $context) ? $context["priceGroup"] : (function () { throw new RuntimeError('Variable "priceGroup" does not exist.', 64, $this->source); })())], "method", false, false, false, 64)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  227. // line 65
  228. yield " ";
  229. if (((isset($context["reducedPrice"]) || array_key_exists("reducedPrice", $context) ? $context["reducedPrice"] : (function () { throw new RuntimeError('Variable "reducedPrice" does not exist.', 65, $this->source); })()) < (isset($context["normalPrice"]) || array_key_exists("normalPrice", $context) ? $context["normalPrice"] : (function () { throw new RuntimeError('Variable "normalPrice" does not exist.', 65, $this->source); })()))) {
  230. // line 66
  231. yield " <span class=\"price old-price\">";
  232. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\PriceExtension']->priceFilter((isset($context["normalPrice"]) || array_key_exists("normalPrice", $context) ? $context["normalPrice"] : (function () { throw new RuntimeError('Variable "normalPrice" does not exist.', 66, $this->source); })())), "html", null, true);
  233. yield "</span>
  234. <span class=\"price reduced-price\">";
  235. // line 67
  236. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\PriceExtension']->priceFilter((isset($context["reducedPrice"]) || array_key_exists("reducedPrice", $context) ? $context["reducedPrice"] : (function () { throw new RuntimeError('Variable "reducedPrice" does not exist.', 67, $this->source); })())), "html", null, true);
  237. yield "</span>
  238. ";
  239. } else {
  240. // line 69
  241. yield " <span class=\"price\">";
  242. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\PriceExtension']->priceFilter((isset($context["normalPrice"]) || array_key_exists("normalPrice", $context) ? $context["normalPrice"] : (function () { throw new RuntimeError('Variable "normalPrice" does not exist.', 69, $this->source); })())), "html", null, true);
  243. yield "</span>
  244. ";
  245. }
  246. // line 71
  247. yield " ";
  248. }
  249. // line 72
  250. yield " </div>
  251. ";
  252. // line 73
  253. if (((array_key_exists("discounts", $context) && (isset($context["discounts"]) || array_key_exists("discounts", $context) ? $context["discounts"] : (function () { throw new RuntimeError('Variable "discounts" does not exist.', 73, $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.', 73, $this->source); })()), "price", [], "any", false, false, false, 73))) {
  254. // line 74
  255. yield " ";
  256. if (CoreExtension::inFilter(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.', 74, $this->source); })()), "id", [], "any", false, false, false, 74), Twig\Extension\CoreExtension::keys((isset($context["discounts"]) || array_key_exists("discounts", $context) ? $context["discounts"] : (function () { throw new RuntimeError('Variable "discounts" does not exist.', 74, $this->source); })())))) {
  257. // line 75
  258. yield " <div class=\"discount\">
  259. ";
  260. // line 76
  261. yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["discounts"]) || array_key_exists("discounts", $context) ? $context["discounts"] : (function () { throw new RuntimeError('Variable "discounts" does not exist.', 76, $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.', 76, $this->source); })()), "id", [], "any", false, false, false, 76), [], "any", false, false, false, 76);
  262. yield "
  263. </div>
  264. ";
  265. } elseif (( // line 78
  266. (isset($context["reducedPrice"]) || array_key_exists("reducedPrice", $context) ? $context["reducedPrice"] : (function () { throw new RuntimeError('Variable "reducedPrice" does not exist.', 78, $this->source); })()) != (isset($context["normalPrice"]) || array_key_exists("normalPrice", $context) ? $context["normalPrice"] : (function () { throw new RuntimeError('Variable "normalPrice" does not exist.', 78, $this->source); })()))) {
  267. // line 79
  268. yield " <div class=\"discount\">
  269. ";
  270. // line 80
  271. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Remise de", [], "messages");
  272. yield " ";
  273. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\PriceExtension']->percentFilter(((((isset($context["reducedPrice"]) || array_key_exists("reducedPrice", $context) ? $context["reducedPrice"] : (function () { throw new RuntimeError('Variable "reducedPrice" does not exist.', 80, $this->source); })()) - (isset($context["normalPrice"]) || array_key_exists("normalPrice", $context) ? $context["normalPrice"] : (function () { throw new RuntimeError('Variable "normalPrice" does not exist.', 80, $this->source); })())) / (isset($context["normalPrice"]) || array_key_exists("normalPrice", $context) ? $context["normalPrice"] : (function () { throw new RuntimeError('Variable "normalPrice" does not exist.', 80, $this->source); })())) * 100)), "html", null, true);
  274. yield "
  275. </div>
  276. ";
  277. }
  278. // line 83
  279. yield " ";
  280. }
  281. // line 84
  282. yield " ";
  283. }
  284. // line 85
  285. yield " ";
  286. }
  287. // line 86
  288. yield " ";
  289. }
  290. // line 87
  291. yield " ";
  292. if ((array_key_exists("productItemFooter", $context) && (isset($context["productItemFooter"]) || array_key_exists("productItemFooter", $context) ? $context["productItemFooter"] : (function () { throw new RuntimeError('Variable "productItemFooter" does not exist.', 87, $this->source); })()))) {
  293. // line 88
  294. yield " ";
  295. yield (isset($context["productItemFooter"]) || array_key_exists("productItemFooter", $context) ? $context["productItemFooter"] : (function () { throw new RuntimeError('Variable "productItemFooter" does not exist.', 88, $this->source); })());
  296. yield "
  297. ";
  298. }
  299. // line 90
  300. yield "</li>";
  301. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  302. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  303. yield from [];
  304. }
  305. /**
  306. * @codeCoverageIgnore
  307. */
  308. public function getTemplateName(): string
  309. {
  310. return "front/catalog/model/view/list-item.html.twig";
  311. }
  312. /**
  313. * @codeCoverageIgnore
  314. */
  315. public function isTraitable(): bool
  316. {
  317. return false;
  318. }
  319. /**
  320. * @codeCoverageIgnore
  321. */
  322. public function getDebugInfo(): array
  323. {
  324. return array ( 309 => 90, 303 => 88, 300 => 87, 297 => 86, 294 => 85, 291 => 84, 288 => 83, 280 => 80, 277 => 79, 275 => 78, 270 => 76, 267 => 75, 264 => 74, 262 => 73, 259 => 72, 256 => 71, 250 => 69, 245 => 67, 240 => 66, 237 => 65, 235 => 64, 231 => 63, 226 => 62, 224 => 61, 221 => 60, 218 => 59, 215 => 58, 212 => 57, 208 => 55, 201 => 53, 196 => 52, 189 => 50, 184 => 48, 180 => 47, 177 => 46, 175 => 45, 172 => 44, 169 => 43, 166 => 42, 163 => 41, 160 => 40, 158 => 39, 147 => 38, 144 => 37, 141 => 36, 138 => 35, 135 => 34, 133 => 33, 130 => 32, 124 => 29, 119 => 28, 116 => 27, 114 => 26, 110 => 24, 102 => 22, 94 => 20, 92 => 19, 85 => 18, 83 => 17, 80 => 16, 67 => 9, 65 => 8, 60 => 7, 56 => 5, 54 => 4, 50 => 2, 48 => 1,);
  325. }
  326. public function getSourceContext(): Source
  327. {
  328. return new Source("{% if productTitleTag is not defined %}
  329. {% set productTitleTag = \x27div\x27 %}
  330. {% endif %}
  331. {% if priceGroup is not defined %}
  332. {% set priceGroup = customerMgr.getPriceContext() %}
  333. {% endif %}
  334. <li class=\"product\" data-pid=\"{{ product.id }}\">
  335. {% if removeBt is defined %}
  336. <a class=\"{{ removeBt }}\" data-product=\"{{ product.id }}\">
  337. <svg xmlns=\"http://www.w3.org/2000/svg\" id=\"Calque_2\" viewBox=\"0 0 11.25 11.05\">
  338. <line style=\"fill:none;stroke:#000;stroke-miterlimit:10;\" x1=\".56\" y1=\".35\" x2=\"10.9\" y2=\"10.69\"/>
  339. <line style=\"fill:none;stroke:#000;stroke-miterlimit:10;\" x1=\"10.69\" y1=\".35\" x2=\".35\" y2=\"10.69\"/>
  340. </svg>
  341. </a>
  342. {% endif %}
  343. <div class=\"picture\">
  344. {% if product.pictures|length > 0 %}
  345. <img src=\"{{ asset(attribute(product.pictures,0).webPath) | imagine_filter(\x27product_medium\x27) }}\" width=\"300\" height=\"300\" alt=\"{{ product.name }}\">
  346. {% elseif product.parent and product.parent.pictures|length > 0 %}
  347. <img src=\"{{ asset(attribute(product.parent.pictures,0).webPath) | imagine_filter(\x27product_medium\x27) }}\" width=\"300\" height=\"300\" alt=\"{{ product.name }}\">
  348. {% else %}
  349. <img src=\"{{ asset(\x27img/img-default.png\x27) | imagine_filter(\x27product_medium\x27) }}\" width=\"300\" height=\"300\" alt=\"{{ product.name }}\">
  350. {% endif %}
  351. </div>
  352. <div class=\"manufacturer\">
  353. {% if product.manufacturer %}
  354. {% set slug = product.manufacturer.getUrl(app.request.locale) %}
  355. <a href=\"{{ path(\x27manufacturer\x27,{id:product.manufacturer.id,url:slug}) }}\">
  356. {{ product.manufacturer.name }}
  357. </a>
  358. {% endif %}
  359. </div>
  360. {% if product.hasParent() %}
  361. {% set productUrl = path(\x27product\x27,{id:product.parent.id,url:product.parent.url}) %}
  362. {% else %}
  363. {% set productUrl = path(\x27product\x27,{id:product.id,url:product.url}) %}
  364. {% endif %}
  365. <{{ productTitleTag }} class=\"title\"><a href=\"{{ productUrl }}\">{{ product.name|excerpt(60,\x27\x27) }}</a></{{ productTitleTag }}>
  366. {% if customerMgr.canSeePrices() and product.hasPrice(customerMgr.priceContext) %}
  367. {% set country = customerMgr.getCustomerCountry() %}
  368. {% if product.isAvailableForCountry(country) %}
  369. {% if customerMgr.isExpert() %}
  370. {% if not product.isGift() %}
  371. <div class=\"price-ctn cf\">
  372. {% if product.hasChildren() and product.getFromPrice(true, priceGroup, true) %}
  373. <div class=\"from-price\">
  374. <span class=\"from\">{% trans %}A partir de :{% endtrans %}</span>
  375. <span class=\"price\">{{ product.getFromPrice(true, priceGroup)|price }}</span>
  376. </div>
  377. <span class=\"price-tax-incl\">{{ product.getFromPrice(true, priceGroup, true)|price }}<sup>{{ \x27ttc\x27 | trans }}</sup></span>
  378. {% else %}
  379. <span class=\"price\">{{ product.getPrice(true, priceGroup)|price }}</span>
  380. <span class=\"price-tax-incl\">{{ product.getPrice(true, priceGroup, true)|price }}<sup>{{ \x27ttc\x27 | trans }}</sup></span>
  381. {% endif %}
  382. </div>
  383. {% endif %}
  384. {% else %}
  385. {% set normalPrice = product.getPrice(false, priceGroup) %}
  386. {% set reducedPrice = priceMgr.getPrice(product, 1, false) %}
  387. <div class=\"price-ctn cf\">
  388. {% if product.hasChildren() and product.getFromPrice(true, priceGroup) %}
  389. <span class=\"from\">{% trans %}A partir de :{% endtrans %}</span>
  390. <span class=\"price\">{{ product.getFromPrice(true, priceGroup)|price }}</span>
  391. {% elseif product.getPrice(false, priceGroup) %}
  392. {% if reducedPrice < normalPrice %}
  393. <span class=\"price old-price\">{{ normalPrice|price }}</span>
  394. <span class=\"price reduced-price\">{{ reducedPrice|price }}</span>
  395. {% else %}
  396. <span class=\"price\">{{ normalPrice|price }}</span>
  397. {% endif %}
  398. {% endif %}
  399. </div>
  400. {% if discounts is defined and discounts and product.price %}
  401. {% if product.id in discounts|keys %}
  402. <div class=\"discount\">
  403. {{ attribute(discounts,product.id) | raw }}
  404. </div>
  405. {% elseif reducedPrice!=normalPrice %}
  406. <div class=\"discount\">
  407. {% trans %}Remise de{% endtrans %} {{ (((reducedPrice-normalPrice) / normalPrice) * 100) | percent }}
  408. </div>
  409. {% endif %}
  410. {% endif %}
  411. {% endif %}
  412. {% endif %}
  413. {% endif %}
  414. {% if productItemFooter is defined and productItemFooter %}
  415. {{ productItemFooter|raw }}
  416. {% endif %}
  417. </li>", "front/catalog/model/view/list-item.html.twig", "/var/www/dogcat.com/pim/templates/front/catalog/model/view/list-item.html.twig");
  418. }
  419. }