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