<?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;
/* front/pack/single.html.twig */
class __TwigTemplate_1e3e6e601e99e911df8f9ed238de9e96d37dd1bcf9553a359efa49e492eeff13 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'meta' => [$this, 'block_meta'],
'body' => [$this, 'block_body'],
'javascript' => [$this, 'block_javascript'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base_front.html.twig";
}
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", "front/pack/single.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/pack/single.html.twig"));
$this->parent = $this->loadTemplate("base_front.html.twig", "front/pack/single.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_meta($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(), "block", "meta"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "meta"));
// line 4
yield " <title>Produits du pack ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 4, $this->source); })()), "name", [], "any", false, false, false, 4), "html", null, true);
yield "</title>
<meta name=\"description\" content=\"le ";
// line 5
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 5, $this->source); })()), "name", [], "any", false, false, false, 5), "html", null, true);
yield " contient ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 5, $this->source); })()), "products", [], "any", false, false, false, 5)), "html", null, true);
yield " produits à un prix attractif.\">
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// line 8
public function block_body($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(), "block", "body"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 9
yield " <div class=\"page-header\" style=\"background: url(";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/background-page-header.jpg"), "html", null, true);
yield ") no-repeat center;background-size: cover\">
<div class=\"container\">
<div class=\"row\">
<!-- page caption -->
<div class=\"col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 \">
<div class=\"page-caption\">
<h1 class=\"page-title\">Pack ";
// line 15
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 15, $this->source); })()), "name", [], "any", false, false, false, 15), "html", null, true);
yield "</h1>
</div>
</div>
<!-- /.page caption -->
</div>
</div>
<!-- page caption -->
<div class=\"page-breadcrumb\">
<div class=\"container\">
<div class=\"row\">
<nav aria-label=\"breadcrumb\">
<ol class=\"breadcrumb\">
<li class=\"breadcrumb-item\"><a href=\"";
// line 27
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_home");
yield "\" class=\"breadcrumb-link\">Accueil</a></li>
<li class=\"breadcrumb-item active text-white\" aria-current=\"page\">Contenu du pack ";
// line 28
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 28, $this->source); })()), "name", [], "any", false, false, false, 28), "html", null, true);
yield "</li>
</ol>
</nav>
</div>
</div>
</div>
<!-- page breadcrumb -->
</div>
<!-- /.page-header -->
<!-- vendor-section -->
<div class=\"content\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-xl-8 col-lg-8 col-md-7 col-sm-12 col-12\">
<h3>Ce pack contient les produits suivants :</h3>
";
// line 43
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 43, $this->source); })()), "productPercents", [], "any", false, false, false, 43));
$context['_iterated'] = false;
foreach ($context['_seq'] as $context["_key"] => $context["productPercent"]) {
// line 44
yield " <div class=\"vendor-thumbnail list-view\">
<!-- Vendor thumbnail -->
<div class=\"row\">
<div class=\"col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 border-right pr-0\">
<div class=\"vendor-img\">
<!-- Vendor img -->
<a href=\"";
// line 50
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_product_single", ["slug" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 50), "subCategories", [], "any", false, false, false, 50), 0, [], "array", false, false, false, 50), "categories", [], "any", false, false, false, 50), 0, [], "array", false, false, false, 50), "slug", [], "any", false, false, false, 50), "subCategorySlug" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 50), "subCategories", [], "any", false, false, false, 50), 0, [], "array", false, false, false, 50), "subCategorySlug", [], "any", false, false, false, 50), "product_id" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 50), "id", [], "any", false, false, false, 50), "productSlug" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 50), "productSlug", [], "any", false, false, false, 50)]), "html", null, true);
yield "\"><div class=\"zoomimg\"><img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((Twig\Extension\CoreExtension::constant("App\\Services\\File::IMAGE_PRODUCT_DIR") . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 50), "photos", [], "any", false, false, false, 50), "first", [], "any", false, false, false, 50), "url", [], "any", false, false, false, 50))), "html", null, true);
yield "\" alt=\"\" class=\"img-fluid\"></div></a>
<div class=\"wishlist-sign\">
";
// line 52
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 52, $this->source); })()), "user", [], "any", false, false, false, 52) && (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 52, $this->source); })()), "user", [], "any", false, false, false, 52), "roles", [], "any", false, false, false, 52) == ["ROLE_USER"]))) {
// line 53
yield " ";
$context["isWish"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["filter_service"]) || array_key_exists("filter_service", $context) ? $context["filter_service"] : (function () { throw new RuntimeError('Variable "filter_service" does not exist.', 53, $this->source); })()), "getIfIsWish", [CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 53, $this->source); })()), "user", [], "any", false, false, false, 53), CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 53)], "method", false, false, false, 53);
// line 54
yield " ";
if ((isset($context["isWish"]) || array_key_exists("isWish", $context) ? $context["isWish"] : (function () { throw new RuntimeError('Variable "isWish" does not exist.', 54, $this->source); })())) {
// line 55
yield " <a href=\"#\" class=\"btn-wishlist\" style=\"background-color:#ff4d4d;\"><i class=\"fa fa-heart\" style=\"color:#fff\"></i></a>
";
} else {
// line 57
yield " <a href=\"#\" class=\"btn-wishlist\"><i class=\"fa fa-heart\"></i></a>
";
}
// line 59
yield " ";
}
// line 60
yield " </div>
</div>
</div>
<!-- /.Vendor img -->
<div class=\"col-xl-8 col-lg-8 col-md-12 col-sm-12 col-12 pl-0\">
<div class=\"vendor-content\">
<!-- Vendor Content -->
<h2 class=\"vendor-title\"><a href=\"";
// line 67
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_product_single", ["slug" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 67), "subCategories", [], "any", false, false, false, 67), 0, [], "array", false, false, false, 67), "categories", [], "any", false, false, false, 67), 0, [], "array", false, false, false, 67), "slug", [], "any", false, false, false, 67), "subCategorySlug" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 67), "subCategories", [], "any", false, false, false, 67), 0, [], "array", false, false, false, 67), "subCategorySlug", [], "any", false, false, false, 67), "product_id" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 67), "id", [], "any", false, false, false, 67), "productSlug" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 67), "productSlug", [], "any", false, false, false, 67)]), "html", null, true);
yield "\" class=\"title\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 67), "name", [], "any", false, false, false, 67), "html", null, true);
yield "</a></h2>
<p class=\"vendor-address\">
";
// line 69
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 69), "departments", [], "any", false, false, false, 69));
$context['_iterated'] = false;
$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["department"]) {
// line 70
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["department"], "name", [], "any", false, false, false, 70), "html", null, true);
if ( !CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 70)) {
yield ",";
}
// line 71
yield " ";
$context['_iterated'] = true;
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
if (!$context['_iterated']) {
// line 72
yield " Toute la France
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['department'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 74
yield " </p>
<!-- /.Vendor meta -->
</div>
<div class=\"vendor-meta m-0\">
<div class=\"vendor-meta-item vendor-meta-item-bordered\">
<span class=\"vendor-price\">
";
// line 80
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 80), "price", [], "any", false, false, false, 80), 2, "."), "html", null, true);
yield "€
</span>
<span class=\"vendor-text\">Prix</span></div>
<div class=\"vendor-meta-item vendor-meta-item-bordered\">
<span class=\"vendor-guest\">
";
// line 85
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 85), "quantity", [], "any", false, false, false, 85), "html", null, true);
yield "
</span>
<span class=\"vendor-text\">Quantité restante</span>
</div>
";
// line 89
$context["notes"] = 0;
// line 90
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 90), "avis", [], "any", false, false, false, 90));
foreach ($context['_seq'] as $context["_key"] => $context["avi"]) {
// line 91
yield " ";
$context["notes"] = ((isset($context["notes"]) || array_key_exists("notes", $context) ? $context["notes"] : (function () { throw new RuntimeError('Variable "notes" does not exist.', 91, $this->source); })()) + CoreExtension::getAttribute($this->env, $this->source, $context["avi"], "globalNote", [], "any", false, false, false, 91));
// line 92
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['avi'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 93
yield " ";
$context["noteTotal"] = ((((isset($context["notes"]) || array_key_exists("notes", $context) ? $context["notes"] : (function () { throw new RuntimeError('Variable "notes" does not exist.', 93, $this->source); })()) > 0)) ? (((isset($context["notes"]) || array_key_exists("notes", $context) ? $context["notes"] : (function () { throw new RuntimeError('Variable "notes" does not exist.', 93, $this->source); })()) / Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 93), "avis", [], "any", false, false, false, 93)))) : (0));
// line 94
yield " <div class=\"vendor-meta-item vendor-meta-item-bordered\">
<span class=\"rating-star\">
";
// line 96
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(range(1, 5));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 97
yield " ";
if (($context["i"] < (isset($context["noteTotal"]) || array_key_exists("noteTotal", $context) ? $context["noteTotal"] : (function () { throw new RuntimeError('Variable "noteTotal" does not exist.', 97, $this->source); })()))) {
// line 98
yield " <i class=\"fa fa-star rated\"></i>
";
} else {
// line 100
yield " <i class=\"fa fa-star rate-mute\"></i>
";
}
// line 102
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 103
yield " </span>
<span class=\"rating-count vendor-text\">(";
// line 104
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productPercent"], "product", [], "any", false, false, false, 104), "avis", [], "any", false, false, false, 104)), "html", null, true);
yield ")</span></div>
</div>
<!-- /.Vendor Content -->
</div>
</div>
</div>
";
$context['_iterated'] = true;
}
if (!$context['_iterated']) {
// line 111
yield " <div class=\"vendor-thumbnail list-view p-4\">Aucun service correspondant</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['productPercent'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 113
yield "
<!-- /.paginations -->
</div>
<!-- sidebar-section -->
<div class=\"col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12\">
<div class=\"sidebar-venue\" >
<div class=\"card\">
<div class=\"card-body\">
<form method=\"post\" action=\"";
// line 121
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_product_add_pack_basket", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 121, $this->source); })()), "id", [], "any", false, false, false, 121)]), "html", null, true);
yield "\" id=\"form_add_bascket\">
<div class=\"form-group\">
<label for=\"quantity_product\">Prix du pack : </label><br>
<div class=\"quantity buttons_added\">
<span style=\"color:#A066F2;font-size:1.4em\">";
// line 125
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, (isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 125, $this->source); })()), "price", [], "any", false, false, false, 125), 2, "."), "html", null, true);
yield "€</span>
</div>
</div>
<div class=\"form-group mt-5\">
";
// line 129
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 129, $this->source); })()), "session", [], "any", false, false, false, 129), "get", ["packs"], "method", false, false, false, 129) == CoreExtension::getAttribute($this->env, $this->source, (isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 129, $this->source); })()), "id", [], "any", false, false, false, 129))) {
// line 130
yield " <button type=\"submit\" class=\"btn btn-rounded btn-danger mt-3\" id=\"btn_add\">Supprimer du panier</button>
";
} else {
// line 132
yield " <button type=\"submit\" class=\"btn btn-rounded btn-primary mt-3\" id=\"btn_add\">Ajouter au panier</button>
";
}
// line 134
yield " </div>
<div id=\"message_form\"></div>
</form>
</div>
</div>
</div>
</div>
<!-- /.sidebar-section -->
</div>
</div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// line 148
public function block_javascript($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(), "block", "javascript"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 149
yield from $this->yieldParentBlock("javascript", $context, $blocks);
yield "
<script>
document.addEventListener('DOMContentLoaded', function() {
const form = document.getElementById('form_add_bascket');
form.addEventListener('submit', (e) => {
e.preventDefault();
let form = e.target;
const formData = new FormData(form);
fetch(form.action, { method: form.method, body: formData })
.then(response => response.json())
.then(data => {
if (data.message === 'ok') {
if (data.response === 'added') {
const btnAdd = document.getElementById('btn_add');
btnAdd.classList.replace('btn-primary', 'btn-danger');
btnAdd.textContent = 'Supprimer du panier';
const msgElt = document.getElementById('message_form');
msgElt.classList.add('text-success');
msgElt.classList.add('text-center');
msgElt.textContent = 'Produit ajouté au panier !';
} else {
const btnAdd = document.getElementById('btn_add');
btnAdd.classList.replace('btn-danger', 'btn-primary');
btnAdd.textContent = 'Ajouter au panier';
const msgElt = document.getElementById('message_form');
msgElt.classList.add('text-success');
msgElt.classList.add('text-center');
msgElt.textContent = 'Produit supprimé du panier !';
}
}
});
return false;
})
})
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "front/pack/single.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 403 => 149, 393 => 148, 370 => 134, 366 => 132, 362 => 130, 360 => 129, 353 => 125, 346 => 121, 336 => 113, 329 => 111, 317 => 104, 314 => 103, 308 => 102, 304 => 100, 300 => 98, 297 => 97, 293 => 96, 289 => 94, 286 => 93, 280 => 92, 277 => 91, 272 => 90, 270 => 89, 263 => 85, 255 => 80, 247 => 74, 240 => 72, 227 => 71, 221 => 70, 203 => 69, 196 => 67, 187 => 60, 184 => 59, 180 => 57, 176 => 55, 173 => 54, 170 => 53, 168 => 52, 161 => 50, 153 => 44, 148 => 43, 130 => 28, 126 => 27, 111 => 15, 101 => 9, 91 => 8, 76 => 5, 71 => 4, 61 => 3, 38 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base_front.html.twig' %}
{% block meta %}
<title>Produits du pack {{ pack.name }}</title>
<meta name=\"description\" content=\"le {{ pack.name }} contient {{ pack.products|length }} produits à un prix attractif.\">
{% endblock %}
{% block body %}
<div class=\"page-header\" style=\"background: url({{ asset('images/background-page-header.jpg') }}) no-repeat center;background-size: cover\">
<div class=\"container\">
<div class=\"row\">
<!-- page caption -->
<div class=\"col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 \">
<div class=\"page-caption\">
<h1 class=\"page-title\">Pack {{ pack.name }}</h1>
</div>
</div>
<!-- /.page caption -->
</div>
</div>
<!-- page caption -->
<div class=\"page-breadcrumb\">
<div class=\"container\">
<div class=\"row\">
<nav aria-label=\"breadcrumb\">
<ol class=\"breadcrumb\">
<li class=\"breadcrumb-item\"><a href=\"{{ path('front_home') }}\" class=\"breadcrumb-link\">Accueil</a></li>
<li class=\"breadcrumb-item active text-white\" aria-current=\"page\">Contenu du pack {{ pack.name }}</li>
</ol>
</nav>
</div>
</div>
</div>
<!-- page breadcrumb -->
</div>
<!-- /.page-header -->
<!-- vendor-section -->
<div class=\"content\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-xl-8 col-lg-8 col-md-7 col-sm-12 col-12\">
<h3>Ce pack contient les produits suivants :</h3>
{% for productPercent in pack.productPercents %}
<div class=\"vendor-thumbnail list-view\">
<!-- Vendor thumbnail -->
<div class=\"row\">
<div class=\"col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 border-right pr-0\">
<div class=\"vendor-img\">
<!-- Vendor img -->
<a href=\"{{ path('front_product_single', {'slug': productPercent.product.subCategories[0].categories[0].slug, 'subCategorySlug': productPercent.product.subCategories[0].subCategorySlug, 'product_id': productPercent.product.id, 'productSlug': productPercent.product.productSlug}) }}\"><div class=\"zoomimg\"><img src=\"{{ asset(constant('App\\\\Services\\\\File::IMAGE_PRODUCT_DIR') ~ productPercent.product.photos.first.url) }}\" alt=\"\" class=\"img-fluid\"></div></a>
<div class=\"wishlist-sign\">
{% if app.user and app.user.roles == ['ROLE_USER'] %}
{% set isWish = filter_service.getIfIsWish(app.user, productPercent.product) %}
{% if isWish %}
<a href=\"#\" class=\"btn-wishlist\" style=\"background-color:#ff4d4d;\"><i class=\"fa fa-heart\" style=\"color:#fff\"></i></a>
{% else %}
<a href=\"#\" class=\"btn-wishlist\"><i class=\"fa fa-heart\"></i></a>
{% endif %}
{% endif %}
</div>
</div>
</div>
<!-- /.Vendor img -->
<div class=\"col-xl-8 col-lg-8 col-md-12 col-sm-12 col-12 pl-0\">
<div class=\"vendor-content\">
<!-- Vendor Content -->
<h2 class=\"vendor-title\"><a href=\"{{ path('front_product_single', {'slug': productPercent.product.subCategories[0].categories[0].slug, 'subCategorySlug': productPercent.product.subCategories[0].subCategorySlug, 'product_id': productPercent.product.id, 'productSlug': productPercent.product.productSlug}) }}\" class=\"title\">{{ productPercent.product.name }}</a></h2>
<p class=\"vendor-address\">
{% for department in productPercent.product.departments %}
{{ department.name }}{% if not loop.last %},{% endif %}
{% else %}
Toute la France
{% endfor %}
</p>
<!-- /.Vendor meta -->
</div>
<div class=\"vendor-meta m-0\">
<div class=\"vendor-meta-item vendor-meta-item-bordered\">
<span class=\"vendor-price\">
{{ productPercent.product.price|number_format(2, '.') }}€
</span>
<span class=\"vendor-text\">Prix</span></div>
<div class=\"vendor-meta-item vendor-meta-item-bordered\">
<span class=\"vendor-guest\">
{{ productPercent.product.quantity }}
</span>
<span class=\"vendor-text\">Quantité restante</span>
</div>
{% set notes = 0 %}
{% for avi in productPercent.product.avis %}
{% set notes = notes + avi.globalNote %}
{% endfor %}
{% set noteTotal = (notes > 0) ? notes / productPercent.product.avis|length : 0 %}
<div class=\"vendor-meta-item vendor-meta-item-bordered\">
<span class=\"rating-star\">
{% for i in 1..5 %}
{% if i < noteTotal %}
<i class=\"fa fa-star rated\"></i>
{% else %}
<i class=\"fa fa-star rate-mute\"></i>
{% endif %}
{% endfor %}
</span>
<span class=\"rating-count vendor-text\">({{ productPercent.product.avis|length }})</span></div>
</div>
<!-- /.Vendor Content -->
</div>
</div>
</div>
{% else %}
<div class=\"vendor-thumbnail list-view p-4\">Aucun service correspondant</div>
{% endfor %}
<!-- /.paginations -->
</div>
<!-- sidebar-section -->
<div class=\"col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12\">
<div class=\"sidebar-venue\" >
<div class=\"card\">
<div class=\"card-body\">
<form method=\"post\" action=\"{{ path('front_product_add_pack_basket', {'id': pack.id}) }}\" id=\"form_add_bascket\">
<div class=\"form-group\">
<label for=\"quantity_product\">Prix du pack : </label><br>
<div class=\"quantity buttons_added\">
<span style=\"color:#A066F2;font-size:1.4em\">{{ pack.price|number_format(2, '.') }}€</span>
</div>
</div>
<div class=\"form-group mt-5\">
{% if app.session.get('packs') == pack.id %}
<button type=\"submit\" class=\"btn btn-rounded btn-danger mt-3\" id=\"btn_add\">Supprimer du panier</button>
{% else %}
<button type=\"submit\" class=\"btn btn-rounded btn-primary mt-3\" id=\"btn_add\">Ajouter au panier</button>
{% endif %}
</div>
<div id=\"message_form\"></div>
</form>
</div>
</div>
</div>
</div>
<!-- /.sidebar-section -->
</div>
</div>
</div>
{% endblock %}
{% block javascript %}
{{ parent() }}
<script>
document.addEventListener('DOMContentLoaded', function() {
const form = document.getElementById('form_add_bascket');
form.addEventListener('submit', (e) => {
e.preventDefault();
let form = e.target;
const formData = new FormData(form);
fetch(form.action, { method: form.method, body: formData })
.then(response => response.json())
.then(data => {
if (data.message === 'ok') {
if (data.response === 'added') {
const btnAdd = document.getElementById('btn_add');
btnAdd.classList.replace('btn-primary', 'btn-danger');
btnAdd.textContent = 'Supprimer du panier';
const msgElt = document.getElementById('message_form');
msgElt.classList.add('text-success');
msgElt.classList.add('text-center');
msgElt.textContent = 'Produit ajouté au panier !';
} else {
const btnAdd = document.getElementById('btn_add');
btnAdd.classList.replace('btn-danger', 'btn-primary');
btnAdd.textContent = 'Ajouter au panier';
const msgElt = document.getElementById('message_form');
msgElt.classList.add('text-success');
msgElt.classList.add('text-center');
msgElt.textContent = 'Produit supprimé du panier !';
}
}
});
return false;
})
})
</script>
{% endblock %}
", "front/pack/single.html.twig", "/var/www/vhosts/hobbiinn.com/httpdocs/providdersvacance/templates/front/pack/single.html.twig");
}
}