var/cache/dev/twig/29/297d57061bf7b4946c8cbbdd87e33154.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/model/view/references.html.twig */
  16. class __TwigTemplate_959a9b99b5cf8b1ca5e392da5209d13c 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/model/view/references.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/model/view/references.html.twig"));
  38. // line 1
  39. yield "<div class=\"attributes\">
  40. ";
  41. // line 3
  42. $context['_parent'] = $context;
  43. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["attributes"]) || array_key_exists("attributes", $context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.', 3, $this->source); })()));
  44. $context['loop'] = [
  45. 'parent' => $context['_parent'],
  46. 'index0' => 0,
  47. 'index' => 1,
  48. 'first' => true,
  49. ];
  50. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  51. $length = count($context['_seq']);
  52. $context['loop']['revindex0'] = $length - 1;
  53. $context['loop']['revindex'] = $length;
  54. $context['loop']['length'] = $length;
  55. $context['loop']['last'] = 1 === $length;
  56. }
  57. foreach ($context['_seq'] as $context["_key"] => $context["attr"]) {
  58. // line 4
  59. yield " ";
  60. if ((CoreExtension::getAttribute($this->env, $this->source, $context["attr"], "display", [], "any", false, false, false, 4) == "combobox")) {
  61. // line 5
  62. yield " ";
  63. yield from $this->load("front/catalog/model/view/variants/combobox.html.twig", 5)->unwrap()->yield($context);
  64. // line 6
  65. yield " ";
  66. } elseif ((CoreExtension::getAttribute($this->env, $this->source, $context["attr"], "display", [], "any", false, false, false, 6) == "color")) {
  67. // line 7
  68. yield " ";
  69. yield from $this->load("front/catalog/model/view/variants/color.html.twig", 7)->unwrap()->yield($context);
  70. // line 8
  71. yield " ";
  72. } elseif ((CoreExtension::getAttribute($this->env, $this->source, $context["attr"], "display", [], "any", false, false, false, 8) == "picture")) {
  73. // line 9
  74. yield " ";
  75. yield from $this->load("front/catalog/model/view/variants/picture.html.twig", 9)->unwrap()->yield($context);
  76. // line 10
  77. yield " ";
  78. } else {
  79. // line 11
  80. yield " ";
  81. yield from $this->load("front/catalog/model/view/variants/box.html.twig", 11)->unwrap()->yield($context);
  82. // line 12
  83. yield " ";
  84. }
  85. // line 13
  86. yield " ";
  87. ++$context['loop']['index0'];
  88. ++$context['loop']['index'];
  89. $context['loop']['first'] = false;
  90. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  91. --$context['loop']['revindex0'];
  92. --$context['loop']['revindex'];
  93. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  94. }
  95. }
  96. $_parent = $context['_parent'];
  97. unset($context['_seq'], $context['_key'], $context['attr'], $context['_parent'], $context['loop']);
  98. $context = array_intersect_key($context, $_parent) + $_parent;
  99. // line 14
  100. yield "
  101. ";
  102. // line 27
  103. yield " <div class=\"references\">
  104. ";
  105. // line 28
  106. $context['_parent'] = $context;
  107. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 28, $this->source); })()));
  108. $context['loop'] = [
  109. 'parent' => $context['_parent'],
  110. 'index0' => 0,
  111. 'index' => 1,
  112. 'first' => true,
  113. ];
  114. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  115. $length = count($context['_seq']);
  116. $context['loop']['revindex0'] = $length - 1;
  117. $context['loop']['revindex'] = $length;
  118. $context['loop']['length'] = $length;
  119. $context['loop']['last'] = 1 === $length;
  120. }
  121. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  122. // line 29
  123. yield " ";
  124. yield from $this->load("front/catalog/model/view/reference-line.html.twig", 29)->unwrap()->yield(CoreExtension::merge($context, ["product" => $context["p"]]));
  125. // line 30
  126. yield " ";
  127. ++$context['loop']['index0'];
  128. ++$context['loop']['index'];
  129. $context['loop']['first'] = false;
  130. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  131. --$context['loop']['revindex0'];
  132. --$context['loop']['revindex'];
  133. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  134. }
  135. }
  136. $_parent = $context['_parent'];
  137. unset($context['_seq'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
  138. $context = array_intersect_key($context, $_parent) + $_parent;
  139. // line 31
  140. yield " </div>
  141. </div>";
  142. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  143. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  144. yield from [];
  145. }
  146. /**
  147. * @codeCoverageIgnore
  148. */
  149. public function getTemplateName(): string
  150. {
  151. return "front/catalog/model/view/references.html.twig";
  152. }
  153. /**
  154. * @codeCoverageIgnore
  155. */
  156. public function isTraitable(): bool
  157. {
  158. return false;
  159. }
  160. /**
  161. * @codeCoverageIgnore
  162. */
  163. public function getDebugInfo(): array
  164. {
  165. return array ( 150 => 31, 136 => 30, 133 => 29, 116 => 28, 113 => 27, 110 => 14, 96 => 13, 93 => 12, 90 => 11, 87 => 10, 84 => 9, 81 => 8, 78 => 7, 75 => 6, 72 => 5, 69 => 4, 52 => 3, 48 => 1,);
  166. }
  167. public function getSourceContext(): Source
  168. {
  169. return new Source("<div class=\"attributes\">
  170. {% for attr in attributes %}
  171. {% if attr.display == \x27combobox\x27 %}
  172. {% include \x27front/catalog/model/view/variants/combobox.html.twig\x27 %}
  173. {% elseif attr.display == \x27color\x27 %}
  174. {% include \x27front/catalog/model/view/variants/color.html.twig\x27 %}
  175. {% elseif attr.display == \x27picture\x27 %}
  176. {% include \x27front/catalog/model/view/variants/picture.html.twig\x27 %}
  177. {% else %}
  178. {% include \x27front/catalog/model/view/variants/box.html.twig\x27 %}
  179. {% endif %}
  180. {% endfor %}
  181. {# {% set country = customerMgr.getCustomerCountry() %}
  182. {% if customerMgr.canSeePrices() and product.isAvailableForCountry(country) %}
  183. <div class=\"row\">
  184. <div class=\"ref\">{% trans %}Réf.{% endtrans %} <span class=\"value\">{{ product.reference }}</span></div>
  185. <div class=\"prices\">
  186. {% for p in products %}
  187. <div class=\"price\" id=\"price-{{ p.id }}\">{{ p.getPrice(true, priceGroup)|price }}</div>
  188. {% endfor %}
  189. </div>
  190. {% include \x27front/cart/bt.html.twig\x27 with {product:product} %}
  191. </div>
  192. {% endif %}#}
  193. <div class=\"references\">
  194. {% for p in products %}
  195. {% include \x27front/catalog/model/view/reference-line.html.twig\x27 with {product:p} %}
  196. {% endfor %}
  197. </div>
  198. </div>", "front/catalog/model/view/references.html.twig", "/var/www/dogcat.com/pim/templates/front/catalog/model/view/references.html.twig");
  199. }
  200. }