var/cache/dev/twig/66/6647eb6971655f67f972cf044bcb6174c62ea266ff417fb9ccec2f07fbeb9a6e.php line 41

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. /* front/pack/single.html.twig */
  15. class __TwigTemplate_1e3e6e601e99e911df8f9ed238de9e96d37dd1bcf9553a359efa49e492eeff13 extends Template
  16. {
  17.     private $source;
  18.     private $macros = [];
  19.     public function __construct(Environment $env)
  20.     {
  21.         parent::__construct($env);
  22.         $this->source $this->getSourceContext();
  23.         $this->blocks = [
  24.             'meta' => [$this'block_meta'],
  25.             'body' => [$this'block_body'],
  26.             'javascript' => [$this'block_javascript'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 1
  32.         return "base_front.html.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""front/pack/single.html.twig"));
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""front/pack/single.html.twig"));
  41.         $this->parent $this->loadTemplate("base_front.html.twig""front/pack/single.html.twig"1);
  42.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  43.         
  44.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  45.         
  46.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  47.     }
  48.     // line 3
  49.     public function block_meta($context, array $blocks = [])
  50.     {
  51.         $macros $this->macros;
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  53.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""meta"));
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  55.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""meta"));
  56.         // line 4
  57.         yield "    <title>Produits du pack ";
  58.         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"falsefalsefalse4), "html"nulltrue);
  59.         yield "</title>
  60.     <meta name=\"description\" content=\"le ";
  61.         // line 5
  62.         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"falsefalsefalse5), "html"nulltrue);
  63.         yield " contient ";
  64.         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"falsefalsefalse5)), "html"nulltrue);
  65.         yield " produits à un prix attractif.\">
  66. ";
  67.         
  68.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  69.         
  70.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  71.         return; yield '';
  72.     }
  73.     // line 8
  74.     public function block_body($context, array $blocks = [])
  75.     {
  76.         $macros $this->macros;
  77.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  78.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  79.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  80.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  81.         // line 9
  82.         yield "    <div class=\"page-header\" style=\"background: url(";
  83.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/background-page-header.jpg"), "html"nulltrue);
  84.         yield ") no-repeat center;background-size: cover\">
  85.         <div class=\"container\">
  86.             <div class=\"row\">
  87.                 <!-- page caption -->
  88.                 <div class=\"col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 \">
  89.                     <div class=\"page-caption\">
  90.                         <h1 class=\"page-title\">Pack ";
  91.         // line 15
  92.         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"falsefalsefalse15), "html"nulltrue);
  93.         yield "</h1>
  94.                     </div>
  95.                 </div>
  96.                 <!-- /.page caption -->
  97.             </div>
  98.         </div>
  99.         <!-- page caption -->
  100.         <div class=\"page-breadcrumb\">
  101.             <div class=\"container\">
  102.                 <div class=\"row\">
  103.                     <nav aria-label=\"breadcrumb\">
  104.                         <ol class=\"breadcrumb\">
  105.                             <li class=\"breadcrumb-item\"><a href=\"";
  106.         // line 27
  107.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_home");
  108.         yield "\" class=\"breadcrumb-link\">Accueil</a></li>
  109.                             <li class=\"breadcrumb-item active text-white\" aria-current=\"page\">Contenu du pack ";
  110.         // line 28
  111.         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"falsefalsefalse28), "html"nulltrue);
  112.         yield "</li>
  113.                         </ol>
  114.                     </nav>
  115.                 </div>
  116.             </div>
  117.         </div>
  118.         <!-- page breadcrumb -->
  119.     </div>
  120.     <!-- /.page-header -->
  121.     <!-- vendor-section -->
  122.     <div class=\"content\">
  123.         <div class=\"container\">
  124.             <div class=\"row\">
  125.                 <div class=\"col-xl-8 col-lg-8 col-md-7 col-sm-12 col-12\">
  126.                     <h3>Ce pack contient les produits suivants :</h3>
  127.                     ";
  128.         // line 43
  129.         $context['_parent'] = $context;
  130.         $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"falsefalsefalse43));
  131.         $context['_iterated'] = false;
  132.         foreach ($context['_seq'] as $context["_key"] => $context["productPercent"]) {
  133.             // line 44
  134.             yield "                        <div class=\"vendor-thumbnail list-view\">
  135.                             <!-- Vendor thumbnail -->
  136.                             <div class=\"row\">
  137.                                 <div class=\"col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 border-right pr-0\">
  138.                                     <div class=\"vendor-img\">
  139.                                         <!-- Vendor img -->
  140.                                         <a href=\"";
  141.             // line 50
  142.             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->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse50), "subCategories", [], "any"falsefalsefalse50), 0, [], "array"falsefalsefalse50), "categories", [], "any"falsefalsefalse50), 0, [], "array"falsefalsefalse50), "slug", [], "any"falsefalsefalse50), "subCategorySlug" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse50), "subCategories", [], "any"falsefalsefalse50), 0, [], "array"falsefalsefalse50), "subCategorySlug", [], "any"falsefalsefalse50), "product_id" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse50), "id", [], "any"falsefalsefalse50), "productSlug" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse50), "productSlug", [], "any"falsefalsefalse50)]), "html"nulltrue);
  143.             yield "\"><div class=\"zoomimg\"><img src=\"";
  144.             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->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse50), "photos", [], "any"falsefalsefalse50), "first", [], "any"falsefalsefalse50), "url", [], "any"falsefalsefalse50))), "html"nulltrue);
  145.             yield "\" alt=\"\" class=\"img-fluid\"></div></a>
  146.                                         <div class=\"wishlist-sign\">
  147.                                             ";
  148.             // line 52
  149.             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"falsefalsefalse52) && (CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse52), "roles", [], "any"falsefalsefalse52) == ["ROLE_USER"]))) {
  150.                 // line 53
  151.                 yield "                                                ";
  152.                 $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"falsefalsefalse53), CoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse53)], "method"falsefalsefalse53);
  153.                 // line 54
  154.                 yield "                                                ";
  155.                 if ((isset($context["isWish"]) || array_key_exists("isWish"$context) ? $context["isWish"] : (function () { throw new RuntimeError('Variable "isWish" does not exist.'54$this->source); })())) {
  156.                     // line 55
  157.                     yield "                                                    <a href=\"#\" class=\"btn-wishlist\" style=\"background-color:#ff4d4d;\"><i class=\"fa fa-heart\" style=\"color:#fff\"></i></a>
  158.                                                 ";
  159.                 } else {
  160.                     // line 57
  161.                     yield "                                                    <a href=\"#\" class=\"btn-wishlist\"><i class=\"fa fa-heart\"></i></a>
  162.                                                 ";
  163.                 }
  164.                 // line 59
  165.                 yield "                                            ";
  166.             }
  167.             // line 60
  168.             yield "                                        </div>
  169.                                     </div>
  170.                                 </div>
  171.                                 <!-- /.Vendor img -->
  172.                                 <div class=\"col-xl-8 col-lg-8 col-md-12 col-sm-12 col-12 pl-0\">
  173.                                     <div class=\"vendor-content\">
  174.                                         <!-- Vendor Content -->
  175.                                         <h2 class=\"vendor-title\"><a href=\"";
  176.             // line 67
  177.             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->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse67), "subCategories", [], "any"falsefalsefalse67), 0, [], "array"falsefalsefalse67), "categories", [], "any"falsefalsefalse67), 0, [], "array"falsefalsefalse67), "slug", [], "any"falsefalsefalse67), "subCategorySlug" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse67), "subCategories", [], "any"falsefalsefalse67), 0, [], "array"falsefalsefalse67), "subCategorySlug", [], "any"falsefalsefalse67), "product_id" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse67), "id", [], "any"falsefalsefalse67), "productSlug" => CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse67), "productSlug", [], "any"falsefalsefalse67)]), "html"nulltrue);
  178.             yield "\" class=\"title\">";
  179.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse67), "name", [], "any"falsefalsefalse67), "html"nulltrue);
  180.             yield "</a></h2>
  181.                                         <p class=\"vendor-address\">
  182.                                             ";
  183.             // line 69
  184.             $context['_parent'] = $context;
  185.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse69), "departments", [], "any"falsefalsefalse69));
  186.             $context['_iterated'] = false;
  187.             $context['loop'] = [
  188.               'parent' => $context['_parent'],
  189.               'index0' => 0,
  190.               'index'  => 1,
  191.               'first'  => true,
  192.             ];
  193.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  194.                 $length count($context['_seq']);
  195.                 $context['loop']['revindex0'] = $length 1;
  196.                 $context['loop']['revindex'] = $length;
  197.                 $context['loop']['length'] = $length;
  198.                 $context['loop']['last'] = === $length;
  199.             }
  200.             foreach ($context['_seq'] as $context["_key"] => $context["department"]) {
  201.                 // line 70
  202.                 yield "                                                ";
  203.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["department"], "name", [], "any"falsefalsefalse70), "html"nulltrue);
  204.                 if ( !CoreExtension::getAttribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse70)) {
  205.                     yield ",";
  206.                 }
  207.                 // line 71
  208.                 yield "                                            ";
  209.                 $context['_iterated'] = true;
  210.                 ++$context['loop']['index0'];
  211.                 ++$context['loop']['index'];
  212.                 $context['loop']['first'] = false;
  213.                 if (isset($context['loop']['length'])) {
  214.                     --$context['loop']['revindex0'];
  215.                     --$context['loop']['revindex'];
  216.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  217.                 }
  218.             }
  219.             if (!$context['_iterated']) {
  220.                 // line 72
  221.                 yield "                                                Toute la France
  222.                                             ";
  223.             }
  224.             $_parent $context['_parent'];
  225.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['department'], $context['_parent'], $context['loop']);
  226.             $context array_intersect_key($context$_parent) + $_parent;
  227.             // line 74
  228.             yield "                                        </p>
  229.                                         <!-- /.Vendor meta -->
  230.                                     </div>
  231.                                     <div class=\"vendor-meta m-0\">
  232.                                         <div class=\"vendor-meta-item vendor-meta-item-bordered\">
  233.                                         <span class=\"vendor-price\">
  234.                                         ";
  235.             // line 80
  236.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse80), "price", [], "any"falsefalsefalse80), 2"."), "html"nulltrue);
  237.             yield "€
  238.                                         </span>
  239.                                             <span class=\"vendor-text\">Prix</span></div>
  240.                                         <div class=\"vendor-meta-item vendor-meta-item-bordered\">
  241.                                         <span class=\"vendor-guest\">
  242.                                               ";
  243.             // line 85
  244.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse85), "quantity", [], "any"falsefalsefalse85), "html"nulltrue);
  245.             yield "
  246.                                          </span>
  247.                                             <span class=\"vendor-text\">Quantité restante</span>
  248.                                         </div>
  249.                                         ";
  250.             // line 89
  251.             $context["notes"] = 0;
  252.             // line 90
  253.             yield "                                        ";
  254.             $context['_parent'] = $context;
  255.             $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse90), "avis", [], "any"falsefalsefalse90));
  256.             foreach ($context['_seq'] as $context["_key"] => $context["avi"]) {
  257.                 // line 91
  258.                 yield "                                            ";
  259.                 $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"falsefalsefalse91));
  260.                 // line 92
  261.                 yield "                                        ";
  262.             }
  263.             $_parent $context['_parent'];
  264.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['avi'], $context['_parent'], $context['loop']);
  265.             $context array_intersect_key($context$_parent) + $_parent;
  266.             // line 93
  267.             yield "                                        ";
  268.             $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->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse93), "avis", [], "any"falsefalsefalse93)))) : (0));
  269.             // line 94
  270.             yield "                                        <div class=\"vendor-meta-item vendor-meta-item-bordered\">
  271.                                         <span class=\"rating-star\">
  272.                                             ";
  273.             // line 96
  274.             $context['_parent'] = $context;
  275.             $context['_seq'] = CoreExtension::ensureTraversable(range(15));
  276.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  277.                 // line 97
  278.                 yield "                                                ";
  279.                 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); })()))) {
  280.                     // line 98
  281.                     yield "                                                    <i class=\"fa fa-star rated\"></i>
  282.                                                 ";
  283.                 } else {
  284.                     // line 100
  285.                     yield "                                                    <i class=\"fa fa-star rate-mute\"></i>
  286.                                                 ";
  287.                 }
  288.                 // line 102
  289.                 yield "                                            ";
  290.             }
  291.             $_parent $context['_parent'];
  292.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  293.             $context array_intersect_key($context$_parent) + $_parent;
  294.             // line 103
  295.             yield "                                    </span>
  296.                                             <span class=\"rating-count vendor-text\">(";
  297.             // line 104
  298.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["productPercent"], "product", [], "any"falsefalsefalse104), "avis", [], "any"falsefalsefalse104)), "html"nulltrue);
  299.             yield ")</span></div>
  300.                                     </div>
  301.                                     <!-- /.Vendor Content -->
  302.                                 </div>
  303.                             </div>
  304.                         </div>
  305.                     ";
  306.             $context['_iterated'] = true;
  307.         }
  308.         if (!$context['_iterated']) {
  309.             // line 111
  310.             yield "                        <div class=\"vendor-thumbnail list-view p-4\">Aucun service correspondant</div>
  311.                     ";
  312.         }
  313.         $_parent $context['_parent'];
  314.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['productPercent'], $context['_parent'], $context['loop']);
  315.         $context array_intersect_key($context$_parent) + $_parent;
  316.         // line 113
  317.         yield "
  318.                     <!-- /.paginations -->
  319.                 </div>
  320.                 <!-- sidebar-section -->
  321.                 <div class=\"col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12\">
  322.                     <div class=\"sidebar-venue\" >
  323.                         <div class=\"card\">
  324.                             <div class=\"card-body\">
  325.                                 <form method=\"post\" action=\"";
  326.         // line 121
  327.         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"falsefalsefalse121)]), "html"nulltrue);
  328.         yield "\" id=\"form_add_bascket\">
  329.                                     <div class=\"form-group\">
  330.                                         <label for=\"quantity_product\">Prix du pack : </label><br>
  331.                                         <div class=\"quantity buttons_added\">
  332.                                             <span style=\"color:#A066F2;font-size:1.4em\">";
  333.         // line 125
  334.         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"falsefalsefalse125), 2"."), "html"nulltrue);
  335.         yield "€</span>
  336.                                         </div>
  337.                                     </div>
  338.                                     <div class=\"form-group mt-5\">
  339.                                         ";
  340.         // line 129
  341.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse129), "get", ["packs"], "method"falsefalsefalse129) == 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"falsefalsefalse129))) {
  342.             // line 130
  343.             yield "                                            <button type=\"submit\" class=\"btn btn-rounded btn-danger mt-3\" id=\"btn_add\">Supprimer du panier</button>
  344.                                         ";
  345.         } else {
  346.             // line 132
  347.             yield "                                            <button type=\"submit\" class=\"btn btn-rounded btn-primary mt-3\" id=\"btn_add\">Ajouter au panier</button>
  348.                                         ";
  349.         }
  350.         // line 134
  351.         yield "                                    </div>
  352.                                     <div id=\"message_form\"></div>
  353.                                 </form>
  354.                             </div>
  355.                         </div>
  356.                     </div>
  357.                 </div>
  358.                 <!-- /.sidebar-section -->
  359.             </div>
  360.         </div>
  361.     </div>
  362. ";
  363.         
  364.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  365.         
  366.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  367.         return; yield '';
  368.     }
  369.     // line 148
  370.     public function block_javascript($context, array $blocks = [])
  371.     {
  372.         $macros $this->macros;
  373.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  374.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  375.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  376.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  377.         // line 149
  378.         yield from $this->yieldParentBlock("javascript"$context$blocks);
  379.         yield "
  380. <script>
  381. document.addEventListener('DOMContentLoaded', function() {
  382.     const form = document.getElementById('form_add_bascket');
  383.     form.addEventListener('submit', (e) => {
  384.         e.preventDefault();
  385.         let form = e.target;
  386.         const formData = new FormData(form);
  387.         fetch(form.action, { method: form.method, body: formData })
  388.             .then(response => response.json())
  389.             .then(data => {
  390.                 if (data.message === 'ok') {
  391.                     if (data.response === 'added') {
  392.                         const btnAdd = document.getElementById('btn_add');
  393.                         btnAdd.classList.replace('btn-primary', 'btn-danger');
  394.                         btnAdd.textContent = 'Supprimer du panier';
  395.                         const msgElt = document.getElementById('message_form');
  396.                         msgElt.classList.add('text-success');
  397.                         msgElt.classList.add('text-center');
  398.                         msgElt.textContent = 'Produit ajouté au panier !';
  399.                     } else {
  400.                         const btnAdd = document.getElementById('btn_add');
  401.                         btnAdd.classList.replace('btn-danger', 'btn-primary');
  402.                         btnAdd.textContent = 'Ajouter au panier';
  403.                         const msgElt = document.getElementById('message_form');
  404.                         msgElt.classList.add('text-success');
  405.                         msgElt.classList.add('text-center');
  406.                         msgElt.textContent = 'Produit supprimé du panier !';
  407.                     }
  408.                 }
  409.             });
  410.         return false;
  411.     })
  412. })
  413. </script>
  414. ";
  415.         
  416.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  417.         
  418.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  419.         return; yield '';
  420.     }
  421.     /**
  422.      * @codeCoverageIgnore
  423.      */
  424.     public function getTemplateName()
  425.     {
  426.         return "front/pack/single.html.twig";
  427.     }
  428.     /**
  429.      * @codeCoverageIgnore
  430.      */
  431.     public function isTraitable()
  432.     {
  433.         return false;
  434.     }
  435.     /**
  436.      * @codeCoverageIgnore
  437.      */
  438.     public function getDebugInfo()
  439.     {
  440.         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,);
  441.     }
  442.     public function getSourceContext()
  443.     {
  444.         return new Source("{% extends 'base_front.html.twig' %}
  445. {% block meta %}
  446.     <title>Produits du pack {{ pack.name }}</title>
  447.     <meta name=\"description\" content=\"le {{ pack.name }} contient {{ pack.products|length }} produits à un prix attractif.\">
  448. {% endblock %}
  449. {% block body %}
  450.     <div class=\"page-header\" style=\"background: url({{ asset('images/background-page-header.jpg') }}) no-repeat center;background-size: cover\">
  451.         <div class=\"container\">
  452.             <div class=\"row\">
  453.                 <!-- page caption -->
  454.                 <div class=\"col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 \">
  455.                     <div class=\"page-caption\">
  456.                         <h1 class=\"page-title\">Pack {{ pack.name }}</h1>
  457.                     </div>
  458.                 </div>
  459.                 <!-- /.page caption -->
  460.             </div>
  461.         </div>
  462.         <!-- page caption -->
  463.         <div class=\"page-breadcrumb\">
  464.             <div class=\"container\">
  465.                 <div class=\"row\">
  466.                     <nav aria-label=\"breadcrumb\">
  467.                         <ol class=\"breadcrumb\">
  468.                             <li class=\"breadcrumb-item\"><a href=\"{{ path('front_home') }}\" class=\"breadcrumb-link\">Accueil</a></li>
  469.                             <li class=\"breadcrumb-item active text-white\" aria-current=\"page\">Contenu du pack {{ pack.name }}</li>
  470.                         </ol>
  471.                     </nav>
  472.                 </div>
  473.             </div>
  474.         </div>
  475.         <!-- page breadcrumb -->
  476.     </div>
  477.     <!-- /.page-header -->
  478.     <!-- vendor-section -->
  479.     <div class=\"content\">
  480.         <div class=\"container\">
  481.             <div class=\"row\">
  482.                 <div class=\"col-xl-8 col-lg-8 col-md-7 col-sm-12 col-12\">
  483.                     <h3>Ce pack contient les produits suivants :</h3>
  484.                     {% for productPercent in pack.productPercents %}
  485.                         <div class=\"vendor-thumbnail list-view\">
  486.                             <!-- Vendor thumbnail -->
  487.                             <div class=\"row\">
  488.                                 <div class=\"col-xl-4 col-lg-4 col-md-12 col-sm-12 col-12 border-right pr-0\">
  489.                                     <div class=\"vendor-img\">
  490.                                         <!-- Vendor img -->
  491.                                         <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>
  492.                                         <div class=\"wishlist-sign\">
  493.                                             {% if app.user and app.user.roles == ['ROLE_USER'] %}
  494.                                                 {% set isWish = filter_service.getIfIsWish(app.user, productPercent.product) %}
  495.                                                 {% if isWish %}
  496.                                                     <a href=\"#\" class=\"btn-wishlist\" style=\"background-color:#ff4d4d;\"><i class=\"fa fa-heart\" style=\"color:#fff\"></i></a>
  497.                                                 {% else %}
  498.                                                     <a href=\"#\" class=\"btn-wishlist\"><i class=\"fa fa-heart\"></i></a>
  499.                                                 {% endif %}
  500.                                             {% endif %}
  501.                                         </div>
  502.                                     </div>
  503.                                 </div>
  504.                                 <!-- /.Vendor img -->
  505.                                 <div class=\"col-xl-8 col-lg-8 col-md-12 col-sm-12 col-12 pl-0\">
  506.                                     <div class=\"vendor-content\">
  507.                                         <!-- Vendor Content -->
  508.                                         <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>
  509.                                         <p class=\"vendor-address\">
  510.                                             {% for department in productPercent.product.departments %}
  511.                                                 {{ department.name }}{% if not loop.last %},{% endif %}
  512.                                             {% else %}
  513.                                                 Toute la France
  514.                                             {% endfor %}
  515.                                         </p>
  516.                                         <!-- /.Vendor meta -->
  517.                                     </div>
  518.                                     <div class=\"vendor-meta m-0\">
  519.                                         <div class=\"vendor-meta-item vendor-meta-item-bordered\">
  520.                                         <span class=\"vendor-price\">
  521.                                         {{ productPercent.product.price|number_format(2, '.') }}€
  522.                                         </span>
  523.                                             <span class=\"vendor-text\">Prix</span></div>
  524.                                         <div class=\"vendor-meta-item vendor-meta-item-bordered\">
  525.                                         <span class=\"vendor-guest\">
  526.                                               {{ productPercent.product.quantity }}
  527.                                          </span>
  528.                                             <span class=\"vendor-text\">Quantité restante</span>
  529.                                         </div>
  530.                                         {% set notes = 0 %}
  531.                                         {% for avi in productPercent.product.avis %}
  532.                                             {% set notes = notes + avi.globalNote %}
  533.                                         {% endfor %}
  534.                                         {% set noteTotal = (notes > 0) ? notes / productPercent.product.avis|length : 0 %}
  535.                                         <div class=\"vendor-meta-item vendor-meta-item-bordered\">
  536.                                         <span class=\"rating-star\">
  537.                                             {% for i in 1..5 %}
  538.                                                 {% if i < noteTotal %}
  539.                                                     <i class=\"fa fa-star rated\"></i>
  540.                                                 {% else %}
  541.                                                     <i class=\"fa fa-star rate-mute\"></i>
  542.                                                 {% endif %}
  543.                                             {% endfor %}
  544.                                     </span>
  545.                                             <span class=\"rating-count vendor-text\">({{ productPercent.product.avis|length }})</span></div>
  546.                                     </div>
  547.                                     <!-- /.Vendor Content -->
  548.                                 </div>
  549.                             </div>
  550.                         </div>
  551.                     {% else %}
  552.                         <div class=\"vendor-thumbnail list-view p-4\">Aucun service correspondant</div>
  553.                     {% endfor %}
  554.                     <!-- /.paginations -->
  555.                 </div>
  556.                 <!-- sidebar-section -->
  557.                 <div class=\"col-xl-3 col-lg-3 col-md-3 col-sm-12 col-12\">
  558.                     <div class=\"sidebar-venue\" >
  559.                         <div class=\"card\">
  560.                             <div class=\"card-body\">
  561.                                 <form method=\"post\" action=\"{{ path('front_product_add_pack_basket', {'id': pack.id}) }}\" id=\"form_add_bascket\">
  562.                                     <div class=\"form-group\">
  563.                                         <label for=\"quantity_product\">Prix du pack : </label><br>
  564.                                         <div class=\"quantity buttons_added\">
  565.                                             <span style=\"color:#A066F2;font-size:1.4em\">{{ pack.price|number_format(2, '.') }}€</span>
  566.                                         </div>
  567.                                     </div>
  568.                                     <div class=\"form-group mt-5\">
  569.                                         {% if app.session.get('packs') == pack.id %}
  570.                                             <button type=\"submit\" class=\"btn btn-rounded btn-danger mt-3\" id=\"btn_add\">Supprimer du panier</button>
  571.                                         {% else %}
  572.                                             <button type=\"submit\" class=\"btn btn-rounded btn-primary mt-3\" id=\"btn_add\">Ajouter au panier</button>
  573.                                         {% endif %}
  574.                                     </div>
  575.                                     <div id=\"message_form\"></div>
  576.                                 </form>
  577.                             </div>
  578.                         </div>
  579.                     </div>
  580.                 </div>
  581.                 <!-- /.sidebar-section -->
  582.             </div>
  583.         </div>
  584.     </div>
  585. {% endblock %}
  586. {% block javascript %}
  587. {{ parent() }}
  588. <script>
  589. document.addEventListener('DOMContentLoaded', function() {
  590.     const form = document.getElementById('form_add_bascket');
  591.     form.addEventListener('submit', (e) => {
  592.         e.preventDefault();
  593.         let form = e.target;
  594.         const formData = new FormData(form);
  595.         fetch(form.action, { method: form.method, body: formData })
  596.             .then(response => response.json())
  597.             .then(data => {
  598.                 if (data.message === 'ok') {
  599.                     if (data.response === 'added') {
  600.                         const btnAdd = document.getElementById('btn_add');
  601.                         btnAdd.classList.replace('btn-primary', 'btn-danger');
  602.                         btnAdd.textContent = 'Supprimer du panier';
  603.                         const msgElt = document.getElementById('message_form');
  604.                         msgElt.classList.add('text-success');
  605.                         msgElt.classList.add('text-center');
  606.                         msgElt.textContent = 'Produit ajouté au panier !';
  607.                     } else {
  608.                         const btnAdd = document.getElementById('btn_add');
  609.                         btnAdd.classList.replace('btn-danger', 'btn-primary');
  610.                         btnAdd.textContent = 'Ajouter au panier';
  611.                         const msgElt = document.getElementById('message_form');
  612.                         msgElt.classList.add('text-success');
  613.                         msgElt.classList.add('text-center');
  614.                         msgElt.textContent = 'Produit supprimé du panier !';
  615.                     }
  616.                 }
  617.             });
  618.         return false;
  619.     })
  620. })
  621. </script>
  622. {% endblock %}
  623. ""front/pack/single.html.twig""/var/www/vhosts/hobbiinn.com/httpdocs/providdersvacance/templates/front/pack/single.html.twig");
  624.     }
  625. }