<?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/command/basket.html.twig */
class __TwigTemplate_cb2116a5dc245b04e2ae0d9b28f576dab564f5b36c997d13b998b80447a2ebf8 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'meta' => [$this, 'block_meta'],
'style' => [$this, 'block_style'],
'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/command/basket.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/command/basket.html.twig"));
$this->parent = $this->loadTemplate("base_front.html.twig", "front/command/basket.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 "\t<title>Mon panier</title>
\t<meta name=\"description\" content=\"";
// line 5
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 5, $this->source); })())), "html", null, true);
yield " produits pour le moment\">
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// line 8
public function block_style($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", "style"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "style"));
// line 9
yield "\t<style>
\t\t.indicationSupp:hover {
\t\t\t
\t\t}
\t\t.inputQtyOpt {
\t\t\twidth: 63px;
\t\t\theight: 39px;
\t\t\tpadding: 0 5px;
\t\t\ttext-align: center;
\t\t\tbackground-color: transparent;
\t\t\tborder: 1px solid #efefef;
\t\t}
\t\t.imgOptModal {
\t\t\theight:50px;
\t\t\tborder-radius:2px
\t\t}
\t\t.modifProdSess {
\t\t\tcolor: white !important;
\t\t\tdisplay: flex;
\t\t\talign-items: center;
\t\t}
\t\t\t\t#MyLoading {
\t\t\tvisibility: hidden;
\t\t}
\t\t#MyLoading.MyShow {
\t\t\tvisibility: visible;
\t\t}
\t\t@media screen and (max-width: 576px) {
\t\t\t.modifProdSess {
\t\t\t\tpadding: 8px 7px;
\t\t\t\tfont-size: 7px;
\t\t\t}
\t\t\t.indicationSupp {
\t\t\t\tpadding: 10px 15px;
\t\t\t}
\t\t}
\t\t\t\t@media screen and (min-width: 800px) {\t
\t\t\t.myWidth {
\t\t\t\tmax-width: 800px;
\t\t\t}
\t\t}
\t\t\t\t.labold {
\t\t\tfont-weight: 500;
\t\t\tfont-size: 18px;
\t\t}
\t\t.mt9 {
\t\t\tmargin-top: 9px;
\t\t}
\t\t.myPadding {
\t\t\tpadding: 8px 0px;
\t\t}
\t</style>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// line 66
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 67
yield "\t<!-- Modal -->
\t";
// line 70
yield "
\t<div class=\"modal fade\" id=\"modalOptionGP\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLongTitle\" aria-hidden=\"true\">
\t\t<div class=\"modal-dialog myWidth\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t";
// line 75
yield "\t\t\t\t\t<div class=\"modal-header\">
\t\t\t\t\t\t<h5 class=\"modal-title\" id=\"\">Modifier les groupes d'options</h5>
\t\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
\t\t\t\t\t\t\t<span aria-hidden=\"true\">×</span>
\t\t\t\t\t\t</button>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t\t<div class=\"row\" id=\"valeurgropOption\">
\t\t\t\t\t\t\t";
// line 87
yield "\t\t\t\t\t\t\t\t";
// line 89
yield "\t\t\t\t\t\t\t
\t\t\t\t\t\t\t";
// line 91
yield "\t\t\t\t\t\t\t ";
// line 142
yield "\t\t\t\t\t\t\t";
// line 143
yield "
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t";
// line 148
yield "\t\t\t\t\t<div class=\"modal-footer\">
\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Fermer</button>
\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\" id=\"\" onclick=\"validechoiModalGroupoption()\">Ok</button>
\t\t\t\t\t</div>
\t\t\t\t";
// line 153
yield "\t\t\t</div>
\t\t</div>
\t</div>
\t";
// line 158
yield "
\t";
// line 160
yield "
\t<div class=\"modal fade\" id=\"modifAchatFairePart\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLongTitle\" aria-hidden=\"true\">
\t";
// line 162
$context["idSessOpt"] = 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.', 162, $this->source); })()), "session", [], "any", false, false, false, 162), "get", ["idProduit"], "method", false, false, false, 162);
// line 163
yield "\t
\t\t<div class=\"modal-dialog\" role=\"document\" style=\"max-width: 700px\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<form action=\"";
// line 166
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("update_option");
yield "\" method=\"POST\">
\t\t\t\t\t<div class=\"modal-header\">
\t\t\t\t\t\t<h5 class=\"modal-title\" id=\"exampleModalLongTitle\">Modifier les options</h5>
\t\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
\t\t\t\t\t\t\t<span aria-hidden=\"true\">×</span>
\t\t\t\t\t\t</button>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t\t";
// line 175
yield "\t\t\t\t\t\t<div class=\"containerOptionFP pl-3 row\">
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t<div class=\"col-lg-5 col-12\">
\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"id_produit\">
\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"price_produit\">
\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"qte_produit\">
\t\t\t\t\t\t\t\t<div id=\"tousOptions\"></div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"col-lg-7 col-12\">
\t\t\t\t\t\t\t <div class=\"m-info\">Si vous souhaitez ajouter une option différente de celle d'avant, cochez votre choix et modifiez-le si nécessaire</div>
\t\t\t\t\t\t\t <div class=\"forme_options\" style=\"display: none !important\">
\t\t\t\t\t\t\t\t<form action=\"\">
\t\t\t\t\t\t\t\t <input type=\"hidden\" id=\"id_optionFP\">
\t\t\t\t\t\t\t\t <input type=\"hidden\" id=\"name_optionFP\">
\t\t\t\t\t\t\t\t <input type=\"hidden\" id=\"image_optionFP\">
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_color\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_color\">Couleur</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_color\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_format\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_format\">Format</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_format\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_finition\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_finition\">Finition</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_finition\" class=\"wide form-control\">\t
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_papier\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_papier\">Papier</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_papier\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_etiquette\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_etiquette\">Etiquette</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_etiquette\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_ruban\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_ruban\">Ruban</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_ruban\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_quantite\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_quantite\">Quantite</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_quantite\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"validerModifFP mt-3\">
\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-secondary\" type=\"button\" onclick=\"Anulleroption()\">Annuler</button>
\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-primary\" type=\"button\" onclick=\"validechoioption()\">Valider</button>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</form>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t";
// line 235
yield "\t\t\t\t\t<!-- form modifsession prod -->
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"modal-footer\">
\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Fermer</button>
\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\" onclick=\"validechoiModaloption()\">Modifier</button>
\t\t\t\t\t</div>
\t\t\t\t</form>
\t\t\t</div>
\t\t</div>
\t</div>
\t";
// line 246
yield "\t
\t<div class=\"modal fade\" id=\"modifAchatProd\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLongTitle\" aria-hidden=\"true\">
\t";
// line 249
$context["idSessOpt"] = 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.', 249, $this->source); })()), "session", [], "any", false, false, false, 249), "get", ["idProduit"], "method", false, false, false, 249);
// line 250
yield "\t
\t\t<div class=\"modal-dialog\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<form action=\"";
// line 253
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("update_option");
yield "\" method=\"POST\">
\t\t\t\t\t<div class=\"modal-header\">
\t\t\t\t\t\t<h5 class=\"modal-title\" id=\"exampleModalLongTitle\">Modifier les options</h5>
\t\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
\t\t\t\t\t\t\t<span aria-hidden=\"true\">×</span>
\t\t\t\t\t\t</button>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<!-- form modifsession prod -->
\t\t\t\t\t\t";
// line 270
yield "\t\t\t\t\t\t<span class=\"font-weight-bold\">Options disponibles :</span><span id=\"MyLoading\"> Chargement en cours...</span>
\t\t\t\t\t\t<div class=\"containerOption pl-3 row\">
\t\t\t\t\t\t\t<div class=\"oneOption col-12 row\">
\t\t\t\t\t\t\t\t<div class=\"col-8\">
\t\t\t\t\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"custom-checkbox\" style=\"position: relative\">
\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" data-price=\"\" name=\"\" value=\"\" class=\"custom-control-input\" id=\"checkbo\">
\t\t\t\t\t\t\t\t\t\t<label class=\"custom-control-label\" for=\"checkbo\">
\t\t\t\t\t\t\t\t\t\t\t<strong style=\"margin-left: 31px;\">10 €</strong>
\t\t\t\t\t\t\t\t\t\t\t<span>-
\t\t\t\t\t\t\t\t\t\t\tName option</span>
\t\t\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t<div style=\"height:36px\"></div>
\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"\" id=\"\" class=\"inputQtyOpt\" min=\"1\" value=\"1\"/>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"oneOption col-12 row\">
\t\t\t\t\t\t\t\t<div class=\"col-8\">
\t\t\t\t\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"custom-checkbox\" style=\"position: relative\">
\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" data-price=\"\" name=\"\" value=\"\" class=\"custom-control-input\" id=\"checkbo1\">
\t\t\t\t\t\t\t\t\t\t<label class=\"custom-control-label\" for=\"checkbo1\">
\t\t\t\t\t\t\t\t\t\t\t<strong style=\"margin-left: 31px;\">10 €</strong>
\t\t\t\t\t\t\t\t\t\t\t-
\t\t\t\t\t\t\t\t\t\t\tName option</label>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t<div style=\"height:36px\"></div>
\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"\" id=\"\" class=\"inputQtyOpt\" min=\"1\" value=\"1\"/>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"oneOption col-12 row\">
\t\t\t\t\t\t\t\t<div class=\"col-8\">
\t\t\t\t\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"custom-checkbox\" style=\"position: relative\">
\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" data-price=\"\" name=\"\" value=\"\" class=\"custom-control-input\" id=\"checkbo2\">
\t\t\t\t\t\t\t\t\t\t<label class=\"custom-control-label\" for=\"checkbo2\">
\t\t\t\t\t\t\t\t\t\t\t<strong style=\"margin-left: 31px;\">10 €</strong>
\t\t\t\t\t\t\t\t\t\t\t-
\t\t\t\t\t\t\t\t\t\t\tName option</label>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t<div style=\"height:36px\"></div>
\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"\" id=\"\" class=\"inputQtyOpt\" min=\"1\" value=\"1\"/>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t";
// line 345
yield "\t\t\t\t\t<!-- form modifsession prod -->
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"modal-footer\">
\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Fermer</button>
\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\">Modifier</button>
\t\t\t\t\t</div>
\t\t\t\t";
// line 353
yield "\t\t\t\t</form>
\t\t\t</div>
\t\t</div>
\t</div>
\t
\t<!-- Modal -->
\t<div class=\"content mt-5 mb-5\" style=\"margin-bottom:100px!important\">
\t\t<div class=\"container\">
\t\t\t<div class=\"row mb-5\">
\t\t\t\t<div class=\"tab-pane fade active show\" id=\"allguest\" role=\"tabpanel\" aria-labelledby=\"allguest-tab\" style=\"width:100%\">
\t\t\t\t\t<div class=\"card-body row justify-content-between\">
\t\t\t\t\t\t<h3>Mon panier (";
// line 365
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 365, $this->source); })())), "html", null, true);
yield "
\t\t\t\t\t\t\tproduit
\t\t\t\t\t\t\t";
// line 367
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 367, $this->source); })())) > 1)) {
yield "s
\t\t\t\t\t\t\t";
}
// line 368
yield ")</h3>
\t\t\t\t\t\t<a href=\"";
// line 369
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pdf_generate");
yield " \" class=\"btn btn-primary float-right\">Télécharger mon devis</a>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"table-responsive\" style=\"width:100%\">
\t\t\t\t\t\t<table class=\"table mt-4\">
\t\t\t\t\t\t\t<thead>
\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-event\">Designation</th>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-estimate\">Aperçu</th>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-estimate\">Prix à l'unité</th>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-actual\">Quantité</th>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-paid\">Total produit</th>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-paid\"></th>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t</thead>
\t\t\t\t\t\t\t<tbody>
\t\t\t\t\t\t\t\t";
// line 384
if ((isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 384, $this->source); })())) {
// line 385
yield "\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t<td>";
// line 386
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.', 386, $this->source); })()), "name", [], "any", false, false, false, 386), "html", null, true);
yield "</td>
\t\t\t\t\t\t\t\t\t\t<td><img src=\"";
// line 387
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, (isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 387, $this->source); })()), "image", [], "any", false, false, false, 387)), "html", null, true);
yield "\" style=\"height:50px;border-radius:2px\"></td>
\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">";
// line 389
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.', 389, $this->source); })()), "price", [], "any", false, false, false, 389), 2, "."), "html", null, true);
yield "€</span>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t<td>1</td>
\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">";
// line 393
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.', 393, $this->source); })()), "price", [], "any", false, false, false, 393), 2, "."), "html", null, true);
yield "€</span>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total\">
\t\t\t\t\t\t\t\t\t\t\t<a href=\"";
// line 396
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_my_basket_remove_pack", ["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.', 396, $this->source); })()), "id", [], "any", false, false, false, 396)]), "html", null, true);
yield "\" class=\"btn btn-rounded btn-default\">Supprimer du panier</a>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t";
}
// line 400
yield "\t\t\t\t\t\t\t\t";
$context["TotalPriceProduct"] = 0;
// line 401
yield "\t\t\t\t\t\t\t\t";
$context["totOpt"] = 0;
// line 402
yield "\t\t\t\t\t\t\t\t";
$context["totGpOpt"] = 0;
// line 403
yield "\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 403, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
// line 404
yield "\t\t\t\t\t\t\t\t\t";
$context["optionObjectByProd"] = 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.', 404, $this->source); })()), "getProductOptionByProduit", [CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 404)], "method", false, false, false, 404);
// line 405
yield "\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t";
// line 407
yield "\t\t\t\t\t\t\t\t\t\t<tr class=\"border-bottom\" style=\"border-top: 1px solid #dee2e6 !important;\">
\t\t\t\t\t\t\t\t\t\t<td>";
// line 408
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 408), "name", [], "any", false, false, false, 408), "html", null, true);
yield "
\t\t\t\t\t\t\t\t\t\t\t";
// line 409
$context["isClothing"] = null;
// line 410
yield "\t\t\t\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 410), "subCategories", [], "any", false, false, false, 410));
foreach ($context['_seq'] as $context["_key"] => $context["subcategory"]) {
// line 411
yield "\t\t\t\t\t\t\t\t\t\t\t\t";
if (CoreExtension::getAttribute($this->env, $this->source, $context["subcategory"], "isClothing", [], "any", false, false, false, 411)) {
// line 412
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t";
$context["isClothing"] = true;
// line 413
yield "\t\t\t\t\t\t\t\t\t\t\t\t";
}
// line 414
yield "\t\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['subcategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 415
yield "\t\t\t\t\t\t\t\t\t\t\t";
if ((isset($context["isClothing"]) || array_key_exists("isClothing", $context) ? $context["isClothing"] : (function () { throw new RuntimeError('Variable "isClothing" does not exist.', 415, $this->source); })())) {
// line 416
yield "\t\t\t\t\t\t\t\t\t\t\t\t<br><strong>Taille :
\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 417
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "size", [], "any", false, false, false, 417), "html", null, true);
yield "</strong>
\t\t\t\t\t\t\t\t\t\t\t";
}
// line 419
yield "
\t\t\t\t\t\t\t\t\t\t\t";
// line 420
$context["isColor"] = null;
// line 421
yield "\t\t\t\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 421), "subCategories", [], "any", false, false, false, 421));
foreach ($context['_seq'] as $context["_key"] => $context["subcategory"]) {
// line 422
yield "\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 423
if (CoreExtension::getAttribute($this->env, $this->source, $context["subcategory"], "isColor", [], "any", false, false, false, 423)) {
// line 424
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t";
$context["isColor"] = true;
// line 425
yield "\t\t\t\t\t\t\t\t\t\t\t\t";
}
// line 426
yield "\t\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['subcategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 427
yield "\t\t\t\t\t\t\t\t\t\t\t";
if ((isset($context["isColor"]) || array_key_exists("isColor", $context) ? $context["isColor"] : (function () { throw new RuntimeError('Variable "isColor" does not exist.', 427, $this->source); })())) {
// line 428
yield "\t\t\t\t\t\t\t\t\t\t\t\t<br><strong>Couleur :
\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 429
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "color", [], "any", false, false, false, 429), "html", null, true);
yield "</strong>
\t\t\t\t\t\t\t\t\t\t\t";
}
// line 431
yield "\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t";
// line 433
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 433), "photos", [], "any", false, false, false, 433), "first", [], "any", false, false, false, 433) != false)) {
// line 434
yield "\t\t\t\t\t\t\t\t\t\t\t\t<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["product"], "product", [], "any", false, false, false, 434), "photos", [], "any", false, false, false, 434), "first", [], "any", false, false, false, 434), "url", [], "any", false, false, false, 434)), "html", null, true);
yield "\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t\t";
} else {
// line 436
yield "\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/vecteezy_vector-gear-logo-design-with-multi-colors-range_6172776.jpg"), "html", null, true);
yield "\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t\t";
}
// line 438
yield "\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t";
// line 439
if (CoreExtension::getAttribute($this->env, $this->source, $context["product"], "promo", [], "any", false, false, false, 439)) {
// line 440
yield "\t\t\t\t\t\t\t\t\t\t\t";
$context["ProductPrice"] = (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 440), "price", [], "any", false, false, false, 440) - CoreExtension::getAttribute($this->env, $this->source, $context["product"], "promo", [], "any", false, false, false, 440));
// line 441
yield "\t\t\t\t\t\t\t\t\t\t";
} else {
// line 442
yield "\t\t\t\t\t\t\t\t\t\t\t";
$context["ProductPrice"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 442), "price", [], "any", false, false, false, 442);
// line 443
yield "\t\t\t\t\t\t\t\t\t\t";
}
// line 444
yield "\t\t\t\t\t\t\t\t\t\t<td class=\"estimate-total\">
\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 446
if (CoreExtension::getAttribute($this->env, $this->source, $context["product"], "promo", [], "any", false, false, false, 446)) {
// line 447
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t<small>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<del>";
// line 448
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["product"], "product", [], "any", false, false, false, 448), "price", [], "any", false, false, false, 448), 2, "."), "html", null, true);
yield "€</del>
\t\t\t\t\t\t\t\t\t\t\t\t\t</small>
\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>";
// line 450
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((isset($context["ProductPrice"]) || array_key_exists("ProductPrice", $context) ? $context["ProductPrice"] : (function () { throw new RuntimeError('Variable "ProductPrice" does not exist.', 450, $this->source); })()), 2, "."), "html", null, true);
yield "€</strong>
\t\t\t\t\t\t\t\t\t\t\t\t";
} else {
// line 452
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((isset($context["ProductPrice"]) || array_key_exists("ProductPrice", $context) ? $context["ProductPrice"] : (function () { throw new RuntimeError('Variable "ProductPrice" does not exist.', 452, $this->source); })()), 2, "."), "html", null, true);
yield "€
\t\t\t\t\t\t\t\t\t\t\t\t";
}
// line 454
yield "\t\t\t\t\t\t\t\t\t\t\t</span><br>
\t\t\t\t\t\t\t\t\t\t\t";
// line 455
if (CoreExtension::getAttribute($this->env, $this->source, $context["product"], "promo", [], "any", false, false, false, 455)) {
yield "(code promo -";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "promo", [], "any", false, false, false, 455), "html", null, true);
yield "€)
\t\t\t\t\t\t\t\t\t\t\t";
}
// line 457
yield "\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t";
// line 459
yield "\t\t\t\t\t\t\t\t\t\t<td class=\"actual-total\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "quantity", [], "any", false, false, false, 459), "html", null, true);
yield "</td>
\t\t\t\t\t\t\t\t\t\t";
// line 460
$context["TotalWithQuantity"] = (CoreExtension::getAttribute($this->env, $this->source, $context["product"], "quantity", [], "any", false, false, false, 460) * (isset($context["ProductPrice"]) || array_key_exists("ProductPrice", $context) ? $context["ProductPrice"] : (function () { throw new RuntimeError('Variable "ProductPrice" does not exist.', 460, $this->source); })()));
// line 461
yield "\t\t\t\t\t\t\t\t\t\t";
$context["TotalPriceProduct"] = ((isset($context["TotalPriceProduct"]) || array_key_exists("TotalPriceProduct", $context) ? $context["TotalPriceProduct"] : (function () { throw new RuntimeError('Variable "TotalPriceProduct" does not exist.', 461, $this->source); })()) + (isset($context["TotalWithQuantity"]) || array_key_exists("TotalWithQuantity", $context) ? $context["TotalWithQuantity"] : (function () { throw new RuntimeError('Variable "TotalWithQuantity" does not exist.', 461, $this->source); })()));
// line 462
yield "\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total\">
\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">";
// line 463
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((isset($context["TotalWithQuantity"]) || array_key_exists("TotalWithQuantity", $context) ? $context["TotalWithQuantity"] : (function () { throw new RuntimeError('Variable "TotalWithQuantity" does not exist.', 463, $this->source); })()), 2, "."), "html", null, true);
yield "€</span>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total d-flex justify-content-around\" style=\"column-gap: 5px;\">
\t\t\t\t\t\t\t\t\t\t\t<a href=\"";
// line 466
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_my_basket_remove_product", ["id" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 466), "id", [], "any", false, false, false, 466)]), "html", null, true);
yield "\" class=\"btn btn-rounded btn-danger indicationSupp\" title=\"Supprimer du panier\" style=\"font-size: 17px;display: flex;align-items: center;\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></a>
\t\t\t\t\t\t\t\t\t\t\t";
// line 468
yield "\t\t\t\t\t\t\t\t\t\t\t";
// line 469
yield "\t\t\t\t\t\t\t\t\t\t\t<!-- Button trigger modal -->
\t\t\t\t\t\t\t\t\t\t";
// line 470
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 470), "subCategories", [], "any", false, false, false, 470));
foreach ($context['_seq'] as $context["_key"] => $context["subcategory"]) {
// line 471
yield "\t\t\t\t\t\t\t\t\t\t\t";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["subcategory"], "subCategorySlug", [], "any", false, false, false, 471) != "faire-part")) {
// line 472
yield "\t\t\t\t\t\t\t\t\t\t\t\t<a onclick=\"getGroupOption(";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 472), "id", [], "any", false, false, false, 472), "html", null, true);
yield ")\" data-id=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 472), "id", [], "any", false, false, false, 472), "html", null, true);
yield "\" class=\"btn btn-rounded btn-default modifProdSess\" data-toggle=\"modal\" data-target=\"#modalOptionGP\">
\t\t\t\t\t\t\t\t\t\t\t\t\tAjouter des options
\t\t\t\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t\t\t\t";
} else {
// line 476
yield "\t\t\t\t\t\t\t\t\t\t\t\t<a onclick=\"ajouterOptions('";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 476), "id", [], "any", false, false, false, 476), "html", null, true);
yield "','";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "quantity", [], "any", false, false, false, 476), "html", null, true);
yield "','";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["ProductPrice"]) || array_key_exists("ProductPrice", $context) ? $context["ProductPrice"] : (function () { throw new RuntimeError('Variable "ProductPrice" does not exist.', 476, $this->source); })()), "html", null, true);
yield "','";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(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.', 476, $this->source); })()), "request", [], "any", false, false, false, 476), "getSchemeAndHttpHost", [], "method", false, false, false, 476), "html", null, true);
yield "');\" id=\"ajoutOption\" class=\"btn btn-rounded btn-default modifProdSess\" data-toggle=\"modal\">
\t\t\t\t\t\t\t\t\t\t\t\t\tAjouter des options
\t\t\t\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 480
yield "\t\t\t\t\t\t\t\t\t\t\t";
}
// line 481
yield "\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['subcategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 482
yield "
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t";
// line 486
yield "
\t\t\t\t\t\t\t\t\t";
// line 488
yield "
\t\t\t\t\t\t\t\t\t";
// line 489
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["product"], "product", [], "any", false, false, false, 489), "subCategories", [], "any", false, false, false, 489), "snapshot", [], "any", false, false, false, 489));
foreach ($context['_seq'] as $context["_key"] => $context["subCategories"]) {
// line 490
yield "\t\t\t\t\t\t\t\t\t\t";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["subCategories"], "subCategorySlug", [], "any", false, false, false, 490) != "faire-part")) {
// line 491
yield "\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t";
// line 492
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "options", [], "any", false, false, false, 492));
foreach ($context['_seq'] as $context["key"] => $context["option"]) {
// line 493
yield "\t\t\t\t\t\t\t\t\t\t\t\t";
$context["optionObject"] = 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.', 493, $this->source); })()), "getProductOption", [$context["key"]], "method", false, false, false, 493);
// line 494
yield "\t\t\t\t\t\t\t\t\t\t\t\t";
// line 495
yield "\t\t\t\t\t\t\t\t\t\t\t\t<tr class=\"\" style=\"background:#fff\">
\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"pl-4\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Option :</strong>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 498
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["optionObject"]) || array_key_exists("optionObject", $context) ? $context["optionObject"] : (function () { throw new RuntimeError('Variable "optionObject" does not exist.', 498, $this->source); })()), "name", [], "any", false, false, false, 498), "html", null, true);
yield "</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 503
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 507
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"estimate-total\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 510
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\"></span>
\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 513
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t<td></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 525
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 526
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total\"></td>
\t\t\t\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t";
// line 529
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable($context["option"]);
foreach ($context['_seq'] as $context["_key"] => $context["valOption"]) {
// line 530
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"pl-5\">";
// line 531
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["valOption"], "valeur", [], "array", false, false, false, 531), "html", null, true);
yield "</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"estimate-total\"><span class=\"total-amount\">";
// line 533
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["valOption"], "prix", [], "array", false, false, false, 533), "html", null, true);
yield " €</span></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>";
// line 534
((CoreExtension::getAttribute($this->env, $this->source, $context["valOption"], "qte", [], "array", false, false, false, 534)) ? (yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["valOption"], "qte", [], "array", false, false, false, 534), "html", null, true)) : (yield 1));
yield "</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 538
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
$context["totval"] = (CoreExtension::getAttribute($this->env, $this->source, $context["valOption"], "prix", [], "array", false, false, false, 538) * ((CoreExtension::getAttribute($this->env, $this->source, $context["valOption"], "qte", [], "array", false, false, false, 538)) ? (CoreExtension::getAttribute($this->env, $this->source, $context["valOption"], "qte", [], "array", false, false, false, 538)) : (1)));
// line 539
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"estimate-total\"><span class=\"total-amount\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["totval"]) || array_key_exists("totval", $context) ? $context["totval"] : (function () { throw new RuntimeError('Variable "totval" does not exist.', 539, $this->source); })()), "html", null, true);
yield " €</spna></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 540
$context["totGpOpt"] = ((isset($context["totGpOpt"]) || array_key_exists("totGpOpt", $context) ? $context["totGpOpt"] : (function () { throw new RuntimeError('Variable "totGpOpt" does not exist.', 540, $this->source); })()) + (isset($context["totval"]) || array_key_exists("totval", $context) ? $context["totval"] : (function () { throw new RuntimeError('Variable "totval" does not exist.', 540, $this->source); })()));
// line 541
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['valOption'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 543
yield "\t\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['option'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 544
yield "\t\t\t\t\t\t\t\t\t\t";
} else {
// line 545
yield "\t\t\t\t\t\t\t\t\t\t\t";
if (CoreExtension::getAttribute($this->env, $this->source, $context["product"], "options_farep", [], "any", true, true, false, 545)) {
// line 546
yield "\t\t\t\t\t\t\t\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["product"], "options_farep", [], "any", false, false, false, 546));
foreach ($context['_seq'] as $context["_key"] => $context["option"]) {
// line 547
yield "\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t<tr style=\"background:#fff\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"pl-4\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Option :</strong>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 551
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["option"], "nomoption", [], "any", false, false, false, 551), "html", null, true);
yield "
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 561
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</strong></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 564
if (CoreExtension::getAttribute($this->env, $this->source, $context["option"], "imageoption", [], "any", false, false, false, 564)) {
// line 565
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<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, $context["option"], "imageoption", [], "any", false, false, false, 565)), "html", null, true);
yield "\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
}
// line 567
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"estimate-total\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">";
// line 569
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, $context["option"], "price", [], "any", false, false, false, 569), 2, "."), "html", null, true);
yield "€</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 572
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 573
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"actual-total\">";
// line 574
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["option"], "quantite", [], "any", false, false, false, 574), "html", null, true);
yield "</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 575
$context["totqtyOpt"] = (CoreExtension::getAttribute($this->env, $this->source, $context["option"], "price", [], "any", false, false, false, 575) * CoreExtension::getAttribute($this->env, $this->source, $context["option"], "quantite", [], "any", false, false, false, 575));
// line 576
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">";
// line 577
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((isset($context["totqtyOpt"]) || array_key_exists("totqtyOpt", $context) ? $context["totqtyOpt"] : (function () { throw new RuntimeError('Variable "totqtyOpt" does not exist.', 577, $this->source); })()), 2, "."), "html", null, true);
yield "€</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
// line 579
$context["totOpt"] = ((isset($context["totOpt"]) || array_key_exists("totOpt", $context) ? $context["totOpt"] : (function () { throw new RuntimeError('Variable "totOpt" does not exist.', 579, $this->source); })()) + (isset($context["totqtyOpt"]) || array_key_exists("totqtyOpt", $context) ? $context["totqtyOpt"] : (function () { throw new RuntimeError('Variable "totqtyOpt" does not exist.', 579, $this->source); })()));
// line 580
yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total\"></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['option'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 584
yield "\t\t\t\t\t\t\t\t\t\t\t";
}
// line 585
yield "\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t";
}
// line 586
yield "\t
\t\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['subCategories'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 588
yield "\t\t\t\t\t\t\t\t\t";
// line 589
yield "\t\t\t\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 590
yield "
\t\t\t\t\t\t\t\t";
// line 591
if (((isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 591, $this->source); })()) || !Twig\Extension\CoreExtension::testEmpty((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 591, $this->source); })())))) {
// line 592
yield "\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t<td>TOTAL :</td>
\t\t\t\t\t\t\t\t\t\t<td></td>
\t\t\t\t\t\t\t\t\t\t<td></td>
\t\t\t\t\t\t\t\t\t\t<td></td>
\t\t\t\t\t\t\t\t\t\t";
// line 597
if ((isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 597, $this->source); })())) {
// line 598
yield "\t\t\t\t\t\t\t\t\t\t\t";
$context["TotalPriceProduct"] = ((isset($context["TotalPriceProduct"]) || array_key_exists("TotalPriceProduct", $context) ? $context["TotalPriceProduct"] : (function () { throw new RuntimeError('Variable "TotalPriceProduct" does not exist.', 598, $this->source); })()) + 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.', 598, $this->source); })()), "price", [], "any", false, false, false, 598));
// line 599
yield "\t\t\t\t\t\t\t\t\t\t";
}
// line 600
yield "\t\t\t\t\t\t\t\t\t\t";
$context["totOptions"] = ((isset($context["totOpt"]) || array_key_exists("totOpt", $context) ? $context["totOpt"] : (function () { throw new RuntimeError('Variable "totOpt" does not exist.', 600, $this->source); })()) + (isset($context["totGpOpt"]) || array_key_exists("totGpOpt", $context) ? $context["totGpOpt"] : (function () { throw new RuntimeError('Variable "totGpOpt" does not exist.', 600, $this->source); })()));
// line 601
yield "\t\t\t\t\t\t\t\t\t\t<td>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(((isset($context["TotalPriceProduct"]) || array_key_exists("TotalPriceProduct", $context) ? $context["TotalPriceProduct"] : (function () { throw new RuntimeError('Variable "TotalPriceProduct" does not exist.', 601, $this->source); })()) + (isset($context["totOptions"]) || array_key_exists("totOptions", $context) ? $context["totOptions"] : (function () { throw new RuntimeError('Variable "totOptions" does not exist.', 601, $this->source); })())), 2, "."), "html", null, true);
yield "€</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t";
}
// line 604
yield "\t\t\t\t\t\t\t\t";
if (( !(isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 604, $this->source); })()) && Twig\Extension\CoreExtension::testEmpty((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 604, $this->source); })())))) {
// line 605
yield "\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t<td>Aucun produit ajouté au panier</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t";
}
// line 609
yield "\t\t\t\t\t\t\t</tbody>
\t\t\t\t\t\t</table>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"card-footer\" style=\"height:70px\">
\t\t\t\t\t\t";
// line 613
if (((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 613, $this->source); })())) > 0) || !(null === (isset($context["pack"]) || array_key_exists("pack", $context) ? $context["pack"] : (function () { throw new RuntimeError('Variable "pack" does not exist.', 613, $this->source); })())))) {
// line 614
yield "\t\t\t\t\t\t\t";
if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ENTERPRISE") == false)) {
// line 615
yield "\t\t\t\t\t\t\t\t<div class=\"float-left\">
\t\t\t\t\t\t\t\t\t";
// line 616
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 616, $this->source); })()), 'form_start', ["attr" => ["class" => "form-inline"]]);
yield "
\t\t\t\t\t\t\t\t\t<div class=\"form-group\">
\t\t\t\t\t\t\t\t\t\t";
// line 618
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 618, $this->source); })()), "codePromo", [], "any", false, false, false, 618), 'widget');
yield "
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-default ml-3\">Valider</button>
\t\t\t\t\t\t\t\t\t";
// line 621
yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 621, $this->source); })()), 'form_end');
yield "
\t\t\t\t\t\t\t\t\t";
// line 622
if ((array_key_exists("isMessagePromo", $context) && (isset($context["isMessagePromo"]) || array_key_exists("isMessagePromo", $context) ? $context["isMessagePromo"] : (function () { throw new RuntimeError('Variable "isMessagePromo" does not exist.', 622, $this->source); })()))) {
// line 623
yield "\t\t\t\t\t\t\t\t\t\t<span style=\"color:green\">Code promo valide !</span>
\t\t\t\t\t\t\t\t\t";
}
// line 625
yield "\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"float-right\">
\t\t\t\t\t\t\t\t\t<a href=\"";
// line 627
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_command_livraison");
yield "\" class=\"btn btn-primary\">Commander</a>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t";
}
// line 630
yield "\t\t\t\t\t\t";
}
// line 631
yield "\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
// line 638
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 639
yield "\t<script>
\t\tfunction wcqib_refresh_quantity_increments() {
\t\t\tjQuery(\"div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)\").each(function (a, b) {
\t\t\t\tvar c = jQuery(b);
\t\t\t\tc.addClass(\"buttons_added\"),
\t\t\t\t\tc.children().first().before('<input type=\"button\" value=\"-\" class=\"minus\" />'),
\t\t\t\t\tc.children().last().after('<input type=\"button\" value=\"+\" class=\"plus\" />')
\t\t\t})
\t\t}
\t\tString.prototype.getDecimals || (String.prototype.getDecimals = function () {
\t\t\tvar a = this,
\t\t\t\tb = (\"\" + a).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?\$/);
\t\t\treturn b ? Math.max(0, (b[1] ? b[1].length : 0) - (b[2] ? + b[2] : 0)) : 0
\t\t}),
\t\t\tjQuery(document).ready(function () {
\t\t\t\twcqib_refresh_quantity_increments()
\t\t\t}),
\t\t\tjQuery(document).on(\"updated_wc_div\", function () {
\t\t\t\twcqib_refresh_quantity_increments()
\t\t\t}),
\t\t\tjQuery(document).on(\"click\", \".plus, .minus\", function () {
\t\t\t\tvar a = jQuery(this).closest(\".quantity\").find(\".qty\"),
\t\t\t\t\tb = parseFloat(a.val()),
\t\t\t\t\tc = parseFloat(a.attr(\"max\")),
\t\t\t\t\td = parseFloat(a.attr(\"min\")),
\t\t\t\t\te = a.attr(\"step\");
\t\t\t\tb && \"\" !== b && \"NaN\" !== b || (b = 0),
\t\t\t\t\t\"\" !== c && \"NaN\" !== c || (c = \"\"),
\t\t\t\t\t\"\" !== d && \"NaN\" !== d || (d = 0),
\t\t\t\t\t\"any\" !== e && \"\" !== e && void 0 !== e && \"NaN\" !== parseFloat(e) || (e = 1),
\t\t\t\t\tjQuery(this).is(\".plus\") ? c && b >= c ? a.val(c) : a.val((b + parseFloat(e)).toFixed(e.getDecimals())) : d && b <= d ? a.val(d) : b > 0 && a.val((b - parseFloat(e)).toFixed(e.getDecimals())),
\t\t\t\t\ta.trigger(\"change\")
\t\t\t});
\t</script>
\t<script>
\t\t\t\tconst loader = document.querySelector('#MyLoading');
\t\tfunction afficheLoading() {
\t\t\tloader.classList.add('MyShow');
\t\t}
\t\tfunction cacherLoading() {
\t\t\tloader.classList.remove('MyShow');
\t\t}
\t\t
\t\tconst containerOpt = document.querySelector('.containerOption');
\t\t
\t\t
\t\tfunction getOptionByIdProd(idProd) {
\t\t\tafficheLoading();
\t\t\t
\t\t\tconst data = {
\t\t\t\tidProd: idProd
\t\t\t};
\t\t\tlet datas = new FormData();
\t\t\tdatas.append(\"data\", JSON.stringify(data));
\t\t\tif (containerOpt.children) {
\t\t\t\tvar first = containerOpt.firstElementChild;
\t\t\t\twhile (first) {
\t\t\t\t\tfirst.remove();
\t\t\t\t\tfirst = containerOpt.firstElementChild;
\t\t\t\t}
\t\t\t}
\t\t\tfetch(`/get-option/\${idProd}`)
\t\t\t.then(response => response.json())
\t\t\t.then(data => {
\t\t\t\tcacherLoading();
\t\t\t\tconsole.log(data);
\t\t\t\tdata[0].map((item)=>{
\t\t\t\t\t//console.log(\"idOpt vao miditra\",item.id);
\t\t\t\t\tlet objQty = data[1].qty;
\t\t\t\t\tlet idProd = document.createElement('input');
\t\t\t\t\tidProd.type = \"hidden\";
\t\t\t\t\tidProd.value = data[2];
\t\t\t\t\tidProd.setAttribute('name','idProd');
\t\t\t\t\tlet oneOpt = document.createElement('div');
\t\t\t\t\toneOpt.classList.add('col-12');
\t\t\t\t\toneOpt.classList.add('row');
\t\t\t\t\tlet col8 = document.createElement('div');
\t\t\t\t\tcol8.classList.add('col-8');
\t\t\t\t\tlet row = document.createElement('div');
\t\t\t\t\trow.classList.add('row');
\t\t\t\t\tlet col4a = document.createElement('div');
\t\t\t\t\tcol4a.classList.add('col-4');
\t\t\t\t\tlet col4b = document.createElement('div');
\t\t\t\t\tcol4b.classList.add('col-4');
\t\t\t\t\tlet img1 = document.createElement('img');
\t\t\t\t\timg1.classList.add('imgOptModal');
\t\t\t\t\t// image
\t\t\t\t\tif (item.image1 == null){
\t\t\t\t\t\timg1.style.display = \"none\";
\t\t\t\t\t} else {
\t\t\t\t\t\timg1.src = `/upload/produits/\${item.image1}`;
\t\t\t\t\t}
\t\t\t\t\tlet img2 = document.createElement('img');
\t\t\t\t\timg2.classList.add('imgOptModal');
\t\t\t\t\tif (item.image2 == null){
\t\t\t\t\t\timg2.style.display = \"none\";
\t\t\t\t\t} else {
\t\t\t\t\t\timg2.src = `/upload/produits/\${item.image2}`;
\t\t\t\t\t}
\t\t\t\t\tlet customCheckBox = document.createElement('div');
\t\t\t\t\tcustomCheckBox.classList.add('custom-checkbox');
\t\t\t\t\tcustomCheckBox.style.position = \"relative\";
\t\t\t\t\tlet inputCheckBox = document.createElement('input');
\t\t\t\t\tinputCheckBox.type = \"checkbox\";
\t\t\t\t\tinputCheckBox.classList.add('custom-control-input');
\t\t\t\t\tinputCheckBox.classList.add('option-checkbox');
\t\t\t\t\tinputCheckBox.setAttribute('id',`idCheck\${item.id}`);
\t\t\t\t\tinputCheckBox.setAttribute('name',`options[\${item.id}]`);
\t\t\t\t\tinputCheckBox.setAttribute('value',`\${item.price}`);
\t\t\t\t\t// checked if already in session
\t\t\t\t\tfor (const idOpt in objQty) {
\t\t\t\t\t\tif(item.id == idOpt){
\t\t\t\t\t\t\tinputCheckBox.checked = true;
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t\tlet customControlLabel = document.createElement('label');
\t\t\t\t\tcustomControlLabel.classList.add('custom-control-label');
\t\t\t\t\tcustomControlLabel.setAttribute('for',`idCheck\${item.id}`);
\t\t\t\t\t
\t\t\t\t\tlet nameStrong = document.createElement('strong');
\t\t\t\t\tnameStrong.innerHTML = `\${item.price} €`;
\t\t\t\t\tnameStrong.style.marginLeft = \"31px\";
\t\t\t\t\tlet nameSpan = document.createElement('span');
\t\t\t\t\tnameSpan.innerHTML = `- \${item.name}`;
\t\t\t\t\tlet nameSpan2 = document.createElement('span');
\t\t\t\t\tnameSpan2.innerHTML = `<button type=\"button\">modif</button>`;
\t\t\t\t\tlet col4 = document.createElement('div');
\t\t\t\t\tcol4.classList.add('col-4');
\t\t\t\t\tlet myheight = document.createElement('div');
\t\t\t\t\tmyheight.style.height = \"36px\";
\t\t\t\t\tlet inputQty = document.createElement('input');
\t\t\t\t\tinputQty.type = \"number\";
\t\t\t\t\tinputQty.classList.add('inputQtyOpt');
\t\t\t\t\tinputQty.setAttribute('min','1');
\t\t\t\t\tinputQty.setAttribute('id',`QtyidCheck\${item.id}`);
\t\t\t\t\tinputQty.setAttribute('name',`QtyOption[\${item.id}]`);
\t\t\t\t\tinputQty.setAttribute('value','1');
\t\t\t\t\t// get value qty in session
\t\t\t\t\tfor (const idOpt in objQty) {
\t\t\t\t\t\tif(item.id == idOpt) {
\t\t\t\t\t\t\tinputQty.setAttribute('value',`\${objQty[idOpt]}`);
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t\tcol4.appendChild(myheight);
\t\t\t\t\tcol4.appendChild(inputQty);
\t\t\t\t\tcol4a.appendChild(img1);
\t\t\t\t\tcol4b.appendChild(img2);
\t\t\t\t\trow.appendChild(col4a);
\t\t\t\t\trow.appendChild(col4b);
\t\t\t\t\tcustomControlLabel.appendChild(nameStrong);
\t\t\t\t\tcustomControlLabel.appendChild(nameSpan);
\t\t\t\t\tcustomCheckBox.appendChild(inputCheckBox);
\t\t\t\t\tcustomCheckBox.appendChild(customControlLabel);
\t\t\t\t\tcol8.appendChild(row);
\t\t\t\t\tcol8.appendChild(customCheckBox);
\t\t\t\t\toneOpt.appendChild(idProd);
\t\t\t\t\toneOpt.appendChild(col8);
\t\t\t\t\toneOpt.appendChild(col4);
\t\t\t\t\tcontainerOpt.appendChild(oneOpt);
\t\t\t\t});
\t\t\t\t
\t\t\t\t/*let idp = document.createElement(\"p\");
\t\t\t\tidp.textContent = data;
\t\t\t\tcontainerOpt.appendChild(idp);*/
\t\t\t\t/*fetch('/get-option')
\t\t\t\t.then(obj => obj.json())
\t\t\t\t.then(objjs => console.log(objjs));*/
\t\t\t\tif(data) {
\t\t\t\t\tconst optionCheckbox = document.querySelectorAll('.option-checkbox');
\t\t\t\t\t
\t\t\t\t\tfor (var i = 0; i < optionCheckbox.length; i++) {
\t\t\t\t\t\tlet qtyOpt = document.getElementById(`Qty\${optionCheckbox[i].id}`);
\t\t\t\t\t\t// disable unchecked checkbox
\t\t\t\t\t\tif(!optionCheckbox[i].checked) {
\t\t\t\t\t\t\tqtyOpt.disabled = true;
\t\t\t\t\t\t\tqtyOpt.style.display = \"none\";
\t\t\t\t\t\t}
\t\t\t\t\t\toptionCheckbox[i].addEventListener('change', (optMod) => {
\t\t\t\t\t\t\tif (optMod.target.checked) {
\t\t\t\t\t\t\t\tqtyOpt.disabled = false;
\t\t\t\t\t\t\t\tqtyOpt.style.display = \"block\";
\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\tqtyOpt.disabled = true;
\t\t\t\t\t\t\t\tqtyOpt.style.display = \"none\";
\t\t\t\t\t\t\t}
\t\t\t\t\t\t})
\t\t\t\t\t}
\t\t\t\t}
\t\t\t});
\t\t}
\t</script>
\t<script>
\tfunction getGroupOption(id_prod) {
\t\t// console.log('kokokoko',url);
\t\tconsole.log('isID',id_prod);
\t\t// var id_product=314;
\t\t\$(\"#valeurgropOption\").html(\"\");
\t\tfetch(`/tous-options-groups/\${id_prod}`)
\t\t.then(response=> response.json())
\t\t.then(data=>{
\t\t\tconsole.log('tous option', data);
\t\t\t\$(\"#valeurgropOption\").append(data);
\t\t});
\t\t
\t}
\tfunction validechoiModalGroupoption() {
\t\t// \$(\"#modalOptionGP\").modal(\"hide\");
\t\t
\t\tvar url = window.location.href.split('/');
\t\tvar param_url = url[0]+'//'+url[2];
const formData = new FormData();
\t\tvar idProduit = \$('#id_produit').val();
\t\tconsole.log(\"id_porduit\",idProduit);
\t\t
\t\tvar goption= document.getElementsByClassName('goption');
\t\tvar labels =new Array();
\t\tfor (let i = 0; i < goption.length; i++) {
\t\t\tvar id_goption = goption[i].id.split(\"_\");
\t\t\tvar label= document.getElementsByClassName('label_'+id_goption[1]);
\t\t\tvar hidden= document.getElementsByClassName('hidden_'+id_goption[1]);
\t\t\tvar qte= document.getElementsByClassName('qte_'+id_goption[1]);
\t\t\t
\t\t\t// console.log('labeb',label);
\t\t\tvar compter=0;
\t\t\t
\t\t\tvar lab =new Array();
\t\t\tvar qt =new Array();
\t\t\tfor (let l = 0; l < label.length; l++) {
\t\t\tconsole.log('type', label[l].type);
\t\t\t\tif (label[l].type==\"checkbox\" && label[l].checked) {
\t\t\t\t\t
\t\t\t\t\tlab[compter] = hidden[l].value;
\t\t\t\t\tqt[compter] = qte[l].value;
\t\t\t\t\tcompter++
\t\t\t\t}
\t\t\t\tif (label[l].type==\"select-one\" && label[l].value != \"\") {
\t\t\t\t\tlab[compter] = label[l].value;
\t\t\t\t\tqt[compter] = qte[l].value;
\t\t\t\t\tcompter++
\t\t\t\t}
\t\t\t}
\t\t\tlabels[i] = {idoption: id_goption[1], labelo: lab, qte: qt};
\t\t}
\t\t\tconsole.log('valin label',labels);
\t\t\t
\t\t\t// localStorage.setItem('produit_groups', JSON.stringify(labels));
\t\t\tformData.append(\"modifGroupOption\", JSON.stringify(labels));
\t\t\tfetch(`\${param_url}/updateOptionGroups/\${idProduit}`, {
method: \"POST\",
body: formData
\t\t\t\t})
\t\t\t\t.then(response=> response.json())
\t\t\t\t.then(data=>{
\t\t\t\tconsole.log('data_io',data);
\t\t\t\tif (data.message == \"ok\") {
\t\t\t\t\twindow.location.reload();
\t\t\t\t}
\t\t\t\t\$(\"#modalOptionGP\").modal(\"hide\");
\t\t\t});
\t}
\t</script>
\t<script>
\tfunction ajouterOptions(idproduit,qte,prix,url) {
\t\t
\t\tfetch(`\${url}/tousoption/\${idproduit}`)
\t\t.then(response=> response.json())
\t\t.then(data=>{
\t\t\tvar templ=\"\";
\t\t\tvar tousId=[];
\t\t\tconsole.log(\"cocher\",data.opt_pre);
\t\t\tfor (let i = 0; i < data.options.length; i++) {
\t\t\t\ttousId.push(data.options[i].id);
\t\t\t\ttempl+=`<div class=\"oneOptionFP\">
\t\t\t\t\t\t\t<div class=\"row\">
\t\t\t\t
\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t<img id=\"optionbtn1img\" src=\"/upload/produits/\${data.options[i].image1}\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t<img id=\"optionbtn1img\" src=\"/upload/produits/\${data.options[i].image2}\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"custom-checkbox my-1\" style=\"position: relative\">
\t\t\t\t\t\t\t\t<input type=\"checkbox\" data-price=\"\${data.options[i].price}\" data-id=\"\${data.options[i].id}\" name=\"\" value=\"\" class=\"custom-control-input checkboxFP\" id=\"checkboFP_\${[i]}\">
\t\t\t\t\t\t\t\t<label class=\"custom-control-label position-relative\" for=\"checkboFP_\${[i]}\">
\t\t\t\t\t\t\t\t\t<strong style=\"margin-left: 31px;\">\${data.options[i].price}</strong>
\t\t\t\t\t\t\t\t\t<span>-
\t\t\t\t\t\t\t\t\t\${data.options[i].name}</span>
\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t<button class=\"btn\" id=\"boutonModif_\${[i]}\" onclick=\"modifOption('\${data.options[i].id}');\" type=\"button\" style=\"display: none\">Modifier</button>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>`;\t\t\t
\t\t\t}
\t\t
\t\t\t\$('#id_produit').val(idproduit);
\t\t\t\$('#price_produit').val(prix);
\t\t\t\$('#qte_produit').val(qte);
\t\t\t\$('#modifAchatFairePart').modal(\"show\");
\t\t\t\$('#tousOptions').html(templ);
\t\t\tfor (let k = 0; k < tousId.length; k++) {
\t\t\t console.log('atooo',tousId,tousId.length);
\t\t\t\tconsole.log('dataio',data.opt_pre);
\t\t\t\t// for (let a = 0; a < data.opt_pre.length; a++) {
\t\t\t\t\t// console.log('avvvvvi',data.opt_pre.length);
\t\t\t\t\tfor(var i in data.opt_pre) {
\t\t\t\t\t\tif(tousId[k]== data.opt_pre[i].idoption){
\t\t\t\t\t\t\tconsole.log(\"tonga aty ihany\");
\t\t\t\t\t\t\t\$('#checkboFP_'+[k]).prop('checked', true);\t
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t// }
\t\t\t\tfor (const key in \$('#checkboFP_'+[k])) {
\t\t\t\t\tif (\$('#checkboFP_'+[k])[key].checked) {\t
\t\t\t\t\t\t\$('#boutonModif_'+[k]).attr(\"style\", \"display: block !important\");
\t\t\t\t\t}
\t\t\t\t\telse{
\t\t\t\t\t\tvar evt = document.getElementById('checkboFP_'+[k]);
\t\t\t\t\t\tevt.addEventListener('change',(event) => {
\t\t\t\t\t\t\tif (event.target.checked) {
\t\t\t\t\t\t\t\t\$('#boutonModif_'+[k]).attr(\"style\", \"display: block !important\");
\t\t\t\t\t\t\t}else{
\t\t\t\t\t\t\t\t\$('#boutonModif_'+[k]).attr(\"style\", \"display: none !important\");
\t\t\t\t\t\t\t\t\$(\".forme_options\").attr(\"style\", \"display: none !important\")
\t\t\t\t\t\t\t\t\$(\".m-info\").attr(\"style\", \"display: block !important\")
\t\t\t\t\t\t\t}
\t\t\t\t\t\t});
\t\t\t\t\t}
\t\t\t\t}
\t\t\t}
\t\t});
\t}
\tfunction modifOption(idopt) {
\t\t
\t\tvar url = window.location.href.split('/');
\t\tvar param_url = url[0]+'//'+url[2];
\t\tfetch(`\${param_url}/option/\${idopt}`)
\t\t.then(response=> response.json())
\t\t.then(data=>{
\t\t
\t\t\t\$(\".m-info\").attr(\"style\", \"display: none !important\")
\t\t\t\$(\".forme_options\").attr(\"style\", \"display: block !important\")
\t\t\t\$(\".nice-select\").attr(\"style\", \"display: none !important\");
\t\t\t\$(\"#id_optionFP\").val(idopt);
\t\t\t\$(\"#name_optionFP\").val(data.options.name);
\t\t\t\$(\"#image_optionFP\").val(data.options.image1);
\t
\t\t\tif ( typeof data.options.colorsOption != \"undefined\" && data.options.colorsOption != null && data.options.colorsOption.length != null && data.options.colorsOption.length > 0) {
\t\t\t\tvar colorso =\"\";
\t\t\t\tfor (let i = 0; i < data.options.colorsOption.length; i++) {
\t\t\t\t\tcolorso +='<option>'+ data.options.colorsOption[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_color\").html(colorso);
\t\t\t\t\$(\".optionFP_color\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_color\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_color\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.format != \"undefined\" && data.options.format != null && data.options.format.length != null && data.options.format.length > 0) {
\t\t\t\tvar formatopt =\"\";
\t\t\t\tfor (let i = 0; i < data.options.format.length; i++) {
\t\t\t\t\tformatopt +='<option>'+data.options.format[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_format\").html(formatopt);
\t\t\t\t\$(\".optionFP_format\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_format\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_format\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.finition != \"undefined\" && data.options.finition != null && data.options.finition.length != null && data.options.finition.length > 0) {
\t\t\t\tvar finitions =\"\";
\t\t\t\tfor (let i = 0; i < data.options.finition.length; i++) {
\t\t\t\t\tfinitions +='<option>'+data.options.finition[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_finition\").html(finitions);
\t\t\t\t\$(\".optionFP_finition\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_finition\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_finition\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.papier != \"undefined\" && data.options.papier != null && data.options.papier.length != null && data.options.papier.length > 0) {
\t\t\t\tvar papiers =\"\";
\t\t\t\tfor (let i = 0; i < data.options.papier.length; i++) {
\t\t\t\t\tpapiers +='<option>'+data.options.papier[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_papier\").html(papiers);
\t\t\t\t\$(\".optionFP_papier\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_papier\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_papier\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.quantite != \"undefined\" && data.options.quantite != null && data.options.quantite.length != null && data.options.quantite.length > 0) {
\t\t\t\tvar quantites =\"\";
\t\t\t\tfor (let i = 0; i < data.options.quantite.length; i++) {
\t\t\t\t\tquantites +='<option>'+data.options.quantite[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_quantite\").html(quantites);
\t\t\t\t\$(\".optionFP_quantite\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_quantite\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_quantite\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.etiquette != \"undefined\" && data.options.etiquette != null && data.options.etiquette.length != null && data.options.etiquette.length > 0) {
\t\t\t\tvar etiquettes =\"\";
\t\t\t\tfor (let i = 0; i < data.options.etiquette.length; i++) {
\t\t\t\t\tetiquettes +='<option>'+data.options.etiquette[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_etiquette\").html(etiquettes);
\t\t\t\t\$(\".optionFP_etiquette\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_etiquette\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_etiquette\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.ruban != \"undefined\" && data.options.ruban != null && data.options.ruban.length != null && data.options.ruban.length > 0) {
\t\t\t\tvar rubans =\"\";
\t\t\t\tfor (let i = 0; i < data.options.ruban.length; i++) {
\t\t\t\t\trubans +='<option>'+data.options.ruban[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_ruban\").html(rubans);
\t\t\t\t\$(\".optionFP_ruban\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_ruban\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_ruban\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t});\t
\t}
\tfunction Anulleroption() {
\t\t\$(\".forme_options\").attr(\"style\", \"display: none !important\")
\t\t\$(\".m-info\").attr(\"style\", \"display: block !important\")
\t}
\tfunction validechoioption() {
\t\t\$(\".forme_options\").attr(\"style\", \"display: none !important\")
\t\t\$(\".m-info\").attr(\"style\", \"display: block !important\")
\t\tconst data = {
\t\t\t\tidoption: \$(\"#id_optionFP\").val(),
\t\t\t\tnomoption: \$(\"#name_optionFP\").val(),
\t\t\t\timageoption: \$(\"#image_optionFP\").val(),
\t\t\t\tcolor: \$(\"#optionFP_color\").val(),
\t\t\t\tform: \$(\"#optionFP_format\").val(),
\t\t\t\tfinition: \$(\"#optionFP_finition\").val(),
\t\t\t\tpapier: \$(\"#optionFP_papier\").val(),
\t\t\t\tquantite: \$(\"#optionFP_quantite\").val(),
\t\t\t\tetiquette: \$(\"#optionFP_etiquette\").val(),
\t\t\t\truban: \$(\"#optionFP_ruban\").val(),
\t\t\t};
\t\tlocalStorage.setItem(\$(\"#id_optionFP\").val(), JSON.stringify(data));
\t\t\t
\t}
\tfunction validechoiModaloption() {
\t\tvar url = window.location.href.split('/');
\t\tvar param_url = url[0]+'//'+url[2];
const formData = new FormData();
\t\tvar idProduit = \$('#id_produit').val();
\t\tformData.append(\"quantity\",\$('#qte_produit').val());
\t\tformData.append(\"price\",\$('#price_produit').val());
if (Object.keys(localStorage).length != 0) {
\t\tvar values = [],
\t\tkeys = Object.keys(localStorage),
\t\ti = keys.length;
\t\twhile ( i-- ) {
\t\t\tvalues.push( localStorage.getItem(keys[i]) );
\t\t\tlocalStorage.removeItem(keys[i]);
\t\t}
\t\t
\t\tformData.append(\"tail\",values.length);
\t\tconsole.log(\"zzzzz\",values);
\t\tfor (let j = 0; j < values.length; j++) {\t
\t\t formData.append(\"OpId_\"+j, values[j]);
\t\t}
\t }
\t
\t\tvar checkOpt = document.querySelectorAll('.checkboxFP');
\t\tconsole.log(\"fff\", checkOpt);
\t\tconsole.log(\"eee\", checkOpt.length);
\t\tvar valeur=[];
\t\tfor (var p = 0; p < checkOpt.length; p++) {
\t\t\t
\t\t\tif (checkOpt[p].checked) {
\t\t\t\tvar idOpt = checkOpt[p].getAttribute('data-id');
\t\t\t\tvaleur.push(idOpt);
\t\t\t}
\t\t}
\t\t\tformData.append(\"idoptions\",valeur);
\t
\t\tfetch(`\${param_url}/updateOptionFairepart/\${idProduit}`, {
method: \"POST\",
body: formData
})
\t\t.then(response=> response.json())
\t\t.then(data=>{
console.log('data_io',data);
\t\t if (data.message == \"ok\") {
\t\t\twindow.location.reload();
\t\t }
\t \$(\"#modifAchatFairePart\").modal(\"hide\");
\t\t});
\t}
\t</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "front/command/basket.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 1053 => 639, 1043 => 638, 1027 => 631, 1024 => 630, 1018 => 627, 1014 => 625, 1010 => 623, 1008 => 622, 1004 => 621, 998 => 618, 993 => 616, 990 => 615, 987 => 614, 985 => 613, 979 => 609, 973 => 605, 970 => 604, 963 => 601, 960 => 600, 957 => 599, 954 => 598, 952 => 597, 945 => 592, 943 => 591, 940 => 590, 934 => 589, 932 => 588, 925 => 586, 921 => 585, 918 => 584, 909 => 580, 907 => 579, 902 => 577, 899 => 576, 897 => 575, 893 => 574, 890 => 573, 888 => 572, 883 => 569, 879 => 567, 873 => 565, 871 => 564, 866 => 561, 861 => 551, 855 => 547, 850 => 546, 847 => 545, 844 => 544, 838 => 543, 831 => 541, 829 => 540, 824 => 539, 821 => 538, 817 => 534, 813 => 533, 808 => 531, 805 => 530, 801 => 529, 796 => 526, 794 => 525, 791 => 513, 787 => 510, 783 => 507, 780 => 503, 776 => 498, 771 => 495, 769 => 494, 766 => 493, 762 => 492, 759 => 491, 756 => 490, 752 => 489, 749 => 488, 746 => 486, 741 => 482, 735 => 481, 732 => 480, 719 => 476, 709 => 472, 706 => 471, 702 => 470, 699 => 469, 697 => 468, 693 => 466, 687 => 463, 684 => 462, 681 => 461, 679 => 460, 674 => 459, 671 => 457, 664 => 455, 661 => 454, 655 => 452, 650 => 450, 645 => 448, 642 => 447, 640 => 446, 636 => 444, 633 => 443, 630 => 442, 627 => 441, 624 => 440, 622 => 439, 619 => 438, 613 => 436, 607 => 434, 605 => 433, 601 => 431, 596 => 429, 593 => 428, 590 => 427, 584 => 426, 581 => 425, 578 => 424, 576 => 423, 573 => 422, 568 => 421, 566 => 420, 563 => 419, 558 => 417, 555 => 416, 552 => 415, 546 => 414, 543 => 413, 540 => 412, 537 => 411, 532 => 410, 530 => 409, 526 => 408, 523 => 407, 520 => 405, 517 => 404, 512 => 403, 509 => 402, 506 => 401, 503 => 400, 496 => 396, 490 => 393, 483 => 389, 478 => 387, 474 => 386, 471 => 385, 469 => 384, 451 => 369, 448 => 368, 443 => 367, 438 => 365, 424 => 353, 416 => 345, 340 => 270, 328 => 253, 323 => 250, 321 => 249, 316 => 246, 303 => 235, 242 => 175, 231 => 166, 226 => 163, 224 => 162, 220 => 160, 217 => 158, 211 => 153, 205 => 148, 200 => 143, 198 => 142, 196 => 91, 193 => 89, 191 => 87, 181 => 75, 175 => 70, 171 => 67, 161 => 66, 98 => 9, 88 => 8, 75 => 5, 72 => 4, 62 => 3, 39 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base_front.html.twig' %}
{% block meta %}
\t<title>Mon panier</title>
\t<meta name=\"description\" content=\"{{ products|length }} produits pour le moment\">
{% endblock %}
{% block style %}
\t<style>
\t\t.indicationSupp:hover {
\t\t\t
\t\t}
\t\t.inputQtyOpt {
\t\t\twidth: 63px;
\t\t\theight: 39px;
\t\t\tpadding: 0 5px;
\t\t\ttext-align: center;
\t\t\tbackground-color: transparent;
\t\t\tborder: 1px solid #efefef;
\t\t}
\t\t.imgOptModal {
\t\t\theight:50px;
\t\t\tborder-radius:2px
\t\t}
\t\t.modifProdSess {
\t\t\tcolor: white !important;
\t\t\tdisplay: flex;
\t\t\talign-items: center;
\t\t}
\t\t{# css loading... #}
\t\t#MyLoading {
\t\t\tvisibility: hidden;
\t\t}
\t\t#MyLoading.MyShow {
\t\t\tvisibility: visible;
\t\t}
\t\t@media screen and (max-width: 576px) {
\t\t\t.modifProdSess {
\t\t\t\tpadding: 8px 7px;
\t\t\t\tfont-size: 7px;
\t\t\t}
\t\t\t.indicationSupp {
\t\t\t\tpadding: 10px 15px;
\t\t\t}
\t\t}
\t\t{# modadl option #}
\t\t@media screen and (min-width: 800px) {\t
\t\t\t.myWidth {
\t\t\t\tmax-width: 800px;
\t\t\t}
\t\t}
\t\t{# choice option #}
\t\t.labold {
\t\t\tfont-weight: 500;
\t\t\tfont-size: 18px;
\t\t}
\t\t.mt9 {
\t\t\tmargin-top: 9px;
\t\t}
\t\t.myPadding {
\t\t\tpadding: 8px 0px;
\t\t}
\t</style>
{% endblock %}
{% block body %}
\t<!-- Modal -->
\t{# Modal modif groupe d'option #}
\t<div class=\"modal fade\" id=\"modalOptionGP\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLongTitle\" aria-hidden=\"true\">
\t\t<div class=\"modal-dialog myWidth\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t{# <form action=\"\"> #}
\t\t\t\t\t<div class=\"modal-header\">
\t\t\t\t\t\t<h5 class=\"modal-title\" id=\"\">Modifier les groupes d'options</h5>
\t\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
\t\t\t\t\t\t\t<span aria-hidden=\"true\">×</span>
\t\t\t\t\t\t</button>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t\t<div class=\"row\" id=\"valeurgropOption\">
\t\t\t\t\t\t\t{# <input type=\"hidden\" id=\"id_optionmodal\">
\t\t\t\t\t\t\t<div class=\"col-lg-6 col-12\" >
\t\t\t\t\t\t\t\t<div id=\"optionsimage\">
\t\t\t\t\t\t\t\t\t{# <img src=\"{{ asset(constant('App\\\\Services\\\\File::IMAGE_PRODUCT_DIR') ~ product.photos.toArray()[0].url) }}\" alt=\"\"> #}
\t\t\t\t\t\t\t\t{# </div>
\t\t\t\t\t\t\t</div> #}
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t{# <div class=\"col-lg-6 col-12\" style=\"display: block\"> #}
\t\t\t\t\t\t\t {# <div class=\"row\">
\t\t\t\t\t\t\t\t\t<div class=\"col-8\">
\t\t\t\t\t\t\t\t\t\t<label for=\"\" class=\"labold\">Couleur</label>
\t\t\t\t\t\t\t\t\t\t<div class=\"custom-checkbox myPadding\" style=\"position: relative\">
\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"\" id=\"vert\" class=\"custom-control-input\">
\t\t\t\t\t\t\t\t\t\t\t<label for=\"vert\" class=\"custom-control-label\" style=\"margin-left: 25px;\">Vert (3€)</label>
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t<div class=\"custom-checkbox myPadding\" style=\"position: relative\">
\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"\" id=\"rouge\" class=\"custom-control-input\">
\t\t\t\t\t\t\t\t\t\t\t<label for=\"rouge\" class=\"custom-control-label\" style=\"margin-left: 25px;\">Rouge (4€)</label>
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t<div class=\"custom-checkbox myPadding\" style=\"position: relative\">
\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"\" id=\"bleu\" class=\"custom-control-input\">
\t\t\t\t\t\t\t\t\t\t\t<label for=\"bleu\" class=\"custom-control-label\" style=\"margin-left: 25px;\">Bleu (6€)</label>
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t<label for=\"qt1\" class=\"mt9\">Quantité</label>
\t\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"\" min=\"0\" id=\"\" class=\"form-control\">
\t\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"\" min=\"0\" id=\"\" class=\"form-control\">
\t\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"\" min=\"0\" id=\"\" class=\"form-control\">
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div><br>
\t\t\t\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t\t\t\t<div class=\"col-8\">
\t\t\t\t\t\t\t\t\t\t<label class=\"labold\" for=\"\">Taille</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"\" class=\"form-control wide\" style=\"display: block !important;\">\t
\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">M (6€)</option>
\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">L (8€)</option>
\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">XL (10€)</option>
\t\t\t\t\t\t\t\t\t\t</select>\t
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t<label for=\"qt1\" class=\"mt9\">Quantité</label>
\t\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"\" min=\"0\" id=\"\" class=\"form-control\">
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div><br>
\t\t\t\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t\t\t\t<div class=\"col-8\">
\t\t\t\t\t\t\t\t\t\t<label class=\"labold\" for=\"\">Type tissu</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"\" class=\"form-control wide\" style=\"display: block !important;\">
\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">Semi-cotton (2€)</option>
\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">Cotton (4€)</option>
\t\t\t\t\t\t\t\t\t\t\t<option value=\"\">t-shirt rétréci (5€)</option>
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t<label for=\"qt1\" class=\"mt9\">Quantité</label>
\t\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"\" min=\"0\" id=\"\" class=\"form-control\">
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div><br> #}
\t\t\t\t\t\t\t{# </div> #}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t{# {% endfor %}
\t\t\t\t\t{% endif %} #}
\t\t\t\t\t<div class=\"modal-footer\">
\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Fermer</button>
\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\" id=\"\" onclick=\"validechoiModalGroupoption()\">Ok</button>
\t\t\t\t\t</div>
\t\t\t\t{# </form> #}
\t\t\t</div>
\t\t</div>
\t</div>
\t{# Fin Modal modif groupe d'option #}
\t{# Modal faire part #}
\t<div class=\"modal fade\" id=\"modifAchatFairePart\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLongTitle\" aria-hidden=\"true\">
\t{% set idSessOpt = app.session.get('idProduit') %}
\t
\t\t<div class=\"modal-dialog\" role=\"document\" style=\"max-width: 700px\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<form action=\"{{path('update_option')}}\" method=\"POST\">
\t\t\t\t\t<div class=\"modal-header\">
\t\t\t\t\t\t<h5 class=\"modal-title\" id=\"exampleModalLongTitle\">Modifier les options</h5>
\t\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
\t\t\t\t\t\t\t<span aria-hidden=\"true\">×</span>
\t\t\t\t\t\t</button>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t\t{# <span class=\"font-weight-bold\">Options disponibles :</span><span id=\"MyLoadingFP\"> Chargement en cours...</span> #}
\t\t\t\t\t\t<div class=\"containerOptionFP pl-3 row\">
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t<div class=\"col-lg-5 col-12\">
\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"id_produit\">
\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"price_produit\">
\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"qte_produit\">
\t\t\t\t\t\t\t\t<div id=\"tousOptions\"></div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"col-lg-7 col-12\">
\t\t\t\t\t\t\t <div class=\"m-info\">Si vous souhaitez ajouter une option différente de celle d'avant, cochez votre choix et modifiez-le si nécessaire</div>
\t\t\t\t\t\t\t <div class=\"forme_options\" style=\"display: none !important\">
\t\t\t\t\t\t\t\t<form action=\"\">
\t\t\t\t\t\t\t\t <input type=\"hidden\" id=\"id_optionFP\">
\t\t\t\t\t\t\t\t <input type=\"hidden\" id=\"name_optionFP\">
\t\t\t\t\t\t\t\t <input type=\"hidden\" id=\"image_optionFP\">
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_color\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_color\">Couleur</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_color\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_format\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_format\">Format</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_format\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_finition\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_finition\">Finition</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_finition\" class=\"wide form-control\">\t
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_papier\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_papier\">Papier</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_papier\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_etiquette\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_etiquette\">Etiquette</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_etiquette\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_ruban\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_ruban\">Ruban</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_ruban\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"optionFP_quantite\">
\t\t\t\t\t\t\t\t\t\t<label for=\"optionFP_quantite\">Quantite</label>
\t\t\t\t\t\t\t\t\t\t<select name=\"\" id=\"optionFP_quantite\" class=\"wide form-control\">
\t\t\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"validerModifFP mt-3\">
\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-secondary\" type=\"button\" onclick=\"Anulleroption()\">Annuler</button>
\t\t\t\t\t\t\t\t\t\t<button class=\"btn btn-primary\" type=\"button\" onclick=\"validechoioption()\">Valider</button>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</form>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t{# {% endset %} #}
\t\t\t\t\t<!-- form modifsession prod -->
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"modal-footer\">
\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Fermer</button>
\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\" onclick=\"validechoiModaloption()\">Modifier</button>
\t\t\t\t\t</div>
\t\t\t\t</form>
\t\t\t</div>
\t\t</div>
\t</div>
\t{# Fin modal faire Part #}\t
\t<div class=\"modal fade\" id=\"modifAchatProd\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLongTitle\" aria-hidden=\"true\">
\t{% set idSessOpt = app.session.get('idProduit') %}
\t
\t\t<div class=\"modal-dialog\" role=\"document\">
\t\t\t<div class=\"modal-content\">
\t\t\t\t<form action=\"{{path('update_option')}}\" method=\"POST\">
\t\t\t\t\t<div class=\"modal-header\">
\t\t\t\t\t\t<h5 class=\"modal-title\" id=\"exampleModalLongTitle\">Modifier les options</h5>
\t\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
\t\t\t\t\t\t\t<span aria-hidden=\"true\">×</span>
\t\t\t\t\t\t</button>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"modal-body\">
\t\t\t\t\t<!-- form modifsession prod -->
\t\t\t\t\t\t{# <div class=\"form-group\">
\t\t\t\t\t\t\t<label for=\"quantity_product\">Quantité</label><br>
\t\t\t\t\t\t\t<div class=\"quantity buttons_added\">
\t\t\t\t\t\t\t\t<input type=\"button\" value=\"-\" class=\"minus\">
\t\t\t\t\t\t\t\t<input id=\"quantity_product\" type=\"number\" step=\"1\" min=\"1\" max=\"\" name=\"quantity\" value=\"1\" title=\"Qty\" class=\"input-text qty text\" size=\"4\" pattern=\"\" inputmode=\"\">
\t\t\t\t\t\t\t\t<input type=\"button\" value=\"+\" class=\"plus\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div> #}
\t\t\t\t\t\t<span class=\"font-weight-bold\">Options disponibles :</span><span id=\"MyLoading\"> Chargement en cours...</span>
\t\t\t\t\t\t<div class=\"containerOption pl-3 row\">
\t\t\t\t\t\t\t<div class=\"oneOption col-12 row\">
\t\t\t\t\t\t\t\t<div class=\"col-8\">
\t\t\t\t\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"custom-checkbox\" style=\"position: relative\">
\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" data-price=\"\" name=\"\" value=\"\" class=\"custom-control-input\" id=\"checkbo\">
\t\t\t\t\t\t\t\t\t\t<label class=\"custom-control-label\" for=\"checkbo\">
\t\t\t\t\t\t\t\t\t\t\t<strong style=\"margin-left: 31px;\">10 €</strong>
\t\t\t\t\t\t\t\t\t\t\t<span>-
\t\t\t\t\t\t\t\t\t\t\tName option</span>
\t\t\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t<div style=\"height:36px\"></div>
\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"\" id=\"\" class=\"inputQtyOpt\" min=\"1\" value=\"1\"/>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"oneOption col-12 row\">
\t\t\t\t\t\t\t\t<div class=\"col-8\">
\t\t\t\t\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"custom-checkbox\" style=\"position: relative\">
\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" data-price=\"\" name=\"\" value=\"\" class=\"custom-control-input\" id=\"checkbo1\">
\t\t\t\t\t\t\t\t\t\t<label class=\"custom-control-label\" for=\"checkbo1\">
\t\t\t\t\t\t\t\t\t\t\t<strong style=\"margin-left: 31px;\">10 €</strong>
\t\t\t\t\t\t\t\t\t\t\t-
\t\t\t\t\t\t\t\t\t\t\tName option</label>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t<div style=\"height:36px\"></div>
\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"\" id=\"\" class=\"inputQtyOpt\" min=\"1\" value=\"1\"/>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"oneOption col-12 row\">
\t\t\t\t\t\t\t\t<div class=\"col-8\">
\t\t\t\t\t\t\t\t\t<div class=\"row\">
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t\t\t<img src=\"/upload/produits/vernis-a-ongles-laques-fuchsia-fiesta-1-62a2e00ab1b53.jpeg\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div class=\"custom-checkbox\" style=\"position: relative\">
\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" data-price=\"\" name=\"\" value=\"\" class=\"custom-control-input\" id=\"checkbo2\">
\t\t\t\t\t\t\t\t\t\t<label class=\"custom-control-label\" for=\"checkbo2\">
\t\t\t\t\t\t\t\t\t\t\t<strong style=\"margin-left: 31px;\">10 €</strong>
\t\t\t\t\t\t\t\t\t\t\t-
\t\t\t\t\t\t\t\t\t\t\tName option</label>
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t<div style=\"height:36px\"></div>
\t\t\t\t\t\t\t\t\t<input type=\"number\" name=\"\" id=\"\" class=\"inputQtyOpt\" min=\"1\" value=\"1\"/>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t{# {% endset %} #}
\t\t\t\t\t<!-- form modifsession prod -->
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"modal-footer\">
\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Fermer</button>
\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary\">Modifier</button>
\t\t\t\t\t</div>
\t\t\t\t{# {% endfor %}
\t\t\t{% endif %} #}
\t\t\t\t</form>
\t\t\t</div>
\t\t</div>
\t</div>
\t
\t<!-- Modal -->
\t<div class=\"content mt-5 mb-5\" style=\"margin-bottom:100px!important\">
\t\t<div class=\"container\">
\t\t\t<div class=\"row mb-5\">
\t\t\t\t<div class=\"tab-pane fade active show\" id=\"allguest\" role=\"tabpanel\" aria-labelledby=\"allguest-tab\" style=\"width:100%\">
\t\t\t\t\t<div class=\"card-body row justify-content-between\">
\t\t\t\t\t\t<h3>Mon panier ({{ products|length }}
\t\t\t\t\t\t\tproduit
\t\t\t\t\t\t\t{% if products|length > 1 %}s
\t\t\t\t\t\t\t{% endif %})</h3>
\t\t\t\t\t\t<a href=\"{{path('pdf_generate')}} \" class=\"btn btn-primary float-right\">Télécharger mon devis</a>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"table-responsive\" style=\"width:100%\">
\t\t\t\t\t\t<table class=\"table mt-4\">
\t\t\t\t\t\t\t<thead>
\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-event\">Designation</th>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-estimate\">Aperçu</th>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-estimate\">Prix à l'unité</th>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-actual\">Quantité</th>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-paid\">Total produit</th>
\t\t\t\t\t\t\t\t\t<th class=\"wedding-budget-paid\"></th>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t</thead>
\t\t\t\t\t\t\t<tbody>
\t\t\t\t\t\t\t\t{% if pack %}
\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t<td>{{ pack.name }}</td>
\t\t\t\t\t\t\t\t\t\t<td><img src=\"{{ asset(constant('App\\\\Services\\\\File::IMAGE_PRODUCT_DIR')) ~ pack.image }}\" style=\"height:50px;border-radius:2px\"></td>
\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">{{ pack.price|number_format(2, '.') }}€</span>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t<td>1</td>
\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">{{ pack.price|number_format(2, '.') }}€</span>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total\">
\t\t\t\t\t\t\t\t\t\t\t<a href=\"{{ path('front_my_basket_remove_pack', {'id': pack.id}) }}\" class=\"btn btn-rounded btn-default\">Supprimer du panier</a>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% set TotalPriceProduct = 0 %}
\t\t\t\t\t\t\t\t{% set totOpt = 0 %}
\t\t\t\t\t\t\t\t{% set totGpOpt = 0 %}
\t\t\t\t\t\t\t\t{% for product in products %}
\t\t\t\t\t\t\t\t\t{% set optionObjectByProd = filter_service.getProductOptionByProduit(product.product) %}
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t{# Product added #}
\t\t\t\t\t\t\t\t\t\t<tr class=\"border-bottom\" style=\"border-top: 1px solid #dee2e6 !important;\">
\t\t\t\t\t\t\t\t\t\t<td>{{ product.product.name }}
\t\t\t\t\t\t\t\t\t\t\t{% set isClothing = null %}
\t\t\t\t\t\t\t\t\t\t\t{% for subcategory in product.product.subCategories %}
\t\t\t\t\t\t\t\t\t\t\t\t{% if subcategory.isClothing %}
\t\t\t\t\t\t\t\t\t\t\t\t\t{% set isClothing = true %}
\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t\t{% if isClothing %}
\t\t\t\t\t\t\t\t\t\t\t\t<br><strong>Taille :
\t\t\t\t\t\t\t\t\t\t\t\t\t{{ product.size }}</strong>
\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t{% set isColor = null %}
\t\t\t\t\t\t\t\t\t\t\t{% for subcategory in product.product.subCategories %}
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t{% if subcategory.isColor %}
\t\t\t\t\t\t\t\t\t\t\t\t\t{% set isColor = true %}
\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t\t{% if isColor %}
\t\t\t\t\t\t\t\t\t\t\t\t<br><strong>Couleur :
\t\t\t\t\t\t\t\t\t\t\t\t\t{{ product.color }}</strong>
\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t{% if product.product.photos.first != false %}
\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"{{ asset(constant('App\\\\Services\\\\File::IMAGE_PRODUCT_DIR')) ~ product.product.photos.first.url }}\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"{{ asset('images/vecteezy_vector-gear-logo-design-with-multi-colors-range_6172776.jpg') }}\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t{% if product.promo %}
\t\t\t\t\t\t\t\t\t\t\t{% set ProductPrice = product.product.price - product.promo %}
\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t{% set ProductPrice = product.product.price %}
\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t<td class=\"estimate-total\">
\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">
\t\t\t\t\t\t\t\t\t\t\t\t{% if product.promo %}
\t\t\t\t\t\t\t\t\t\t\t\t\t<small>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<del>{{ product.product.price|number_format(2, '.') }}€</del>
\t\t\t\t\t\t\t\t\t\t\t\t\t</small>
\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>{{ ProductPrice|number_format(2, '.') }}€</strong>
\t\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t\t{{ ProductPrice|number_format(2, '.') }}€
\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t</span><br>
\t\t\t\t\t\t\t\t\t\t\t{% if product.promo %}(code promo -{{ product.promo }}€)
\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t{# Quantity product #}
\t\t\t\t\t\t\t\t\t\t<td class=\"actual-total\">{{ product.quantity }}</td>
\t\t\t\t\t\t\t\t\t\t{% set TotalWithQuantity = product.quantity * ProductPrice %}
\t\t\t\t\t\t\t\t\t\t{% set TotalPriceProduct = TotalPriceProduct + TotalWithQuantity %}
\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total\">
\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">{{ TotalWithQuantity|number_format(2, '.') }}€</span>
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total d-flex justify-content-around\" style=\"column-gap: 5px;\">
\t\t\t\t\t\t\t\t\t\t\t<a href=\"{{ path('front_my_basket_remove_product', {'id': product.product.id}) }}\" class=\"btn btn-rounded btn-danger indicationSupp\" title=\"Supprimer du panier\" style=\"font-size: 17px;display: flex;align-items: center;\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></a>
\t\t\t\t\t\t\t\t\t\t\t{# Supprimer du panier #}
\t\t\t\t\t\t\t\t\t\t\t{# onclick=\"getOptionByIdProd({{product.product.id}})\" data-id=\"{{product.product.id}}\" #}
\t\t\t\t\t\t\t\t\t\t\t<!-- Button trigger modal -->
\t\t\t\t\t\t\t\t\t\t{% for subcategory in product.product.subCategories %}
\t\t\t\t\t\t\t\t\t\t\t{% if subcategory.subCategorySlug != \"faire-part\" %}
\t\t\t\t\t\t\t\t\t\t\t\t<a onclick=\"getGroupOption({{product.product.id}})\" data-id=\"{{product.product.id}}\" class=\"btn btn-rounded btn-default modifProdSess\" data-toggle=\"modal\" data-target=\"#modalOptionGP\">
\t\t\t\t\t\t\t\t\t\t\t\t\tAjouter des options
\t\t\t\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t\t<a onclick=\"ajouterOptions('{{product.product.id}}','{{product.quantity}}','{{ProductPrice}}','{{ app.request.getSchemeAndHttpHost() }}');\" id=\"ajoutOption\" class=\"btn btn-rounded btn-default modifProdSess\" data-toggle=\"modal\">
\t\t\t\t\t\t\t\t\t\t\t\t\tAjouter des options
\t\t\t\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t\t\t\t\t{# data-target=\"#modifAchatFairePart\" #}
\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t{# Fin Product added #}
\t\t\t\t\t\t\t\t\t{# Option #}
\t\t\t\t\t\t\t\t\t{% for subCategories in product.product.subCategories.snapshot %}
\t\t\t\t\t\t\t\t\t\t{% if subCategories.subCategorySlug != \"faire-part\" %}
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t{% for key,option in product.options %}
\t\t\t\t\t\t\t\t\t\t\t\t{% set optionObject = filter_service.getProductOption(key) %}
\t\t\t\t\t\t\t\t\t\t\t\t{# {% set TotalPriceProduct = TotalPriceProduct + optionObject.price %} #}
\t\t\t\t\t\t\t\t\t\t\t\t<tr class=\"\" style=\"background:#fff\">
\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"pl-4\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Option :</strong>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{ optionObject.name }}</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{# {% if isClothing %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br><strong>Taille :
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{ product.size }}</strong>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %} #}
\t\t\t\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t\t\t{# {% if optionObject.image1 %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"{{ asset(constant('App\\\\Services\\\\File::IMAGE_PRODUCT_DIR')) ~ optionObject.image1 }}\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %} #}
\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"estimate-total\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{# <span class=\"total-amount\">{{ optionObject.price|number_format(2, '.') }}€</span> #}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\"></span>
\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t{# qty option #}
\t\t\t\t\t\t\t\t\t\t\t\t\t<td></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t{# {% set totalOpt = null %}
\t\t\t\t\t\t\t\t\t\t\t\t\t{% for key,qty in product.qtyOption %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% if optionObject.id == key %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"actual-total\">{{qty}}</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% set totqtyOpt = optionObject.price * qty %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">{{ totqtyOpt|number_format(2, '.') }}€</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% set totOpt = totOpt + totqtyOpt %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t\t\t{% endfor %} #}
\t\t\t\t\t\t\t\t\t\t\t\t\t{# qty option #}
\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total\"></td>
\t\t\t\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t{% for valOption in option %}
\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"pl-5\">{{ valOption[\"valeur\"] }}</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"estimate-total\"><span class=\"total-amount\">{{ valOption[\"prix\"] }} €</span></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>{{ valOption[\"qte\"] ? valOption[\"qte\"] : 1 }}</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{# <pre>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{ dump(valOption[\"qte\"]) }}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t</pre> #}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% set totval = valOption[\"prix\"] * (valOption[\"qte\"] ? valOption[\"qte\"] : 1) %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"estimate-total\"><span class=\"total-amount\">{{ totval }} €</spna></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% set totGpOpt = totGpOpt + totval %}
\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t\t\t\t\t{% if product.options_farep is defined %}
\t\t\t\t\t\t\t\t\t\t\t\t{% for option in product.options_farep %}
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t<tr style=\"background:#fff\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"pl-4\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>Option :</strong>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{ option.nomoption }}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{# <br><strong>Format :
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{ option.form }}</strong>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br><strong>Finition :
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{ option.finition }}</strong>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br><strong>Papier :
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{ option.papier}}</strong>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br><strong>Etiquette :
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{ option.etiquette}} #}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</strong></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% if option.imageoption %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"{{ asset(constant('App\\\\Services\\\\File::IMAGE_PRODUCT_DIR')) ~ option.imageoption }}\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"estimate-total\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">{{ option.price|number_format(2, '.') }}€</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{# qty option #}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t{# {% set totalOpt = null %}#}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"actual-total\">{{option.quantite}}</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% set totqtyOpt = option.price * option.quantite %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total\">
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"total-amount\">{{ totqtyOpt|number_format(2, '.') }}€</span>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{% set totOpt = totOpt + totqtyOpt %}
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"paid-total\"></td>
\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t{% endif %}\t
\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t\t{# Fin Option #}
\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t{% if pack or products is not empty %}
\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t<td>TOTAL :</td>
\t\t\t\t\t\t\t\t\t\t<td></td>
\t\t\t\t\t\t\t\t\t\t<td></td>
\t\t\t\t\t\t\t\t\t\t<td></td>
\t\t\t\t\t\t\t\t\t\t{% if pack %}
\t\t\t\t\t\t\t\t\t\t\t{% set TotalPriceProduct = TotalPriceProduct + pack.price %}
\t\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t\t\t{% set totOptions = totOpt + totGpOpt %}
\t\t\t\t\t\t\t\t\t\t<td>{{ (TotalPriceProduct + totOptions)|number_format(2, '.') }}€</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% if not pack and products is empty %}
\t\t\t\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t\t\t\t<td>Aucun produit ajouté au panier</td>
\t\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t</tbody>
\t\t\t\t\t\t</table>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"card-footer\" style=\"height:70px\">
\t\t\t\t\t\t{% if products|length > 0 or pack is not null %}
\t\t\t\t\t\t\t{% if is_granted('ROLE_ENTERPRISE') == false %}
\t\t\t\t\t\t\t\t<div class=\"float-left\">
\t\t\t\t\t\t\t\t\t{{ form_start(form, {'attr': {'class': 'form-inline'}}) }}
\t\t\t\t\t\t\t\t\t<div class=\"form-group\">
\t\t\t\t\t\t\t\t\t\t{{ form_widget(form.codePromo) }}
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-default ml-3\">Valider</button>
\t\t\t\t\t\t\t\t\t{{ form_end(form) }}
\t\t\t\t\t\t\t\t\t{% if isMessagePromo is defined and isMessagePromo %}
\t\t\t\t\t\t\t\t\t\t<span style=\"color:green\">Code promo valide !</span>
\t\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"float-right\">
\t\t\t\t\t\t\t\t\t<a href=\"{{ path('front_command_livraison') }}\" class=\"btn btn-primary\">Commander</a>
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
{% endblock %}
{% block javascript %}
\t<script>
\t\tfunction wcqib_refresh_quantity_increments() {
\t\t\tjQuery(\"div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)\").each(function (a, b) {
\t\t\t\tvar c = jQuery(b);
\t\t\t\tc.addClass(\"buttons_added\"),
\t\t\t\t\tc.children().first().before('<input type=\"button\" value=\"-\" class=\"minus\" />'),
\t\t\t\t\tc.children().last().after('<input type=\"button\" value=\"+\" class=\"plus\" />')
\t\t\t})
\t\t}
\t\tString.prototype.getDecimals || (String.prototype.getDecimals = function () {
\t\t\tvar a = this,
\t\t\t\tb = (\"\" + a).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?\$/);
\t\t\treturn b ? Math.max(0, (b[1] ? b[1].length : 0) - (b[2] ? + b[2] : 0)) : 0
\t\t}),
\t\t\tjQuery(document).ready(function () {
\t\t\t\twcqib_refresh_quantity_increments()
\t\t\t}),
\t\t\tjQuery(document).on(\"updated_wc_div\", function () {
\t\t\t\twcqib_refresh_quantity_increments()
\t\t\t}),
\t\t\tjQuery(document).on(\"click\", \".plus, .minus\", function () {
\t\t\t\tvar a = jQuery(this).closest(\".quantity\").find(\".qty\"),
\t\t\t\t\tb = parseFloat(a.val()),
\t\t\t\t\tc = parseFloat(a.attr(\"max\")),
\t\t\t\t\td = parseFloat(a.attr(\"min\")),
\t\t\t\t\te = a.attr(\"step\");
\t\t\t\tb && \"\" !== b && \"NaN\" !== b || (b = 0),
\t\t\t\t\t\"\" !== c && \"NaN\" !== c || (c = \"\"),
\t\t\t\t\t\"\" !== d && \"NaN\" !== d || (d = 0),
\t\t\t\t\t\"any\" !== e && \"\" !== e && void 0 !== e && \"NaN\" !== parseFloat(e) || (e = 1),
\t\t\t\t\tjQuery(this).is(\".plus\") ? c && b >= c ? a.val(c) : a.val((b + parseFloat(e)).toFixed(e.getDecimals())) : d && b <= d ? a.val(d) : b > 0 && a.val((b - parseFloat(e)).toFixed(e.getDecimals())),
\t\t\t\t\ta.trigger(\"change\")
\t\t\t});
\t</script>
\t<script>
\t\t{# Lading script... #}
\t\tconst loader = document.querySelector('#MyLoading');
\t\tfunction afficheLoading() {
\t\t\tloader.classList.add('MyShow');
\t\t}
\t\tfunction cacherLoading() {
\t\t\tloader.classList.remove('MyShow');
\t\t}
\t\t{# Fin Lading script... #}
\t\tconst containerOpt = document.querySelector('.containerOption');
\t\t
\t\t
\t\tfunction getOptionByIdProd(idProd) {
\t\t\tafficheLoading();
\t\t\t
\t\t\tconst data = {
\t\t\t\tidProd: idProd
\t\t\t};
\t\t\tlet datas = new FormData();
\t\t\tdatas.append(\"data\", JSON.stringify(data));
\t\t\tif (containerOpt.children) {
\t\t\t\tvar first = containerOpt.firstElementChild;
\t\t\t\twhile (first) {
\t\t\t\t\tfirst.remove();
\t\t\t\t\tfirst = containerOpt.firstElementChild;
\t\t\t\t}
\t\t\t}
\t\t\tfetch(`/get-option/\${idProd}`)
\t\t\t.then(response => response.json())
\t\t\t.then(data => {
\t\t\t\tcacherLoading();
\t\t\t\tconsole.log(data);
\t\t\t\tdata[0].map((item)=>{
\t\t\t\t\t//console.log(\"idOpt vao miditra\",item.id);
\t\t\t\t\tlet objQty = data[1].qty;
\t\t\t\t\tlet idProd = document.createElement('input');
\t\t\t\t\tidProd.type = \"hidden\";
\t\t\t\t\tidProd.value = data[2];
\t\t\t\t\tidProd.setAttribute('name','idProd');
\t\t\t\t\tlet oneOpt = document.createElement('div');
\t\t\t\t\toneOpt.classList.add('col-12');
\t\t\t\t\toneOpt.classList.add('row');
\t\t\t\t\tlet col8 = document.createElement('div');
\t\t\t\t\tcol8.classList.add('col-8');
\t\t\t\t\tlet row = document.createElement('div');
\t\t\t\t\trow.classList.add('row');
\t\t\t\t\tlet col4a = document.createElement('div');
\t\t\t\t\tcol4a.classList.add('col-4');
\t\t\t\t\tlet col4b = document.createElement('div');
\t\t\t\t\tcol4b.classList.add('col-4');
\t\t\t\t\tlet img1 = document.createElement('img');
\t\t\t\t\timg1.classList.add('imgOptModal');
\t\t\t\t\t// image
\t\t\t\t\tif (item.image1 == null){
\t\t\t\t\t\timg1.style.display = \"none\";
\t\t\t\t\t} else {
\t\t\t\t\t\timg1.src = `/upload/produits/\${item.image1}`;
\t\t\t\t\t}
\t\t\t\t\tlet img2 = document.createElement('img');
\t\t\t\t\timg2.classList.add('imgOptModal');
\t\t\t\t\tif (item.image2 == null){
\t\t\t\t\t\timg2.style.display = \"none\";
\t\t\t\t\t} else {
\t\t\t\t\t\timg2.src = `/upload/produits/\${item.image2}`;
\t\t\t\t\t}
\t\t\t\t\tlet customCheckBox = document.createElement('div');
\t\t\t\t\tcustomCheckBox.classList.add('custom-checkbox');
\t\t\t\t\tcustomCheckBox.style.position = \"relative\";
\t\t\t\t\tlet inputCheckBox = document.createElement('input');
\t\t\t\t\tinputCheckBox.type = \"checkbox\";
\t\t\t\t\tinputCheckBox.classList.add('custom-control-input');
\t\t\t\t\tinputCheckBox.classList.add('option-checkbox');
\t\t\t\t\tinputCheckBox.setAttribute('id',`idCheck\${item.id}`);
\t\t\t\t\tinputCheckBox.setAttribute('name',`options[\${item.id}]`);
\t\t\t\t\tinputCheckBox.setAttribute('value',`\${item.price}`);
\t\t\t\t\t// checked if already in session
\t\t\t\t\tfor (const idOpt in objQty) {
\t\t\t\t\t\tif(item.id == idOpt){
\t\t\t\t\t\t\tinputCheckBox.checked = true;
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t\tlet customControlLabel = document.createElement('label');
\t\t\t\t\tcustomControlLabel.classList.add('custom-control-label');
\t\t\t\t\tcustomControlLabel.setAttribute('for',`idCheck\${item.id}`);
\t\t\t\t\t
\t\t\t\t\tlet nameStrong = document.createElement('strong');
\t\t\t\t\tnameStrong.innerHTML = `\${item.price} €`;
\t\t\t\t\tnameStrong.style.marginLeft = \"31px\";
\t\t\t\t\tlet nameSpan = document.createElement('span');
\t\t\t\t\tnameSpan.innerHTML = `- \${item.name}`;
\t\t\t\t\tlet nameSpan2 = document.createElement('span');
\t\t\t\t\tnameSpan2.innerHTML = `<button type=\"button\">modif</button>`;
\t\t\t\t\tlet col4 = document.createElement('div');
\t\t\t\t\tcol4.classList.add('col-4');
\t\t\t\t\tlet myheight = document.createElement('div');
\t\t\t\t\tmyheight.style.height = \"36px\";
\t\t\t\t\tlet inputQty = document.createElement('input');
\t\t\t\t\tinputQty.type = \"number\";
\t\t\t\t\tinputQty.classList.add('inputQtyOpt');
\t\t\t\t\tinputQty.setAttribute('min','1');
\t\t\t\t\tinputQty.setAttribute('id',`QtyidCheck\${item.id}`);
\t\t\t\t\tinputQty.setAttribute('name',`QtyOption[\${item.id}]`);
\t\t\t\t\tinputQty.setAttribute('value','1');
\t\t\t\t\t// get value qty in session
\t\t\t\t\tfor (const idOpt in objQty) {
\t\t\t\t\t\tif(item.id == idOpt) {
\t\t\t\t\t\t\tinputQty.setAttribute('value',`\${objQty[idOpt]}`);
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t\tcol4.appendChild(myheight);
\t\t\t\t\tcol4.appendChild(inputQty);
\t\t\t\t\tcol4a.appendChild(img1);
\t\t\t\t\tcol4b.appendChild(img2);
\t\t\t\t\trow.appendChild(col4a);
\t\t\t\t\trow.appendChild(col4b);
\t\t\t\t\tcustomControlLabel.appendChild(nameStrong);
\t\t\t\t\tcustomControlLabel.appendChild(nameSpan);
\t\t\t\t\tcustomCheckBox.appendChild(inputCheckBox);
\t\t\t\t\tcustomCheckBox.appendChild(customControlLabel);
\t\t\t\t\tcol8.appendChild(row);
\t\t\t\t\tcol8.appendChild(customCheckBox);
\t\t\t\t\toneOpt.appendChild(idProd);
\t\t\t\t\toneOpt.appendChild(col8);
\t\t\t\t\toneOpt.appendChild(col4);
\t\t\t\t\tcontainerOpt.appendChild(oneOpt);
\t\t\t\t});
\t\t\t\t
\t\t\t\t/*let idp = document.createElement(\"p\");
\t\t\t\tidp.textContent = data;
\t\t\t\tcontainerOpt.appendChild(idp);*/
\t\t\t\t/*fetch('/get-option')
\t\t\t\t.then(obj => obj.json())
\t\t\t\t.then(objjs => console.log(objjs));*/
\t\t\t\tif(data) {
\t\t\t\t\tconst optionCheckbox = document.querySelectorAll('.option-checkbox');
\t\t\t\t\t
\t\t\t\t\tfor (var i = 0; i < optionCheckbox.length; i++) {
\t\t\t\t\t\tlet qtyOpt = document.getElementById(`Qty\${optionCheckbox[i].id}`);
\t\t\t\t\t\t// disable unchecked checkbox
\t\t\t\t\t\tif(!optionCheckbox[i].checked) {
\t\t\t\t\t\t\tqtyOpt.disabled = true;
\t\t\t\t\t\t\tqtyOpt.style.display = \"none\";
\t\t\t\t\t\t}
\t\t\t\t\t\toptionCheckbox[i].addEventListener('change', (optMod) => {
\t\t\t\t\t\t\tif (optMod.target.checked) {
\t\t\t\t\t\t\t\tqtyOpt.disabled = false;
\t\t\t\t\t\t\t\tqtyOpt.style.display = \"block\";
\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\tqtyOpt.disabled = true;
\t\t\t\t\t\t\t\tqtyOpt.style.display = \"none\";
\t\t\t\t\t\t\t}
\t\t\t\t\t\t})
\t\t\t\t\t}
\t\t\t\t}
\t\t\t});
\t\t}
\t</script>
\t<script>
\tfunction getGroupOption(id_prod) {
\t\t// console.log('kokokoko',url);
\t\tconsole.log('isID',id_prod);
\t\t// var id_product=314;
\t\t\$(\"#valeurgropOption\").html(\"\");
\t\tfetch(`/tous-options-groups/\${id_prod}`)
\t\t.then(response=> response.json())
\t\t.then(data=>{
\t\t\tconsole.log('tous option', data);
\t\t\t\$(\"#valeurgropOption\").append(data);
\t\t});
\t\t
\t}
\tfunction validechoiModalGroupoption() {
\t\t// \$(\"#modalOptionGP\").modal(\"hide\");
\t\t
\t\tvar url = window.location.href.split('/');
\t\tvar param_url = url[0]+'//'+url[2];
const formData = new FormData();
\t\tvar idProduit = \$('#id_produit').val();
\t\tconsole.log(\"id_porduit\",idProduit);
\t\t
\t\tvar goption= document.getElementsByClassName('goption');
\t\tvar labels =new Array();
\t\tfor (let i = 0; i < goption.length; i++) {
\t\t\tvar id_goption = goption[i].id.split(\"_\");
\t\t\tvar label= document.getElementsByClassName('label_'+id_goption[1]);
\t\t\tvar hidden= document.getElementsByClassName('hidden_'+id_goption[1]);
\t\t\tvar qte= document.getElementsByClassName('qte_'+id_goption[1]);
\t\t\t
\t\t\t// console.log('labeb',label);
\t\t\tvar compter=0;
\t\t\t
\t\t\tvar lab =new Array();
\t\t\tvar qt =new Array();
\t\t\tfor (let l = 0; l < label.length; l++) {
\t\t\tconsole.log('type', label[l].type);
\t\t\t\tif (label[l].type==\"checkbox\" && label[l].checked) {
\t\t\t\t\t
\t\t\t\t\tlab[compter] = hidden[l].value;
\t\t\t\t\tqt[compter] = qte[l].value;
\t\t\t\t\tcompter++
\t\t\t\t}
\t\t\t\tif (label[l].type==\"select-one\" && label[l].value != \"\") {
\t\t\t\t\tlab[compter] = label[l].value;
\t\t\t\t\tqt[compter] = qte[l].value;
\t\t\t\t\tcompter++
\t\t\t\t}
\t\t\t}
\t\t\tlabels[i] = {idoption: id_goption[1], labelo: lab, qte: qt};
\t\t}
\t\t\tconsole.log('valin label',labels);
\t\t\t
\t\t\t// localStorage.setItem('produit_groups', JSON.stringify(labels));
\t\t\tformData.append(\"modifGroupOption\", JSON.stringify(labels));
\t\t\tfetch(`\${param_url}/updateOptionGroups/\${idProduit}`, {
method: \"POST\",
body: formData
\t\t\t\t})
\t\t\t\t.then(response=> response.json())
\t\t\t\t.then(data=>{
\t\t\t\tconsole.log('data_io',data);
\t\t\t\tif (data.message == \"ok\") {
\t\t\t\t\twindow.location.reload();
\t\t\t\t}
\t\t\t\t\$(\"#modalOptionGP\").modal(\"hide\");
\t\t\t});
\t}
\t</script>
\t<script>
\tfunction ajouterOptions(idproduit,qte,prix,url) {
\t\t
\t\tfetch(`\${url}/tousoption/\${idproduit}`)
\t\t.then(response=> response.json())
\t\t.then(data=>{
\t\t\tvar templ=\"\";
\t\t\tvar tousId=[];
\t\t\tconsole.log(\"cocher\",data.opt_pre);
\t\t\tfor (let i = 0; i < data.options.length; i++) {
\t\t\t\ttousId.push(data.options[i].id);
\t\t\t\ttempl+=`<div class=\"oneOptionFP\">
\t\t\t\t\t\t\t<div class=\"row\">
\t\t\t\t
\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t<img id=\"optionbtn1img\" src=\"/upload/produits/\${data.options[i].image1}\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t<div class=\"col-4\">
\t\t\t\t\t\t\t\t\t<img id=\"optionbtn1img\" src=\"/upload/produits/\${data.options[i].image2}\" style=\"height:50px;border-radius:2px\">
\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"custom-checkbox my-1\" style=\"position: relative\">
\t\t\t\t\t\t\t\t<input type=\"checkbox\" data-price=\"\${data.options[i].price}\" data-id=\"\${data.options[i].id}\" name=\"\" value=\"\" class=\"custom-control-input checkboxFP\" id=\"checkboFP_\${[i]}\">
\t\t\t\t\t\t\t\t<label class=\"custom-control-label position-relative\" for=\"checkboFP_\${[i]}\">
\t\t\t\t\t\t\t\t\t<strong style=\"margin-left: 31px;\">\${data.options[i].price}</strong>
\t\t\t\t\t\t\t\t\t<span>-
\t\t\t\t\t\t\t\t\t\${data.options[i].name}</span>
\t\t\t\t\t\t\t\t\t</label>
\t\t\t\t\t\t\t\t<button class=\"btn\" id=\"boutonModif_\${[i]}\" onclick=\"modifOption('\${data.options[i].id}');\" type=\"button\" style=\"display: none\">Modifier</button>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>`;\t\t\t
\t\t\t}
\t\t
\t\t\t\$('#id_produit').val(idproduit);
\t\t\t\$('#price_produit').val(prix);
\t\t\t\$('#qte_produit').val(qte);
\t\t\t\$('#modifAchatFairePart').modal(\"show\");
\t\t\t\$('#tousOptions').html(templ);
\t\t\tfor (let k = 0; k < tousId.length; k++) {
\t\t\t console.log('atooo',tousId,tousId.length);
\t\t\t\tconsole.log('dataio',data.opt_pre);
\t\t\t\t// for (let a = 0; a < data.opt_pre.length; a++) {
\t\t\t\t\t// console.log('avvvvvi',data.opt_pre.length);
\t\t\t\t\tfor(var i in data.opt_pre) {
\t\t\t\t\t\tif(tousId[k]== data.opt_pre[i].idoption){
\t\t\t\t\t\t\tconsole.log(\"tonga aty ihany\");
\t\t\t\t\t\t\t\$('#checkboFP_'+[k]).prop('checked', true);\t
\t\t\t\t\t\t}
\t\t\t\t\t}
\t\t\t\t// }
\t\t\t\tfor (const key in \$('#checkboFP_'+[k])) {
\t\t\t\t\tif (\$('#checkboFP_'+[k])[key].checked) {\t
\t\t\t\t\t\t\$('#boutonModif_'+[k]).attr(\"style\", \"display: block !important\");
\t\t\t\t\t}
\t\t\t\t\telse{
\t\t\t\t\t\tvar evt = document.getElementById('checkboFP_'+[k]);
\t\t\t\t\t\tevt.addEventListener('change',(event) => {
\t\t\t\t\t\t\tif (event.target.checked) {
\t\t\t\t\t\t\t\t\$('#boutonModif_'+[k]).attr(\"style\", \"display: block !important\");
\t\t\t\t\t\t\t}else{
\t\t\t\t\t\t\t\t\$('#boutonModif_'+[k]).attr(\"style\", \"display: none !important\");
\t\t\t\t\t\t\t\t\$(\".forme_options\").attr(\"style\", \"display: none !important\")
\t\t\t\t\t\t\t\t\$(\".m-info\").attr(\"style\", \"display: block !important\")
\t\t\t\t\t\t\t}
\t\t\t\t\t\t});
\t\t\t\t\t}
\t\t\t\t}
\t\t\t}
\t\t});
\t}
\tfunction modifOption(idopt) {
\t\t
\t\tvar url = window.location.href.split('/');
\t\tvar param_url = url[0]+'//'+url[2];
\t\tfetch(`\${param_url}/option/\${idopt}`)
\t\t.then(response=> response.json())
\t\t.then(data=>{
\t\t
\t\t\t\$(\".m-info\").attr(\"style\", \"display: none !important\")
\t\t\t\$(\".forme_options\").attr(\"style\", \"display: block !important\")
\t\t\t\$(\".nice-select\").attr(\"style\", \"display: none !important\");
\t\t\t\$(\"#id_optionFP\").val(idopt);
\t\t\t\$(\"#name_optionFP\").val(data.options.name);
\t\t\t\$(\"#image_optionFP\").val(data.options.image1);
\t
\t\t\tif ( typeof data.options.colorsOption != \"undefined\" && data.options.colorsOption != null && data.options.colorsOption.length != null && data.options.colorsOption.length > 0) {
\t\t\t\tvar colorso =\"\";
\t\t\t\tfor (let i = 0; i < data.options.colorsOption.length; i++) {
\t\t\t\t\tcolorso +='<option>'+ data.options.colorsOption[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_color\").html(colorso);
\t\t\t\t\$(\".optionFP_color\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_color\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_color\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.format != \"undefined\" && data.options.format != null && data.options.format.length != null && data.options.format.length > 0) {
\t\t\t\tvar formatopt =\"\";
\t\t\t\tfor (let i = 0; i < data.options.format.length; i++) {
\t\t\t\t\tformatopt +='<option>'+data.options.format[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_format\").html(formatopt);
\t\t\t\t\$(\".optionFP_format\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_format\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_format\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.finition != \"undefined\" && data.options.finition != null && data.options.finition.length != null && data.options.finition.length > 0) {
\t\t\t\tvar finitions =\"\";
\t\t\t\tfor (let i = 0; i < data.options.finition.length; i++) {
\t\t\t\t\tfinitions +='<option>'+data.options.finition[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_finition\").html(finitions);
\t\t\t\t\$(\".optionFP_finition\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_finition\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_finition\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.papier != \"undefined\" && data.options.papier != null && data.options.papier.length != null && data.options.papier.length > 0) {
\t\t\t\tvar papiers =\"\";
\t\t\t\tfor (let i = 0; i < data.options.papier.length; i++) {
\t\t\t\t\tpapiers +='<option>'+data.options.papier[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_papier\").html(papiers);
\t\t\t\t\$(\".optionFP_papier\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_papier\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_papier\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.quantite != \"undefined\" && data.options.quantite != null && data.options.quantite.length != null && data.options.quantite.length > 0) {
\t\t\t\tvar quantites =\"\";
\t\t\t\tfor (let i = 0; i < data.options.quantite.length; i++) {
\t\t\t\t\tquantites +='<option>'+data.options.quantite[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_quantite\").html(quantites);
\t\t\t\t\$(\".optionFP_quantite\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_quantite\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_quantite\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.etiquette != \"undefined\" && data.options.etiquette != null && data.options.etiquette.length != null && data.options.etiquette.length > 0) {
\t\t\t\tvar etiquettes =\"\";
\t\t\t\tfor (let i = 0; i < data.options.etiquette.length; i++) {
\t\t\t\t\tetiquettes +='<option>'+data.options.etiquette[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_etiquette\").html(etiquettes);
\t\t\t\t\$(\".optionFP_etiquette\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_etiquette\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_etiquette\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t\tif (typeof data.options.ruban != \"undefined\" && data.options.ruban != null && data.options.ruban.length != null && data.options.ruban.length > 0) {
\t\t\t\tvar rubans =\"\";
\t\t\t\tfor (let i = 0; i < data.options.ruban.length; i++) {
\t\t\t\t\trubans +='<option>'+data.options.ruban[i]+'</option>'
\t\t\t\t}
\t\t\t\t\$(\"#optionFP_ruban\").html(rubans);
\t\t\t\t\$(\".optionFP_ruban\").attr(\"style\", \"display: block !important\");
\t\t\t\t\$(\"#optionFP_ruban\").attr(\"style\", \"display: block !important\");
\t\t\t}
\t\t\telse{
\t\t\t\t\$(\".optionFP_ruban\").attr(\"style\", \"display: none !important\");
\t\t\t}
\t\t});\t
\t}
\tfunction Anulleroption() {
\t\t\$(\".forme_options\").attr(\"style\", \"display: none !important\")
\t\t\$(\".m-info\").attr(\"style\", \"display: block !important\")
\t}
\tfunction validechoioption() {
\t\t\$(\".forme_options\").attr(\"style\", \"display: none !important\")
\t\t\$(\".m-info\").attr(\"style\", \"display: block !important\")
\t\tconst data = {
\t\t\t\tidoption: \$(\"#id_optionFP\").val(),
\t\t\t\tnomoption: \$(\"#name_optionFP\").val(),
\t\t\t\timageoption: \$(\"#image_optionFP\").val(),
\t\t\t\tcolor: \$(\"#optionFP_color\").val(),
\t\t\t\tform: \$(\"#optionFP_format\").val(),
\t\t\t\tfinition: \$(\"#optionFP_finition\").val(),
\t\t\t\tpapier: \$(\"#optionFP_papier\").val(),
\t\t\t\tquantite: \$(\"#optionFP_quantite\").val(),
\t\t\t\tetiquette: \$(\"#optionFP_etiquette\").val(),
\t\t\t\truban: \$(\"#optionFP_ruban\").val(),
\t\t\t};
\t\tlocalStorage.setItem(\$(\"#id_optionFP\").val(), JSON.stringify(data));
\t\t\t
\t}
\tfunction validechoiModaloption() {
\t\tvar url = window.location.href.split('/');
\t\tvar param_url = url[0]+'//'+url[2];
const formData = new FormData();
\t\tvar idProduit = \$('#id_produit').val();
\t\tformData.append(\"quantity\",\$('#qte_produit').val());
\t\tformData.append(\"price\",\$('#price_produit').val());
if (Object.keys(localStorage).length != 0) {
\t\tvar values = [],
\t\tkeys = Object.keys(localStorage),
\t\ti = keys.length;
\t\twhile ( i-- ) {
\t\t\tvalues.push( localStorage.getItem(keys[i]) );
\t\t\tlocalStorage.removeItem(keys[i]);
\t\t}
\t\t
\t\tformData.append(\"tail\",values.length);
\t\tconsole.log(\"zzzzz\",values);
\t\tfor (let j = 0; j < values.length; j++) {\t
\t\t formData.append(\"OpId_\"+j, values[j]);
\t\t}
\t }
\t
\t\tvar checkOpt = document.querySelectorAll('.checkboxFP');
\t\tconsole.log(\"fff\", checkOpt);
\t\tconsole.log(\"eee\", checkOpt.length);
\t\tvar valeur=[];
\t\tfor (var p = 0; p < checkOpt.length; p++) {
\t\t\t
\t\t\tif (checkOpt[p].checked) {
\t\t\t\tvar idOpt = checkOpt[p].getAttribute('data-id');
\t\t\t\tvaleur.push(idOpt);
\t\t\t}
\t\t}
\t\t\tformData.append(\"idoptions\",valeur);
\t
\t\tfetch(`\${param_url}/updateOptionFairepart/\${idProduit}`, {
method: \"POST\",
body: formData
})
\t\t.then(response=> response.json())
\t\t.then(data=>{
console.log('data_io',data);
\t\t if (data.message == \"ok\") {
\t\t\twindow.location.reload();
\t\t }
\t \$(\"#modifAchatFairePart\").modal(\"hide\");
\t\t});
\t}
\t</script>
{% endblock %}", "front/command/basket.html.twig", "/var/www/vhosts/hobbiinn.com/httpdocs/providdersvacance/templates/front/command/basket.html.twig");
}
}