<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* front/catalog/model/view/references.html.twig */
class __TwigTemplate_959a9b99b5cf8b1ca5e392da5209d13c extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/model/view/references.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/model/view/references.html.twig"));
// line 1
yield "<div class=\"attributes\">
";
// line 3
$context['_parent'] = $context;
$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); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["attr"]) {
// line 4
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["attr"], "display", [], "any", false, false, false, 4) == "combobox")) {
// line 5
yield " ";
yield from $this->load("front/catalog/model/view/variants/combobox.html.twig", 5)->unwrap()->yield($context);
// line 6
yield " ";
} elseif ((CoreExtension::getAttribute($this->env, $this->source, $context["attr"], "display", [], "any", false, false, false, 6) == "color")) {
// line 7
yield " ";
yield from $this->load("front/catalog/model/view/variants/color.html.twig", 7)->unwrap()->yield($context);
// line 8
yield " ";
} elseif ((CoreExtension::getAttribute($this->env, $this->source, $context["attr"], "display", [], "any", false, false, false, 8) == "picture")) {
// line 9
yield " ";
yield from $this->load("front/catalog/model/view/variants/picture.html.twig", 9)->unwrap()->yield($context);
// line 10
yield " ";
} else {
// line 11
yield " ";
yield from $this->load("front/catalog/model/view/variants/box.html.twig", 11)->unwrap()->yield($context);
// line 12
yield " ";
}
// line 13
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['attr'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 14
yield "
";
// line 27
yield " <div class=\"references\">
";
// line 28
$context['_parent'] = $context;
$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); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
// line 29
yield " ";
yield from $this->load("front/catalog/model/view/reference-line.html.twig", 29)->unwrap()->yield(CoreExtension::merge($context, ["product" => $context["p"]]));
// line 30
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 31
yield " </div>
</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "front/catalog/model/view/references.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("<div class=\"attributes\">
{% for attr in attributes %}
{% if attr.display == \x27combobox\x27 %}
{% include \x27front/catalog/model/view/variants/combobox.html.twig\x27 %}
{% elseif attr.display == \x27color\x27 %}
{% include \x27front/catalog/model/view/variants/color.html.twig\x27 %}
{% elseif attr.display == \x27picture\x27 %}
{% include \x27front/catalog/model/view/variants/picture.html.twig\x27 %}
{% else %}
{% include \x27front/catalog/model/view/variants/box.html.twig\x27 %}
{% endif %}
{% endfor %}
{# {% set country = customerMgr.getCustomerCountry() %}
{% if customerMgr.canSeePrices() and product.isAvailableForCountry(country) %}
<div class=\"row\">
<div class=\"ref\">{% trans %}Réf.{% endtrans %} <span class=\"value\">{{ product.reference }}</span></div>
<div class=\"prices\">
{% for p in products %}
<div class=\"price\" id=\"price-{{ p.id }}\">{{ p.getPrice(true, priceGroup)|price }}</div>
{% endfor %}
</div>
{% include \x27front/cart/bt.html.twig\x27 with {product:product} %}
</div>
{% endif %}#}
<div class=\"references\">
{% for p in products %}
{% include \x27front/catalog/model/view/reference-line.html.twig\x27 with {product:p} %}
{% endfor %}
</div>
</div>", "front/catalog/model/view/references.html.twig", "/var/www/dogcat.com/pim/templates/front/catalog/model/view/references.html.twig");
}
}