var/cache/dev/twig/24/2454451e88de3526b8244b16ab66ca32.php line 38

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