var/cache/dev/twig/40/40ab6a80d92e56b1a28cd31b25b6affc.php line 143

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* front/catalog/product/view/infos.html.twig */
  16. class __TwigTemplate_6a7a8945a2c24f0ff7444bae89800fe4 extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->parent = false;
  28. $this->blocks = [
  29. ];
  30. }
  31. protected function doDisplay(array $context, array $blocks = []): iterable
  32. {
  33. $macros = $this->macros;
  34. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/product/view/infos.html.twig"));
  36. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/product/view/infos.html.twig"));
  38. // line 1
  39. yield "<div class=\"product-infos\">
  40. ";
  41. // line 2
  42. yield from $this->load("front/catalog/product/view/assets.html.twig", 2)->unwrap()->yield($context);
  43. // line 3
  44. yield " <div class=\"infos\">
  45. ";
  46. // line 4
  47. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  48. // line 5
  49. yield " <div class=\"admin-tools\">
  50. <a href=\"";
  51. // line 6
  52. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_product_edit", ["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.', 6, $this->source); })()), "id", [], "any", false, false, false, 6)]), "html", null, true);
  53. yield "\" class=\"admin-update\" target=\"_blank\">modifier le produit</a>
  54. </div>
  55. ";
  56. }
  57. // line 9
  58. yield " ";
  59. 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.', 9, $this->source); })()), "manufacturer", [], "any", false, false, false, 9)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  60. // line 10
  61. yield " <div class=\"manufacturer\"><a href=\"";
  62. 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.', 10, $this->source); })()), "manufacturer", [], "any", false, false, false, 10), "id", [], "any", false, false, false, 10), "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.', 10, $this->source); })()), "manufacturer", [], "any", false, false, false, 10), "url", [], "any", false, false, false, 10)]), "html", null, true);
  63. yield "\">";
  64. 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.', 10, $this->source); })()), "manufacturer", [], "any", false, false, false, 10), "name", [], "any", false, false, false, 10), "html", null, true);
  65. yield "</a></div>
  66. ";
  67. }
  68. // line 12
  69. yield " <h1>";
  70. 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.', 12, $this->source); })()), "headingTitle", [], "any", false, false, false, 12), "html", null, true);
  71. yield "</h1>
  72. <div class=\"description\">
  73. <p>";
  74. // line 14
  75. yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["productDescription"]) || array_key_exists("productDescription", $context) ? $context["productDescription"] : (function () { throw new RuntimeError('Variable "productDescription" does not exist.', 14, $this->source); })()), "teaser", [], "any", false, false, false, 14);
  76. yield "</p>
  77. </div>
  78. <div class=\"description\">
  79. ";
  80. // line 17
  81. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["productDescription"]) || array_key_exists("productDescription", $context) ? $context["productDescription"] : (function () { throw new RuntimeError('Variable "productDescription" does not exist.', 17, $this->source); })()), "shortDescription", [], "any", false, false, false, 17)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  82. // line 18
  83. yield " ";
  84. yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["productDescription"]) || array_key_exists("productDescription", $context) ? $context["productDescription"] : (function () { throw new RuntimeError('Variable "productDescription" does not exist.', 18, $this->source); })()), "shortDescription", [], "any", false, false, false, 18);
  85. yield "
  86. ";
  87. }
  88. // line 20
  89. yield " </div>
  90. ";
  91. // line 21
  92. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["productDescription"]) || array_key_exists("productDescription", $context) ? $context["productDescription"] : (function () { throw new RuntimeError('Variable "productDescription" does not exist.', 21, $this->source); })()), "description", [], "any", false, false, false, 21)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  93. // line 22
  94. yield " <div class=\"description\">
  95. <a href=\"#description\" class=\"bt-scroll\">";
  96. // line 23
  97. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Voir le descriptif", [], "messages");
  98. yield "</a>
  99. </div>
  100. ";
  101. }
  102. // line 26
  103. yield " ";
  104. if ((($tmp = (isset($context["hasWelcomeDiscount"]) || array_key_exists("hasWelcomeDiscount", $context) ? $context["hasWelcomeDiscount"] : (function () { throw new RuntimeError('Variable "hasWelcomeDiscount" does not exist.', 26, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  105. // line 27
  106. yield " <div class=\"description\">
  107. ";
  108. // line 28
  109. yield from $this->load("front/catalog/product/view/discount-welcome.html.twig", 28)->unwrap()->yield($context);
  110. // line 29
  111. yield " </div>
  112. ";
  113. }
  114. // line 31
  115. yield " ";
  116. 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.', 31, $this->source); })()), "canSeePrices", [], "method", false, false, false, 31)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  117. // line 32
  118. yield " <div class=\"not-logged\">
  119. ";
  120. // line 33
  121. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Pour voir les prix des articles,", [], "messages");
  122. yield "<a href=\"";
  123. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("customer_login");
  124. yield "\">";
  125. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("il faut être connecté", [], "messages");
  126. yield "</a> ";
  127. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("(c’est gratuit)", [], "messages");
  128. yield ".
  129. </div>
  130. ";
  131. }
  132. // line 36
  133. yield " ";
  134. yield from $this->load("front/catalog/product/view/references.html.twig", 36)->unwrap()->yield($context);
  135. // line 37
  136. yield " ";
  137. if ((($tmp = !CoreExtension::getAttribute($this->env, $this->source, (isset($context["customerMgr"]) || array_key_exists("customerMgr", $context) ? $context["customerMgr"] : (function () { throw new RuntimeError('Variable "customerMgr" does not exist.', 37, $this->source); })()), "isExpert", [], "method", false, false, false, 37)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  138. // line 38
  139. yield " <div class=\"offers\">
  140. <div class=\"free-shipping\">
  141. <img src=\"";
  142. // line 40
  143. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("img/pictos/shipping.svg"), "html", null, true);
  144. yield "\" alt=\"";
  145. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Livraison gratuite dès 100 € HT", [], "messages");
  146. yield "\">
  147. <div>";
  148. // line 41
  149. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("<strong>LIVRAISON GRATUITE</strong><br>dès 100 € HT", [], "messages");
  150. yield "</div>
  151. </div>
  152. <div class=\"free-gift\">
  153. <img src=\"";
  154. // line 44
  155. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("img/pictos/gift.svg"), "html", null, true);
  156. yield "\" alt=\"";
  157. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("1 cadeau offert pour chaque commande internet", [], "messages");
  158. yield "\">
  159. <div>";
  160. // line 45
  161. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("<strong>1 CADEAU OFFERT</strong> pour <br>chaque commande internet", [], "messages");
  162. yield "</div>
  163. </div>
  164. </div>
  165. ";
  166. // line 48
  167. 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.', 48, $this->source); })()), "hasSoleil", [], "method", false, false, false, 48)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  168. // line 49
  169. yield " <p>";
  170. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("-25% de remise sur les produits <span class=\"picto soleil\"></span> dès 100€ HT de commande de produits <span class=\"picto soleil\"></span>", [], "messages");
  171. yield "</p>
  172. ";
  173. }
  174. // line 51
  175. yield " ";
  176. 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.', 51, $this->source); })()), "hasNonSoleil", [], "method", false, false, false, 51)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  177. // line 52
  178. yield " <p>";
  179. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("-10% de remise sur les produits <span class=\"picto non-soleil\"></span> dès 100€ HT de commande de produits <span class=\"picto non-soleil\"></span>", [], "messages");
  180. yield "</p>
  181. ";
  182. }
  183. // line 54
  184. yield " ";
  185. }
  186. // line 55
  187. yield " </div>
  188. </div>
  189. ";
  190. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  191. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  192. yield from [];
  193. }
  194. /**
  195. * @codeCoverageIgnore
  196. */
  197. public function getTemplateName(): string
  198. {
  199. return "front/catalog/product/view/infos.html.twig";
  200. }
  201. /**
  202. * @codeCoverageIgnore
  203. */
  204. public function isTraitable(): bool
  205. {
  206. return false;
  207. }
  208. /**
  209. * @codeCoverageIgnore
  210. */
  211. public function getDebugInfo(): array
  212. {
  213. return array ( 196 => 55, 193 => 54, 187 => 52, 184 => 51, 178 => 49, 176 => 48, 170 => 45, 164 => 44, 158 => 41, 152 => 40, 148 => 38, 145 => 37, 142 => 36, 130 => 33, 127 => 32, 124 => 31, 120 => 29, 118 => 28, 115 => 27, 112 => 26, 106 => 23, 103 => 22, 101 => 21, 98 => 20, 92 => 18, 90 => 17, 84 => 14, 78 => 12, 70 => 10, 67 => 9, 61 => 6, 58 => 5, 56 => 4, 53 => 3, 51 => 2, 48 => 1,);
  214. }
  215. public function getSourceContext(): Source
  216. {
  217. return new Source("<div class=\"product-infos\">
  218. {% include \x27front/catalog/product/view/assets.html.twig\x27 %}
  219. <div class=\"infos\">
  220. {% if is_granted(\x27ROLE_ADMIN\x27) %}
  221. <div class=\"admin-tools\">
  222. <a href=\"{{ path(\x27admin_product_edit\x27,{id:product.id}) }}\" class=\"admin-update\" target=\"_blank\">modifier le produit</a>
  223. </div>
  224. {% endif %}
  225. {% if product.manufacturer %}
  226. <div class=\"manufacturer\"><a href=\"{{ path(\x27manufacturer\x27,{id:product.manufacturer.id, url:product.manufacturer.url}) }}\">{{ product.manufacturer.name }}</a></div>
  227. {% endif %}
  228. <h1>{{ product.headingTitle }}</h1>
  229. <div class=\"description\">
  230. <p>{{ productDescription.teaser|raw }}</p>
  231. </div>
  232. <div class=\"description\">
  233. {% if productDescription.shortDescription %}
  234. {{ productDescription.shortDescription | raw }}
  235. {% endif %}
  236. </div>
  237. {% if productDescription.description %}
  238. <div class=\"description\">
  239. <a href=\"#description\" class=\"bt-scroll\">{% trans %}Voir le descriptif{% endtrans %}</a>
  240. </div>
  241. {% endif %}
  242. {% if hasWelcomeDiscount %}
  243. <div class=\"description\">
  244. {% include \x27front/catalog/product/view/discount-welcome.html.twig\x27 %}
  245. </div>
  246. {% endif %}
  247. {% if not customerMgr.canSeePrices() %}
  248. <div class=\"not-logged\">
  249. {% trans %}Pour voir les prix des articles, {% endtrans %}<a href=\"{{ path(\x27customer_login\x27) }}\">{% trans %}il faut être connecté{% endtrans %}</a> {% trans %}(c’est gratuit){% endtrans %}.
  250. </div>
  251. {% endif %}
  252. {% include \x27front/catalog/product/view/references.html.twig\x27 %}
  253. {% if not customerMgr.isExpert() %}
  254. <div class=\"offers\">
  255. <div class=\"free-shipping\">
  256. <img src=\"{{ asset(\x27img/pictos/shipping.svg\x27) }}\" alt=\"{% trans %}Livraison gratuite dès 100 € HT{% endtrans %}\">
  257. <div>{% trans %}<strong>LIVRAISON GRATUITE</strong><br>dès 100 € HT{% endtrans %}</div>
  258. </div>
  259. <div class=\"free-gift\">
  260. <img src=\"{{ asset(\x27img/pictos/gift.svg\x27) }}\" alt=\"{% trans %}1 cadeau offert pour chaque commande internet{% endtrans %}\">
  261. <div>{% trans %}<strong>1 CADEAU OFFERT</strong> pour <br>chaque commande internet{% endtrans %}</div>
  262. </div>
  263. </div>
  264. {% if product.hasSoleil() %}
  265. <p>{% trans %}-25% de remise sur les produits <span class=\"picto soleil\"></span> dès 100€ HT de commande de produits <span class=\"picto soleil\"></span>{% endtrans %}</p>
  266. {% endif %}
  267. {% if product.hasNonSoleil() %}
  268. <p>{% trans %}-10% de remise sur les produits <span class=\"picto non-soleil\"></span> dès 100€ HT de commande de produits <span class=\"picto non-soleil\"></span>{% endtrans %}</p>
  269. {% endif %}
  270. {% endif %}
  271. </div>
  272. </div>
  273. ", "front/catalog/product/view/infos.html.twig", "/var/www/dogcat.com/pim/templates/front/catalog/product/view/infos.html.twig");
  274. }
  275. }