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

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["model"]) || array_key_exists("model", $context) ? $context["model"] : (function () { throw new RuntimeError('Variable "model" 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 ((($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.', 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)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  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. }
  226. // line 65
  227. yield " </div>
  228. ";
  229. // line 66
  230. 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.', 66, $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.', 66, $this->source); })()), "price", [], "any", false, false, false, 66))) {
  231. // line 67
  232. yield " ";
  233. 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.', 67, $this->source); })()), "id", [], "any", false, false, false, 67), Twig\Extension\CoreExtension::keys((isset($context["discounts"]) || array_key_exists("discounts", $context) ? $context["discounts"] : (function () { throw new RuntimeError('Variable "discounts" does not exist.', 67, $this->source); })())))) {
  234. // line 68
  235. yield " <div class=\"discount\">
  236. ";
  237. // line 69
  238. 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.', 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); })()), "id", [], "any", false, false, false, 69), [], "any", false, false, false, 69);
  239. yield "
  240. </div>
  241. ";
  242. } elseif (( // line 71
  243. (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); })()))) {
  244. // line 72
  245. yield " <div class=\"discount\">
  246. ";
  247. // line 73
  248. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Remise de", [], "messages");
  249. yield " ";
  250. 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.', 73, $this->source); })()) - (isset($context["normalPrice"]) || array_key_exists("normalPrice", $context) ? $context["normalPrice"] : (function () { throw new RuntimeError('Variable "normalPrice" does not exist.', 73, $this->source); })())) / (isset($context["normalPrice"]) || array_key_exists("normalPrice", $context) ? $context["normalPrice"] : (function () { throw new RuntimeError('Variable "normalPrice" does not exist.', 73, $this->source); })())) * 100)), "html", null, true);
  251. yield "
  252. </div>
  253. ";
  254. }
  255. // line 76
  256. yield " ";
  257. }
  258. // line 77
  259. yield " ";
  260. }
  261. // line 78
  262. yield " ";
  263. }
  264. // line 79
  265. yield " ";
  266. }
  267. // line 80
  268. yield " ";
  269. 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.', 80, $this->source); })()))) {
  270. // line 81
  271. yield " ";
  272. yield (isset($context["productItemFooter"]) || array_key_exists("productItemFooter", $context) ? $context["productItemFooter"] : (function () { throw new RuntimeError('Variable "productItemFooter" does not exist.', 81, $this->source); })());
  273. yield "
  274. ";
  275. }
  276. // line 83
  277. yield " (model)
  278. </li>";
  279. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  280. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  281. yield from [];
  282. }
  283. /**
  284. * @codeCoverageIgnore
  285. */
  286. public function getTemplateName(): string
  287. {
  288. return "front/catalog/model/view/list-item.html.twig";
  289. }
  290. /**
  291. * @codeCoverageIgnore
  292. */
  293. public function isTraitable(): bool
  294. {
  295. return false;
  296. }
  297. /**
  298. * @codeCoverageIgnore
  299. */
  300. public function getDebugInfo(): array
  301. {
  302. return array ( 286 => 83, 280 => 81, 277 => 80, 274 => 79, 271 => 78, 268 => 77, 265 => 76, 257 => 73, 254 => 72, 252 => 71, 247 => 69, 244 => 68, 241 => 67, 239 => 66, 236 => 65, 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,);
  303. }
  304. public function getSourceContext(): Source
  305. {
  306. return new Source("{% if productTitleTag is not defined %}
  307. {% set productTitleTag = \x27div\x27 %}
  308. {% endif %}
  309. {% if priceGroup is not defined %}
  310. {% set priceGroup = customerMgr.getPriceContext() %}
  311. {% endif %}
  312. <li class=\"product\" data-pid=\"{{ product.id }}\">
  313. {% if removeBt is defined %}
  314. <a class=\"{{ removeBt }}\" data-product=\"{{ product.id }}\">
  315. <svg xmlns=\"http://www.w3.org/2000/svg\" id=\"Calque_2\" viewBox=\"0 0 11.25 11.05\">
  316. <line style=\"fill:none;stroke:#000;stroke-miterlimit:10;\" x1=\".56\" y1=\".35\" x2=\"10.9\" y2=\"10.69\"/>
  317. <line style=\"fill:none;stroke:#000;stroke-miterlimit:10;\" x1=\"10.69\" y1=\".35\" x2=\".35\" y2=\"10.69\"/>
  318. </svg>
  319. </a>
  320. {% endif %}
  321. <div class=\"picture\">
  322. {% if product.pictures|length > 0 %}
  323. <img src=\"{{ asset(attribute(product.pictures,0).webPath) | imagine_filter(\x27product_medium\x27) }}\" width=\"300\" height=\"300\" alt=\"{{ product.name }}\">
  324. {% elseif product.parent and product.parent.pictures|length > 0 %}
  325. <img src=\"{{ asset(attribute(product.parent.pictures,0).webPath) | imagine_filter(\x27product_medium\x27) }}\" width=\"300\" height=\"300\" alt=\"{{ product.name }}\">
  326. {% else %}
  327. <img src=\"{{ asset(\x27img/img-default.png\x27) | imagine_filter(\x27product_medium\x27) }}\" width=\"300\" height=\"300\" alt=\"{{ product.name }}\">
  328. {% endif %}
  329. </div>
  330. <div class=\"manufacturer\">
  331. {% if product.manufacturer %}
  332. {% set slug = product.manufacturer.getUrl(app.request.locale) %}
  333. <a href=\"{{ path(\x27manufacturer\x27,{id:product.manufacturer.id,url:slug}) }}\">
  334. {{ product.manufacturer.name }}
  335. </a>
  336. {% endif %}
  337. </div>
  338. {% if product.hasParent() %}
  339. {% set productUrl = path(\x27product\x27,{id:product.parent.id,url:product.parent.url}) %}
  340. {% else %}
  341. {% set productUrl = path(\x27product\x27,{id:product.id,url:product.url}) %}
  342. {% endif %}
  343. <{{ productTitleTag }} class=\"title\"><a href=\"{{ productUrl }}\">{{ model.name|excerpt(60,\x27\x27) }}</a></{{ productTitleTag }}>
  344. {% if customerMgr.canSeePrices() and product.hasPrice(customerMgr.priceContext) %}
  345. {% set country = customerMgr.getCustomerCountry() %}
  346. {% if product.isAvailableForCountry(country) %}
  347. {% if customerMgr.isExpert() %}
  348. {% if not product.isGift() %}
  349. <div class=\"price-ctn cf\">
  350. {% if product.hasChildren() and product.getFromPrice(true, priceGroup, true) %}
  351. <div class=\"from-price\">
  352. <span class=\"from\">{% trans %}A partir de :{% endtrans %}</span>
  353. <span class=\"price\">{{ product.getFromPrice(true, priceGroup)|price }}</span>
  354. </div>
  355. <span class=\"price-tax-incl\">{{ product.getFromPrice(true, priceGroup, true)|price }}<sup>{{ \x27ttc\x27 | trans }}</sup></span>
  356. {% else %}
  357. <span class=\"price\">{{ product.getPrice(true, priceGroup)|price }}</span>
  358. <span class=\"price-tax-incl\">{{ product.getPrice(true, priceGroup, true)|price }}<sup>{{ \x27ttc\x27 | trans }}</sup></span>
  359. {% endif %}
  360. </div>
  361. {% endif %}
  362. {% else %}
  363. {% set normalPrice = product.getPrice(false, priceGroup) %}
  364. {% set reducedPrice = priceMgr.getPrice(product, 1, false) %}
  365. <div class=\"price-ctn cf\">
  366. {% if product.getFromPrice(true, priceGroup) %}
  367. <span class=\"from\">{% trans %}A partir de :{% endtrans %}</span>
  368. <span class=\"price\">{{ product.getFromPrice(true, priceGroup)|price }}</span>
  369. {% endif %}
  370. </div>
  371. {% if discounts is defined and discounts and product.price %}
  372. {% if product.id in discounts|keys %}
  373. <div class=\"discount\">
  374. {{ attribute(discounts,product.id) | raw }}
  375. </div>
  376. {% elseif reducedPrice!=normalPrice %}
  377. <div class=\"discount\">
  378. {% trans %}Remise de{% endtrans %} {{ (((reducedPrice-normalPrice) / normalPrice) * 100) | percent }}
  379. </div>
  380. {% endif %}
  381. {% endif %}
  382. {% endif %}
  383. {% endif %}
  384. {% endif %}
  385. {% if productItemFooter is defined and productItemFooter %}
  386. {{ productItemFooter|raw }}
  387. {% endif %}
  388. (model)
  389. </li>", "front/catalog/model/view/list-item.html.twig", "/var/www/dogcat.com/pim/templates/front/catalog/model/view/list-item.html.twig");
  390. }
  391. }