var/cache/dev/twig/1b/1bffa9018fd85bdb4e323cd7823569a9.php line 38

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/caracteristics.html.twig */
  16. class __TwigTemplate_7b1206de07c49a7aa6c64144eff1e89b 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/caracteristics.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/caracteristics.html.twig"));
  38. // line 1
  39. 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.', 1, $this->source); })()), "caracteristics", [], "any", false, false, false, 1)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  40. // line 2
  41. yield "<div class=\"tab-content rte section caracteristics\" style=\"padding: 30px 0;\">
  42. <div class=\"title-ctn\">
  43. <div class=\"title\">";
  44. // line 4
  45. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Caractéristiques", [], "messages");
  46. yield "</div>
  47. <hr>
  48. </div>
  49. <table>
  50. <tbody>
  51. ";
  52. // line 9
  53. $context['_parent'] = $context;
  54. $context['_seq'] = CoreExtension::ensureTraversable(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); })()), "caracteristics", [], "any", false, false, false, 9));
  55. foreach ($context['_seq'] as $context["_key"] => $context["attribute"]) {
  56. // line 10
  57. yield " ";
  58. if ((CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "value", [], "any", false, false, false, 10) && (CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "value", [], "any", false, false, false, 10) != 0))) {
  59. // line 11
  60. yield " ";
  61. if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 11), "code", [], "any", false, false, false, 11) == "origin_country")) {
  62. // line 12
  63. yield " ";
  64. if ((CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "value", [], "any", false, false, false, 12) == "France")) {
  65. // line 13
  66. yield " <tr data-attr=\"";
  67. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 13), "code", [], "any", false, false, false, 13), "html", null, true);
  68. yield "\" data-aid=\"";
  69. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 13), "id", [], "any", false, false, false, 13), "html", null, true);
  70. yield "\" data-paid=\"";
  71. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 13), "html", null, true);
  72. yield "\">
  73. <td>";
  74. // line 14
  75. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 14), "title", [], "any", false, false, false, 14), "html", null, true);
  76. yield "</td>
  77. <td>";
  78. // line 15
  79. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "value", [], "any", false, false, false, 15), "html", null, true);
  80. yield "</td>
  81. </tr>
  82. ";
  83. } elseif (CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source, // line 17
  84. $context["attribute"], "value", [], "any", false, false, false, 17), ["Allemagne", "Belgique", "Espagne", "Italie", "Pologne", "Roumanie", "Grande Bretagne", "Union Européenne"])) {
  85. // line 18
  86. yield " <tr data-attr=\"";
  87. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 18), "code", [], "any", false, false, false, 18), "html", null, true);
  88. yield "\" data-aid=\"";
  89. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 18), "id", [], "any", false, false, false, 18), "html", null, true);
  90. yield "\" data-paid=\"";
  91. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 18), "html", null, true);
  92. yield "\">
  93. <td>";
  94. // line 19
  95. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 19), "title", [], "any", false, false, false, 19), "html", null, true);
  96. yield "</td>
  97. <td>Europe</td>
  98. </tr>
  99. ";
  100. }
  101. // line 23
  102. yield " ";
  103. } elseif ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 23), "code", [], "any", false, false, false, 23) == "main_color")) {
  104. // line 24
  105. yield " <tr data-attr=\"";
  106. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 24), "code", [], "any", false, false, false, 24), "html", null, true);
  107. yield "\" data-aid=\"";
  108. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 24), "id", [], "any", false, false, false, 24), "html", null, true);
  109. yield "\" data-paid=\"";
  110. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 24), "html", null, true);
  111. yield "\">
  112. <td>";
  113. // line 25
  114. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 25), "title", [], "any", false, false, false, 25), "html", null, true);
  115. yield "</td>
  116. <td>";
  117. // line 26
  118. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "entity", [], "any", false, false, false, 26), "title", [], "any", false, false, false, 26), "html", null, true);
  119. yield "</td>
  120. </tr>
  121. ";
  122. } elseif (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 28
  123. $context["attribute"], "attribute", [], "any", false, false, false, 28), "code", [], "any", false, false, false, 28) == "product_brand") && 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.', 28, $this->source); })()), "manufacturer", [], "any", false, false, false, 28))) {
  124. // line 29
  125. yield " <tr data-attr=\"";
  126. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 29), "code", [], "any", false, false, false, 29), "html", null, true);
  127. yield "\" data-aid=\"";
  128. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 29), "id", [], "any", false, false, false, 29), "html", null, true);
  129. yield "\" data-paid=\"";
  130. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 29), "html", null, true);
  131. yield "\">
  132. <td>";
  133. // line 30
  134. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 30), "title", [], "any", false, false, false, 30), "html", null, true);
  135. yield "</td>
  136. <td><a href=\"";
  137. // line 31
  138. 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.', 31, $this->source); })()), "manufacturer", [], "any", false, false, false, 31), "id", [], "any", false, false, false, 31), "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.', 31, $this->source); })()), "manufacturer", [], "any", false, false, false, 31), "url", [], "any", false, false, false, 31)]), "html", null, true);
  139. yield "\">";
  140. 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.', 31, $this->source); })()), "manufacturer", [], "any", false, false, false, 31), "name", [], "any", false, false, false, 31), "html", null, true);
  141. yield "</a></td>
  142. </tr>
  143. ";
  144. } else {
  145. // line 34
  146. yield " <tr data-attr=\"";
  147. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 34), "code", [], "any", false, false, false, 34), "html", null, true);
  148. yield "\" data-aid=\"";
  149. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 34), "id", [], "any", false, false, false, 34), "html", null, true);
  150. yield "\" data-paid=\"";
  151. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "id", [], "any", false, false, false, 34), "html", null, true);
  152. yield "\">
  153. <td>";
  154. // line 35
  155. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "attribute", [], "any", false, false, false, 35), "title", [], "any", false, false, false, 35), "html", null, true);
  156. yield "</td>
  157. <td>
  158. ";
  159. // line 37
  160. if ((($tmp = $context["attribute"]) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  161. // line 38
  162. yield " ";
  163. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["attribute"], "displayedValue", [], "any", false, false, false, 38), "html", null, true);
  164. yield "
  165. ";
  166. } elseif ((CoreExtension::getAttribute($this->env, $this->source, // line 39
  167. $context["attribute"], "value", [], "any", false, false, false, 39) == 1)) {
  168. // line 40
  169. yield " ";
  170. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Oui"), "html", null, true);
  171. yield "
  172. ";
  173. } elseif ((CoreExtension::getAttribute($this->env, $this->source, // line 41
  174. $context["attribute"], "value", [], "any", false, false, false, 41) == 0)) {
  175. // line 42
  176. yield " ";
  177. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Non"), "html", null, true);
  178. yield "
  179. ";
  180. }
  181. // line 44
  182. yield " </td>
  183. </tr>
  184. ";
  185. }
  186. // line 47
  187. yield " ";
  188. }
  189. // line 48
  190. yield " ";
  191. }
  192. $_parent = $context['_parent'];
  193. unset($context['_seq'], $context['_key'], $context['attribute'], $context['_parent']);
  194. $context = array_intersect_key($context, $_parent) + $_parent;
  195. // line 49
  196. yield " </tbody>
  197. </table>
  198. </div>
  199. ";
  200. }
  201. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  202. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  203. yield from [];
  204. }
  205. /**
  206. * @codeCoverageIgnore
  207. */
  208. public function getTemplateName(): string
  209. {
  210. return "front/catalog/product/view/caracteristics.html.twig";
  211. }
  212. /**
  213. * @codeCoverageIgnore
  214. */
  215. public function isTraitable(): bool
  216. {
  217. return false;
  218. }
  219. /**
  220. * @codeCoverageIgnore
  221. */
  222. public function getDebugInfo(): array
  223. {
  224. return array ( 205 => 49, 199 => 48, 196 => 47, 191 => 44, 185 => 42, 183 => 41, 178 => 40, 176 => 39, 171 => 38, 169 => 37, 164 => 35, 155 => 34, 147 => 31, 143 => 30, 134 => 29, 132 => 28, 127 => 26, 123 => 25, 114 => 24, 111 => 23, 104 => 19, 95 => 18, 93 => 17, 88 => 15, 84 => 14, 75 => 13, 72 => 12, 69 => 11, 66 => 10, 62 => 9, 54 => 4, 50 => 2, 48 => 1,);
  225. }
  226. public function getSourceContext(): Source
  227. {
  228. return new Source("{% if product.caracteristics %}
  229. <div class=\"tab-content rte section caracteristics\" style=\"padding: 30px 0;\">
  230. <div class=\"title-ctn\">
  231. <div class=\"title\">{% trans %}Caractéristiques{% endtrans %}</div>
  232. <hr>
  233. </div>
  234. <table>
  235. <tbody>
  236. {% for attribute in product.caracteristics %}
  237. {% if attribute.value and (attribute.value != 0) %}
  238. {% if attribute.attribute.code == \x27origin_country\x27 %}
  239. {% if attribute.value == \x27France\x27 %}
  240. <tr data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
  241. <td>{{ attribute.attribute.title }}</td>
  242. <td>{{ attribute.value }}</td>
  243. </tr>
  244. {% elseif attribute.value in [\x27Allemagne\x27,\x27Belgique\x27,\x27Espagne\x27,\x27Italie\x27,\x27Pologne\x27,\x27Roumanie\x27,\x27Grande Bretagne\x27,\x27Union Européenne\x27] %}
  245. <tr data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
  246. <td>{{ attribute.attribute.title }}</td>
  247. <td>Europe</td>
  248. </tr>
  249. {% endif %}
  250. {% elseif attribute.attribute.code == \x27main_color\x27 %}
  251. <tr data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
  252. <td>{{ attribute.attribute.title }}</td>
  253. <td>{{ attribute.entity.title }}</td>
  254. </tr>
  255. {% elseif attribute.attribute.code == \x27product_brand\x27 and product.manufacturer %}
  256. <tr data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
  257. <td>{{ attribute.attribute.title }}</td>
  258. <td><a href=\"{{ path(\x27manufacturer\x27, {id:product.manufacturer.id, url:product.manufacturer.url}) }}\">{{ product.manufacturer.name }}</a></td>
  259. </tr>
  260. {% else %}
  261. <tr data-attr=\"{{ attribute.attribute.code }}\" data-aid=\"{{ attribute.attribute.id }}\" data-paid=\"{{ attribute.id }}\">
  262. <td>{{ attribute.attribute.title }}</td>
  263. <td>
  264. {% if attribute %}
  265. {{ attribute.displayedValue }}
  266. {% elseif attribute.value == 1 %}
  267. {{ \x27Oui\x27 | trans }}
  268. {% elseif attribute.value == 0 %}
  269. {{ \x27Non\x27 | trans }}
  270. {% endif %}
  271. </td>
  272. </tr>
  273. {% endif %}
  274. {% endif %}
  275. {% endfor %}
  276. </tbody>
  277. </table>
  278. </div>
  279. {% endif %}
  280. ", "front/catalog/product/view/caracteristics.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/product/view/caracteristics.html.twig");
  281. }
  282. }