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

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