var/cache/dev/twig/f7/f73cf537c8850deb5ea44d0f0ddc42a4.php line 94

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