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

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