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

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. ";
  78. // line 15
  79. if ((($tmp = (isset($context["hasWelcomeDiscount"]) || array_key_exists("hasWelcomeDiscount", $context) ? $context["hasWelcomeDiscount"] : (function () { throw new RuntimeError('Variable "hasWelcomeDiscount" does not exist.', 15, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  80. // line 16
  81. yield " <div>
  82. ";
  83. // line 17
  84. yield from $this->load("front/catalog/product/view/discount-welcome.html.twig", 17)->unwrap()->yield($context);
  85. // line 18
  86. yield " </div>
  87. ";
  88. }
  89. // line 20
  90. yield " ";
  91. 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.', 20, $this->source); })()), "description", [], "any", false, false, false, 20)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  92. // line 21
  93. yield " <a href=\"#description\" class=\"bt-scroll\">";
  94. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Voir le descriptif", [], "messages");
  95. yield "</a>
  96. ";
  97. }
  98. // line 23
  99. yield " </div>
  100. ";
  101. // line 24
  102. 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.', 24, $this->source); })()), "canSeePrices", [], "method", false, false, false, 24)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  103. // line 25
  104. yield " <div class=\"not-logged\">
  105. ";
  106. // line 26
  107. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Pour voir les prix des articles,", [], "messages");
  108. yield "<a href=\"";
  109. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("customer_login");
  110. yield "\">";
  111. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("il faut être connecté", [], "messages");
  112. yield "</a> ";
  113. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("(c’est gratuit)", [], "messages");
  114. yield ".
  115. </div>
  116. ";
  117. }
  118. // line 29
  119. yield " ";
  120. yield from $this->load("front/catalog/product/view/references.html.twig", 29)->unwrap()->yield($context);
  121. // line 30
  122. yield " ";
  123. 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.', 30, $this->source); })()), "isExpert", [], "method", false, false, false, 30)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  124. // line 31
  125. yield " <div class=\"offers\">
  126. <div class=\"free-shipping\">
  127. <img src=\"";
  128. // line 33
  129. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("img/pictos/shipping.svg"), "html", null, true);
  130. yield "\" alt=\"";
  131. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Livraison gratuite dès 100 € HT", [], "messages");
  132. yield "\">
  133. <div>";
  134. // line 34
  135. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("<strong>LIVRAISON GRATUITE</strong><br>dès 100 € HT", [], "messages");
  136. yield "</div>
  137. </div>
  138. <div class=\"free-gift\">
  139. <img src=\"";
  140. // line 37
  141. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("img/pictos/gift.svg"), "html", null, true);
  142. yield "\" alt=\"";
  143. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("1 cadeau offert pour chaque commande internet", [], "messages");
  144. yield "\">
  145. <div>";
  146. // line 38
  147. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("<strong>1 CADEAU OFFERT</strong> pour <br>chaque commande internet", [], "messages");
  148. yield "</div>
  149. </div>
  150. </div>
  151. ";
  152. // line 41
  153. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 41, $this->source); })()), "hasSoleil", [], "method", false, false, false, 41)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  154. // line 42
  155. yield " <p>";
  156. 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");
  157. yield "</p>
  158. ";
  159. }
  160. // line 44
  161. yield " ";
  162. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 44, $this->source); })()), "hasNonSoleil", [], "method", false, false, false, 44)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  163. // line 45
  164. yield " <p>";
  165. 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");
  166. yield "</p>
  167. ";
  168. }
  169. // line 47
  170. yield " ";
  171. }
  172. // line 48
  173. yield " </div>
  174. </div>
  175. ";
  176. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  177. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  178. yield from [];
  179. }
  180. /**
  181. * @codeCoverageIgnore
  182. */
  183. public function getTemplateName(): string
  184. {
  185. return "front/catalog/product/view/infos.html.twig";
  186. }
  187. /**
  188. * @codeCoverageIgnore
  189. */
  190. public function isTraitable(): bool
  191. {
  192. return false;
  193. }
  194. /**
  195. * @codeCoverageIgnore
  196. */
  197. public function getDebugInfo(): array
  198. {
  199. return array ( 182 => 48, 179 => 47, 173 => 45, 170 => 44, 164 => 42, 162 => 41, 156 => 38, 150 => 37, 144 => 34, 138 => 33, 134 => 31, 131 => 30, 128 => 29, 116 => 26, 113 => 25, 111 => 24, 108 => 23, 102 => 21, 99 => 20, 95 => 18, 93 => 17, 90 => 16, 88 => 15, 84 => 14, 78 => 12, 70 => 10, 67 => 9, 61 => 6, 58 => 5, 56 => 4, 53 => 3, 51 => 2, 48 => 1,);
  200. }
  201. public function getSourceContext(): Source
  202. {
  203. return new Source("<div class=\"product-infos\">
  204. {% include \x27front/catalog/product/view/assets.html.twig\x27 %}
  205. <div class=\"infos\">
  206. {% if is_granted(\x27ROLE_ADMIN\x27) %}
  207. <div class=\"admin-tools\">
  208. <a href=\"{{ path(\x27admin_product_edit\x27,{id:product.id}) }}\" class=\"admin-update\" target=\"_blank\">modifier le produit</a>
  209. </div>
  210. {% endif %}
  211. {% if product.manufacturer %}
  212. <div class=\"manufacturer\"><a href=\"{{ path(\x27manufacturer\x27,{id:product.manufacturer.id, url:product.manufacturer.url}) }}\">{{ product.manufacturer.name }}</a></div>
  213. {% endif %}
  214. <h1>{{ product.headingTitle }}</h1>
  215. <div class=\"description\">
  216. <p>{{ productDescription.teaser|raw }}</p>
  217. {% if hasWelcomeDiscount %}
  218. <div>
  219. {% include \x27front/catalog/product/view/discount-welcome.html.twig\x27 %}
  220. </div>
  221. {% endif %}
  222. {% if productDescription.description %}
  223. <a href=\"#description\" class=\"bt-scroll\">{% trans %}Voir le descriptif{% endtrans %}</a>
  224. {% endif %}
  225. </div>
  226. {% if not customerMgr.canSeePrices() %}
  227. <div class=\"not-logged\">
  228. {% 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 %}.
  229. </div>
  230. {% endif %}
  231. {% include \x27front/catalog/product/view/references.html.twig\x27 %}
  232. {% if not customerMgr.isExpert() %}
  233. <div class=\"offers\">
  234. <div class=\"free-shipping\">
  235. <img src=\"{{ asset(\x27img/pictos/shipping.svg\x27) }}\" alt=\"{% trans %}Livraison gratuite dès 100 € HT{% endtrans %}\">
  236. <div>{% trans %}<strong>LIVRAISON GRATUITE</strong><br>dès 100 € HT{% endtrans %}</div>
  237. </div>
  238. <div class=\"free-gift\">
  239. <img src=\"{{ asset(\x27img/pictos/gift.svg\x27) }}\" alt=\"{% trans %}1 cadeau offert pour chaque commande internet{% endtrans %}\">
  240. <div>{% trans %}<strong>1 CADEAU OFFERT</strong> pour <br>chaque commande internet{% endtrans %}</div>
  241. </div>
  242. </div>
  243. {% if product.hasSoleil() %}
  244. <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>
  245. {% endif %}
  246. {% if product.hasNonSoleil() %}
  247. <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>
  248. {% endif %}
  249. {% endif %}
  250. </div>
  251. </div>
  252. ", "front/catalog/product/view/infos.html.twig", "/var/www/dogcat.com/pim/templates/front/catalog/product/view/infos.html.twig");
  253. }
  254. }