<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* @SyliusShop/Product/Show/_associations.html.twig */
class __TwigTemplate_37495aac0f65aef2afff96c7208643713e400bc0deb40e94830cbdb1df5d6b2b extends \Twig\Template
{
private $source;
private $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 = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/Show/_associations.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/Show/_associations.html.twig"));
// line 1
$macros["headers"] = $this->macros["headers"] = $this->loadTemplate("@SyliusShop/Common/Macro/sectionHeaders.html.twig", "@SyliusShop/Product/Show/_associations.html.twig", 1)->unwrap();
// line 2
echo "
";
// line 3
$context["afficherNouveautes"] = 0;
// line 4
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 4, $this->source); })()), "associations", [], "any", false, false, false, 4));
foreach ($context['_seq'] as $context["_key"] => $context["association"]) {
// line 5
echo "
";
// line 6
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["association"], "getType", [], "method", false, false, false, 6), "getCode", [], "method", false, false, false, 6) == "similary_product")) {
// line 7
echo " ";
$context["afficherNouveautes"] = 0;
// line 8
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_partial_product_association_show", ["productId" => twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 8, $this->source); })()), "id", [], "any", false, false, false, 8), "id" => twig_get_attribute($this->env, $this->source, $context["association"], "id", [], "any", false, false, false, 8), "template" => "@SyliusShop/Product/Show/_association.html.twig"]));
echo "
";
} else {
// line 10
echo " ";
$context["afficherNouveautes"] = 1;
// line 11
echo " ";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['association'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 13
echo "
";
// line 14
if (((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 14, $this->source); })()), "associations", [], "any", false, false, false, 14)) == 0) || ((isset($context["afficherNouveautes"]) || array_key_exists("afficherNouveautes", $context) ? $context["afficherNouveautes"] : (function () { throw new RuntimeError('Variable "afficherNouveautes" does not exist.', 14, $this->source); })()) == 1))) {
// line 15
echo "<div class=\"bloc-top-content text-center\">
<h2 class=\"title-medium title-small-size-lg\">";
// line 16
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.product.pour_completer"), "html", null, true);
echo "</h2>
<div class=\"contenu-art-top position-relative px-perso-top\">
";
// line 18
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_partial_product_index_latest", ["count" => 8, "template" => "@SyliusShop/Product/_horizontalList.html.twig"]));
echo "
</div>
</div>
";
}
// line 21
echo "
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/Show/_associations.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 98 => 21, 91 => 18, 86 => 16, 83 => 15, 81 => 14, 78 => 13, 71 => 11, 68 => 10, 62 => 8, 59 => 7, 57 => 6, 54 => 5, 50 => 4, 48 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% import '@SyliusShop/Common/Macro/sectionHeaders.html.twig' as headers %}
{% set afficherNouveautes = 0 %}
{% for association in product.associations %}
{% if association.getType().getCode() == \"similary_product\"%}
{% set afficherNouveautes = 0 %}
{{ render(url('sylius_shop_partial_product_association_show', {'productId': product.id, 'id': association.id, 'template': '@SyliusShop/Product/Show/_association.html.twig'})) }}
{% else %}
{% set afficherNouveautes = 1 %}
{% endif %}
{% endfor %}
{% if (product.associations|length == 0) or (afficherNouveautes == 1) %}
<div class=\"bloc-top-content text-center\">
<h2 class=\"title-medium title-small-size-lg\">{{'app.product.pour_completer'|trans}}</h2>
<div class=\"contenu-art-top position-relative px-perso-top\">
{{ render(url('sylius_shop_partial_product_index_latest', {'count': 8, 'template': '@SyliusShop/Product/_horizontalList.html.twig'})) }}
</div>
</div>
{% endif %}
", "@SyliusShop/Product/Show/_associations.html.twig", "/home/6nergiesboutique/www_preprod/themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_associations.html.twig");
}
}