var/cache/dev/twig/d8/d83c805e58f03282bc29e28492e74920.php line 51

  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. /* @Flexy/FrontBundle/Themes/IlaveU/templates/cart/cart.html.twig */
  15. class __TwigTemplate_865f56836c4ef6489e3f4a686e234150 extends Template
  16. {
  17.     private $source;
  18.     private $macros = [];
  19.     public function __construct(Environment $env)
  20.     {
  21.         parent::__construct($env);
  22.         $this->source $this->getSourceContext();
  23.         $this->blocks = [
  24.             'stylesheets' => [$this'block_stylesheets'],
  25.             'body' => [$this'block_body'],
  26.             'javascripts' => [$this'block_javascripts'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 1
  32.         return "@Flexy/FrontBundle/Themes/IlaveU/templates/layout.html.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Flexy/FrontBundle/Themes/IlaveU/templates/cart/cart.html.twig"));
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Flexy/FrontBundle/Themes/IlaveU/templates/cart/cart.html.twig"));
  41.         $this->parent $this->loadTemplate("@Flexy/FrontBundle/Themes/IlaveU/templates/layout.html.twig""@Flexy/FrontBundle/Themes/IlaveU/templates/cart/cart.html.twig"1);
  42.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  43.         
  44.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  45.         
  46.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  47.     }
  48.     // line 4
  49.     public function block_stylesheets($context, array $blocks = [])
  50.     {
  51.         $macros $this->macros;
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  53.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  55.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  56.         // line 5
  57.         yield "
  58. \t";
  59.         // line 6
  60.         yield from $this->yieldParentBlock("stylesheets"$context$blocks);
  61.         yield "
  62. \t<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/jquery-toast-plugin/1.3.2/jquery.toast.min.css\" integrity=\"sha512-wJgJNTBBkLit7ymC6vvzM1EcSWeM9mmOu+1USHaRBbHkm6W9EgM0HY27+UtUaprntaYQJF75rc8gjxllKs5OIQ==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\" />
  63.     <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css\" integrity=\"sha512-tS3S5qG0BlhnQROyJXvNjeEM4UpMXHrQfTGmbQ1gKmelCxlSEBUaxhRBj/EFTzpbP4RVSrpEikbmdJobCvhE3g==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\" />
  64.     <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css\" integrity=\"sha512-sMXtMNL1zRzolHYKEujM2AqCLUR9F2C4/05cdbxjjLSRvMQIciEPCQZo++nk7go3BtSuK9kfa/s+a4f4i5pLkw==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\" />
  65. ";
  66.         
  67.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  68.         
  69.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  70.         return; yield '';
  71.     }
  72.     // line 13
  73.     public function block_body($context, array $blocks = [])
  74.     {
  75.         $macros $this->macros;
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  77.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  78.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  79.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  80.         // line 14
  81.         yield "
  82.     <style>
  83. #collectMap,#shippingMap {
  84.   width: 100%;
  85.   height: 400px;
  86. }
  87.     .pay-with-wallet .item{
  88.         padding:10px 7px;
  89.         margin:0 10px;
  90.         font-weight:bold;
  91.         background:#45dae9;
  92.         color:white;
  93.         border-radius:50px;
  94.         text-align:center;
  95.         font-size:14px;
  96.     }
  97.     .pay-with-wallet .item.selected{
  98.         
  99.         background:#febc4a;
  100.     }
  101.     .tips-shipping-agent .item{
  102.         padding:10px 15px;
  103.         margin:0 10px;
  104.         font-weight:bold;
  105.         background:#45dae9;
  106.         color:white;
  107.         border-radius:50px;
  108.         text-align:center;
  109.     }
  110.     .tips-shipping-agent .item.selected{
  111.         
  112.         background:#febc4a;
  113.     }
  114. .owl-carousel .owl-nav button.owl-next, .owl-carousel .owl-nav button.owl-prev, .owl-carousel button.owl-dot{
  115.     background:#d5d5d5;
  116. }
  117. .owl-dots {
  118.      bottom:-35px; 
  119. }
  120. \t.choices-shipping{
  121. \t\tfont-size:13px;
  122.     }
  123.    .choices-shipping div div {
  124.     /* border: 2px dotted #ccc; */
  125.     padding: 20px;
  126.     background: #f2f2f2;
  127. }
  128.     .choices-shipping div div.active {
  129.     background-color: #45dae9;
  130.     border-color: #29cedf;
  131.     color: white;
  132. }
  133. \t
  134. \t.jq-toast-wrap {
  135.     display: block;
  136.     position: fixed;
  137.     width: 500px;
  138.     pointer-events: none!important;
  139.     letter-spacing: normal;
  140.     z-index: 9000!important;
  141. }
  142. .jq-icon-warning {
  143.     
  144.     background-color: #9a0062;
  145. }
  146.     </style>
  147. \t<div 
  148. \t\tclass=\"body-wrapper\" >
  149. \t\t<!-- Begin Li's Breadcrumb Area -->
  150. \t\t<div class=\"breadcrumb-area\">
  151. \t\t\t<div class=\"container\">
  152. \t\t\t\t<ul id=\"progressbar\">
  153. \t\t\t\t\t<li class=\"active\">Livraison
  154. \t\t\t\t\t</li>
  155. \t\t\t\t\t<li>Paiement et coordonnées</li>
  156. \t\t\t\t\t<li>Resumé</li>
  157. \t\t\t\t</ul>
  158. \t\t\t</div>
  159. \t\t</div>
  160. \t\t<!-- Li's Breadcrumb Area End Here -->
  161. \t\t<!--Shopping Cart Area Strat-->
  162. \t\t<div class=\"Shopping-cart-area pt-60 pb-60\">
  163. \t\t\t<div class=\"container\">
  164. \t\t\t\t<div class=\"row \">
  165. \t\t\t\t\t<div class=\"col-12\">
  166. \t\t\t\t\t\t<form action=\"#\">
  167. \t\t\t\t\t\t\t<div class=\"table-content table-responsive d-none\">
  168. \t\t\t\t\t\t\t\t<table class=\"table table-striped\">
  169. \t\t\t\t\t\t\t\t\t<thead>
  170. \t\t\t\t\t\t\t\t\t\t<tr>
  171. \t\t\t\t\t\t\t\t\t\t\t<th class=\"li-product-remove\">Supprimer</th>
  172. \t\t\t\t\t\t\t\t\t\t\t<th class=\"li-product-thumbnail\">images</th>
  173. \t\t\t\t\t\t\t\t\t\t\t<th class=\"cart-product-name\">Product</th>
  174. \t\t\t\t\t\t\t\t\t\t\t<th class=\"li-product-price\">Prix unitaire</th>
  175. \t\t\t\t\t\t\t\t\t\t\t<th class=\"li-product-quantity\">Quantité</th>
  176. \t\t\t\t\t\t\t\t\t\t\t<th class=\"li-product-subtotal\">Total</th>
  177. \t\t\t\t\t\t\t\t\t\t</tr>
  178. \t\t\t\t\t\t\t\t\t</thead>
  179. \t\t\t\t\t\t\t\t\t<tbody
  180. \t\t\t\t\t\t\t\t\t\tclass=\"cart\"><!-- LocalStorage Cart Items -->
  181. \t\t\t\t\t\t\t\t\t</tbody>
  182. \t\t\t\t\t\t\t\t</table>
  183. \t\t\t\t\t\t\t</div>
  184. \t\t\t\t\t\t\t
  185.                                                 
  186. \t\t\t\t\t\t\t<div class=\"row\">
  187. \t\t\t\t\t\t\t\t<div class=\"col-md-7 \">
  188.                                     <div class=\"row\">
  189.                                     <div class=\"col-12\">
  190.                                     <!--Accordion Start-->
  191.                                 <p style=\"font-weight:bold;\">Avez-vous un code promo? <span id=\"showcoupon\" style=\"cursor:pointer;\">Cliquez ici pour saisir votre code</span></p>
  192.                                 <div id=\"checkout_coupon\" class=\"coupon-checkout-content\">
  193.                                     <div class=\"coupon-info\">
  194.                                         <div class=\"input-group\">
  195.                                             <input type=\"text\" class=\"form-control\" placeholder=\"Votre code promo\" data-coupon-value=\"0\" data-coupon-type=\"amount\" name=\"codeCoupon\" aria-label=\"Recipient's username\" aria-describedby=\"button-codeCoupon\" value=\"\">
  196.                                             <button class=\"btn btn-success orderPreview\" type=\"button\" id=\"button-codeCoupon\">Appliquer</button>
  197.                                         </div>
  198.                                         </div>
  199.                                     </div>
  200.                                     </div>
  201.                                 </div>
  202.                                 <!--Accordion End-->
  203.                                         
  204.                                     
  205.                                 
  206.                                     <div class=\"row choices-shipping\" style=\"margin-bottom:40px; \">
  207. \t\t\t\t\t\t\t\t\t\t\t";
  208.         // line 160
  209.         $context['_parent'] = $context;
  210.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["shippingMethods"]) || array_key_exists("shippingMethods"$context) ? $context["shippingMethods"] : (function () { throw new RuntimeError('Variable "shippingMethods" does not exist.'160$this->source); })()));
  211.         foreach ($context['_seq'] as $context["_key"] => $context["singleShippingMethod"]) {
  212.             // line 161
  213.             yield "                                                <div  class=\"col-6 mt-4\" >
  214.                                                    <div style=\"min-height:180px;\" data-id=\"";
  215.             // line 162
  216.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["singleShippingMethod"], "id", [], "any"falsefalsefalse162), "html"nulltrue);
  217.             yield "\" class=\"shippingMethod ";
  218.             if (($context["singleShippingMethod"] == Twig\Extension\CoreExtension::first($this->env->getCharset(), (isset($context["shippingMethods"]) || array_key_exists("shippingMethods"$context) ? $context["shippingMethods"] : (function () { throw new RuntimeError('Variable "shippingMethods" does not exist.'162$this->source); })())))) {
  219.                 yield "active";
  220.             }
  221.             yield "\">
  222.                                                      <h4>";
  223.             // line 163
  224.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["singleShippingMethod"], "name", [], "any"falsefalsefalse163), "html"nulltrue);
  225.             yield "</h4>
  226.                                                     <ul>
  227.                                                     <li>
  228. \t\t\t\t\t\t\t\t\t\t\t\t\t\t";
  229.             // line 166
  230.             $context["shippingDurationValue"] = CoreExtension::getAttribute($this->env$this->source$context["singleShippingMethod"], "shippingDuration", [], "any"falsefalsefalse166);
  231.             // line 167
  232.             yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
  233.             $context["shippingDurationUnit"] = "H";
  234.             // line 168
  235.             yield "\t\t\t\t\t\t\t\t\t\t\t\t\t";
  236.             if (((isset($context["shippingDurationValue"]) || array_key_exists("shippingDurationValue"$context) ? $context["shippingDurationValue"] : (function () { throw new RuntimeError('Variable "shippingDurationValue" does not exist.'168$this->source); })()) < 1)) {
  237.                 // line 169
  238.                 yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
  239.                 $context["shippingDurationValue"] = (60 CoreExtension::getAttribute($this->env$this->source$context["singleShippingMethod"], "shippingDuration", [], "any"falsefalsefalse169));
  240.                 // line 170
  241.                 yield "\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
  242.                 $context["shippingDurationUnit"] = "Min";
  243.                 // line 171
  244.                 yield "\t\t\t\t\t\t\t\t\t\t\t\t\t";
  245.             }
  246.             // line 172
  247.             yield "\t\t\t\t\t\t\t\t\t\t\t\t\tTemps d’attente du Speeder <span class=\"float-right slot\">";
  248.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["shippingDurationValue"]) || array_key_exists("shippingDurationValue"$context) ? $context["shippingDurationValue"] : (function () { throw new RuntimeError('Variable "shippingDurationValue" does not exist.'172$this->source); })()), "html"nulltrue);
  249.             yield " ";
  250.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["shippingDurationUnit"]) || array_key_exists("shippingDurationUnit"$context) ? $context["shippingDurationUnit"] : (function () { throw new RuntimeError('Variable "shippingDurationUnit" does not exist.'172$this->source); })()), "html"nulltrue);
  251.             yield "</span></li>
  252.                                                     <li  class=\"\">Récuperation de la commande <span class=\"float-right\">";
  253.             // line 173
  254.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["singleShippingMethod"], "preparationDuration", [], "any"falsefalsefalse173), "html"nulltrue);
  255.             yield " H</span></li>
  256.                                                     <li>Livraison en <span class=\"float-right\">";
  257.             // line 174
  258.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["singleShippingMethod"], "processingDuration", [], "any"falsefalsefalse174), "html"nulltrue);
  259.             yield " H</span></li>
  260. \t\t\t\t\t\t\t\t\t\t\t\t\t";
  261.             // line 175
  262.             if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env$this->source$context["singleShippingMethod"], "shippingRules", [], "any"falsefalsefalse175)) > 0)) {
  263.                 // line 176
  264.                 yield "                                                    <li style=\"line-height: 15px;\"><small>";
  265.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["singleShippingMethod"], "description", [], "any"falsefalsefalse176), "html"nulltrue);
  266.                 yield "</small></li>
  267. \t\t\t\t\t\t\t\t\t\t\t\t\t";
  268.             }
  269.             // line 178
  270.             yield "                                                </ul>
  271.                                                    </div>
  272. \t\t\t\t\t\t\t\t\t\t\t\t
  273.                                                 </div>
  274. \t\t\t\t\t\t\t\t\t\t\t\t";
  275.         }
  276.         $_parent $context['_parent'];
  277.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['singleShippingMethod'], $context['_parent'], $context['loop']);
  278.         $context array_intersect_key($context$_parent) + $_parent;
  279.         // line 184
  280.         yield "                                                
  281.                                             </div>
  282. \t\t\t\t\t\t\t\t\t<div class=\"row\" >
  283. \t\t\t\t\t\t\t\t\t<div class=\"item aos-init aos-animate  col-6\" id=\"accordionRecovery\" data-aos=\"fade-up\">
  284. \t\t\t\t\t\t\t\t\t\t<h6>Informations de récupération</h6>
  285. \t\t\t\t\t\t\t\t\t\t<div class=\"bg-white\">
  286. \t\t\t\t\t\t\t\t\t\t\t<div class=\"row\">
  287. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"box col-sm-5 col-md-12 col-lg-5\">
  288. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>Date</label>
  289. \t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"d-flex\">
  290. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control datedropper chooseDate\"  data-dd-min-date=\"";
  291.         // line 194
  292.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate("now""Y/m/d"), "html"nulltrue);
  293.         yield "\" value=\"";
  294.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate("now""Y/m/d"), "html"nulltrue);
  295.         yield "\" name=\"startProcessingAt\"    />
  296. \t\t\t\t\t\t\t\t\t\t\t\t\t\t
  297. \t\t\t\t\t\t\t\t\t\t\t\t\t</div>
  298. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  299. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"box col-sm-7 col-md-12 col-lg-7\">
  300. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>Heure</label>
  301. \t\t\t\t\t\t\t\t\t\t\t\t\t<span id=\"recovery_slot\">
  302. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<select id=\"receive_time\" class=\"custom-select custom-select-recieve\" name=\"collectTime\" data-day=\"0\">
  303. \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"08:00\" >Sélectionner un crénau</option>
  304. \t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>
  305. \t\t\t\t\t\t\t\t\t\t\t\t\t</span>
  306. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  307. \t\t\t\t\t\t\t\t\t\t\t</div>
  308. \t\t\t\t\t\t\t\t\t\t\t
  309. \t\t\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">
  310. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group box col-sm-12\">
  311. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>
  312. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Adresse de récupération</b>
  313. \t\t\t\t\t\t\t\t\t\t\t\t\t</label>
  314. \t\t\t\t\t\t\t\t\t\t\t\t\t<!-- Button trigger modal -->
  315. \t\t\t\t\t\t\t\t\t\t\t\t\t
  316.                                                         <select class=\"mb-2\" name=\"collectCityRegion\" >
  317.                                                             ";
  318.         // line 216
  319.         $context['_parent'] = $context;
  320.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["cityRegions"]) || array_key_exists("cityRegions"$context) ? $context["cityRegions"] : (function () { throw new RuntimeError('Variable "cityRegions" does not exist.'216$this->source); })()));
  321.         foreach ($context['_seq'] as $context["_key"] => $context["cityRegion"]) {
  322.             // line 217
  323.             yield "                                                                <option data-lat=\"";
  324.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["cityRegion"], "lat", [], "any"falsefalsefalse217), "html"nulltrue);
  325.             yield "\" data-lng=\"";
  326.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["cityRegion"], "lng", [], "any"falsefalsefalse217), "html"nulltrue);
  327.             yield "\" value=\"";
  328.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["cityRegion"], "id", [], "any"falsefalsefalse217), "html"nulltrue);
  329.             yield "\">";
  330.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["cityRegion"], "name", [], "any"falsefalsefalse217), "html"nulltrue);
  331.             yield "</option>
  332.                                                             ";
  333.         }
  334.         $_parent $context['_parent'];
  335.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['cityRegion'], $context['_parent'], $context['loop']);
  336.         $context array_intersect_key($context$_parent) + $_parent;
  337.         // line 219
  338.         yield "                                                        </select>
  339. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"collect_address\" name=\"collect_address\" value=\"Maarif, Casablanca, Maroc\" class=\"form-control w-100\" >
  340.                                                         <a  href=\"#\" id=\"modalShippingMap\" type=\"button\"  data-bs-toggle=\"modal\" data-bs-target=\"#collectMapModal\" class=\"btn btn-success mt-2\"  style=\"\" ><i class=\"fa-solid fa-location-dot\"></i> Location</a>
  341.     
  342. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  343. \t\t\t\t\t\t\t\t\t\t\t</div>
  344. \t\t\t\t\t\t\t\t\t\t</div>
  345. \t\t\t\t\t\t\t\t\t</div>
  346. \t\t\t\t\t\t\t\t\t<div class=\"item aos-init aos-animate col-6\" id=\"accordionRecovery\" data-aos=\"fade-up\">
  347. \t\t\t\t\t\t\t\t\t\t<h6>Informations de livraison</h6>
  348. \t\t\t\t\t\t\t\t\t\t<div class=\"bg-white\"> 
  349.                                             
  350. \t\t\t\t\t\t\t\t\t\t\t<div class=\"row\">
  351. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"box col-sm-5 col-md-12 col-lg-5\">
  352. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>Date</label>
  353. \t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"d-flex\">
  354. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control datedropper chooseDate\"  name=\"startDeliveryAt\" value=\"";
  355.         // line 239
  356.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate("now""Y/m/d"), "html"nulltrue);
  357.         yield "\"   />
  358. \t\t\t\t\t\t\t\t\t\t\t\t\t\t
  359. \t\t\t\t\t\t\t\t\t\t\t\t\t</div>
  360. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  361. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"box col-sm-7 col-md-12 col-lg-7\">
  362. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>Heure</label>
  363. \t\t\t\t\t\t\t\t\t\t\t\t\t<span id=\"recovery_slot\">
  364. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<select id=\"receive_time\" class=\"custom-select custom-select-recieve\" name=\"shippingTime\" data-day=\"0\">
  365. \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"08:00\" >Sélectionner un crénau</option>
  366. \t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>
  367. \t\t\t\t\t\t\t\t\t\t\t\t\t</span>
  368. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  369. \t\t\t\t\t\t\t\t\t\t\t</div>
  370. \t\t\t\t\t\t\t\t\t\t\t
  371. \t\t\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">
  372. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group box col-sm-12\">
  373. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>
  374. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Adresse de livraison</b>
  375. \t\t\t\t\t\t\t\t\t\t\t\t\t</label>
  376. \t\t\t\t\t\t\t\t\t\t\t\t\t
  377.                                                         <select class=\"mb-2\" name=\"shippingCityRegion\" >
  378.                                                             ";
  379.         // line 260
  380.         $context['_parent'] = $context;
  381.         $context['_seq'] = CoreExtension::ensureTraversable((isset($context["cityRegions"]) || array_key_exists("cityRegions"$context) ? $context["cityRegions"] : (function () { throw new RuntimeError('Variable "cityRegions" does not exist.'260$this->source); })()));
  382.         foreach ($context['_seq'] as $context["_key"] => $context["cityRegion"]) {
  383.             // line 261
  384.             yield "                                                                <option data-lat=\"";
  385.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["cityRegion"], "lat", [], "any"falsefalsefalse261), "html"nulltrue);
  386.             yield "\" data-lng=\"";
  387.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["cityRegion"], "lng", [], "any"falsefalsefalse261), "html"nulltrue);
  388.             yield "\" value=\"";
  389.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["cityRegion"], "id", [], "any"falsefalsefalse261), "html"nulltrue);
  390.             yield "\">";
  391.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["cityRegion"], "name", [], "any"falsefalsefalse261), "html"nulltrue);
  392.             yield "</option>
  393.                                                             ";
  394.         }
  395.         $_parent $context['_parent'];
  396.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['cityRegion'], $context['_parent'], $context['loop']);
  397.         $context array_intersect_key($context$_parent) + $_parent;
  398.         // line 263
  399.         yield "                                                        </select>
  400. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"shipping_address\" name=\"shipping_address\" value=\"Maarif, Casablanca, Maroc\" class=\"form-control w-100 \" />
  401.                                                             
  402. \t\t\t\t\t\t\t\t\t\t\t\t\t\t
  403. \t\t\t\t\t\t\t\t\t\t\t\t\t
  404.                                                     <a href=\"#\" id=\"modalShippingMap\" type=\"button\"  data-bs-toggle=\"modal\" data-bs-target=\"#collectMapModal\" class=\"btn btn-success mt-2\" style=\"\" ><i class=\"fa-solid fa-location-dot\"></i> Location</a>
  405. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  406. \t\t\t\t\t\t\t\t\t\t\t</div>
  407. \t\t\t\t\t\t\t\t\t\t</div>
  408. \t\t\t\t\t\t\t\t\t</div>
  409.                                     
  410.                                     ";
  411.         // line 278
  412.         if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_CUSTOMER") && ((isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'278$this->source); })()) != null))) {
  413.             // line 279
  414.             yield "                                    <div class=\"col-12 mt-5\" >
  415.                                         <h6>Payer avec ma wallet ";
  416.             // line 280
  417.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'280$this->source); })()), "credit", [], "any"falsefalsefalse280), "html"nulltrue);
  418.             yield " DH</h6>
  419.                                         <div class=\"owl-carousel pay-with-wallet d-none mt-4\">
  420.                                             ";
  421.             // line 282
  422.             if ((CoreExtension::getAttribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'282$this->source); })()), "credit", [], "any"falsefalsefalse282) > 0)) {
  423.                 // line 283
  424.                 yield "                                            ";
  425.                 $context["counterCredit"] = 0;
  426.                 // line 284
  427.                 yield "                                                    ";
  428.                 $context['_parent'] = $context;
  429.                 $context['_seq'] = CoreExtension::ensureTraversable(range(0, (isset($context["totalCart"]) || array_key_exists("totalCart"$context) ? $context["totalCart"] : (function () { throw new RuntimeError('Variable "totalCart" does not exist.'284$this->source); })())));
  430.                 foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  431.                     // line 285
  432.                     yield "                                                        ";
  433.                     if ((((CoreExtension::getAttribute($this->env$this->source,                     // line 286
  434. (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'286$this->source); })()), "credit", [], "any"falsefalsefalse286) >= $context["i"]) && (CoreExtension::getAttribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'286$this->source); })()), "credit", [], "any"falsefalsefalse286) <= (isset($context["totalCart"]) || array_key_exists("totalCart"$context) ? $context["totalCart"] : (function () { throw new RuntimeError('Variable "totalCart" does not exist.'286$this->source); })()))) || ((CoreExtension::getAttribute($this->env$this->source,                     // line 287
  435. (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'287$this->source); })()), "credit", [], "any"falsefalsefalse287) >= $context["i"]) && (CoreExtension::getAttribute($this->env$this->source, (isset($context["customer"]) || array_key_exists("customer"$context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.'287$this->source); })()), "credit", [], "any"falsefalsefalse287) >= (isset($context["totalCart"]) || array_key_exists("totalCart"$context) ? $context["totalCart"] : (function () { throw new RuntimeError('Variable "totalCart" does not exist.'287$this->source); })()))))) {
  436.                         // line 289
  437.                         yield "                                                            <div data-value=\"";
  438.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["i"], "html"nulltrue);
  439.                         yield "\" class=\"item\"> ";
  440.                         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["i"], "html"nulltrue);
  441.                         yield " DH</div>
  442.                                                             ";
  443.                         // line 290
  444.                         $context["counterCredit"] = ((isset($context["counterCredit"]) || array_key_exists("counterCredit"$context) ? $context["counterCredit"] : (function () { throw new RuntimeError('Variable "counterCredit" does not exist.'290$this->source); })()) + $context["i"]);
  445.                         // line 291
  446.                         yield "                                                         ";
  447.                     }
  448.                     // line 292
  449.                     yield "                                                
  450.                                             ";
  451.                 }
  452.                 $_parent $context['_parent'];
  453.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  454.                 $context array_intersect_key($context$_parent) + $_parent;
  455.                 // line 294
  456.                 yield "                                            ";
  457.             }
  458.             // line 295
  459.             yield "                                            
  460.                                             
  461.                                             </div>
  462.                                     </div>
  463.                                     ";
  464.         }
  465.         // line 301
  466.         yield "\t\t\t\t\t\t\t\t\t</div>
  467. \t\t\t\t\t\t\t\t\t
  468.                                     <hr>
  469.                                     
  470. \t\t\t\t\t\t\t\t</div>
  471. \t\t\t\t\t\t\t\t <div class=\"col-lg-5 col-12\">
  472.                             <div class=\"your-order\">
  473.                                 <h3>Votre commande</h3>
  474.                                 <div class=\"shipping\" >
  475.                                
  476.                                 </div>
  477.                                 <div class=\"your-order-table table-responsive\">
  478.                                     <table class=\"table\">
  479.                                         <thead>
  480.                                             <tr>
  481.                                                 <th class=\"cart-product-name\">Produit</th>
  482.                                                 <th class=\"cart-product-total\">Total</th>
  483.                                             </tr>
  484.                                         </thead>
  485.                                         <tbody class=\"cart-checkout\">
  486.  
  487.                                         </tbody>
  488.                                         <tfoot>
  489.                                             <tr class=\"cart-subtotal\">
  490.                                                 <th>Sous total</th>
  491.                                                 <td><span class=\"amount total-checkout total\">0,00 MAD </span></td>
  492.                                             </tr>
  493. \t\t\t\t\t\t\t\t\t\t\t<tr class=\"cart-subtotal promo\">
  494.                                                 <th>Reduction coupon</th>
  495.                                                 <td><span class=\"amount codepromo\">0,00 MAD </span></td>
  496.                                             </tr>
  497.                                             ";
  498.         // line 347
  499.         yield "
  500.                                             ";
  501.         // line 352
  502.         yield "                                            
  503. \t\t\t\t\t\t\t\t\t\t\t<tr class=\"cart-subtotal\">
  504.                                                 <th>Frais de livraison</th>
  505.                                                 <td><span class=\"amount shipping-method-fees\">0,00 MAD </span></td>
  506.                                             </tr>
  507.                                             <tr class=\"order-total\">
  508.                                                 <th>Montant á payer</th>
  509.                                                 <td><strong><span class=\"amount total-checkout total-to-pay \">0,00 MAD</span></strong></td>
  510.                                             </tr>
  511. \t\t\t\t\t\t\t\t\t\t\t
  512.                                             <tr>
  513.                                                 <td colspan=\"2\" ><a href=\"#\" class=\"save-button btn btn-primary d-block\">Continuer</a></td>
  514.                                             </tr>
  515.                                         </tfoot>
  516.                                     </table>
  517.                                     
  518.                                 </div>
  519.                                 
  520.                             </div>
  521.                         </div>
  522. \t\t\t\t\t\t\t</div>
  523. \t\t\t\t\t\t</form>
  524. \t\t\t\t\t</div>
  525. \t\t\t\t</div>
  526. \t\t\t</div>
  527. \t\t</div>
  528. \t\t<!--Shopping Cart Area End-->
  529. \t</div>
  530. \t<!-- Body Wrapper End Here -->
  531.     <!-- Button trigger modal -->
  532. ";
  533.         
  534.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  535.         
  536.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  537.         return; yield '';
  538.     }
  539.     // line 394
  540.     public function block_javascripts($context, array $blocks = [])
  541.     {
  542.         $macros $this->macros;
  543.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  544.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  545.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  546.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  547.         // line 395
  548.         yield "    ";
  549.         yield from $this->yieldParentBlock("javascripts"$context$blocks);
  550.         yield "
  551. \t<script type=\"text/javascript\" src=\"https://maps.googleapis.com/maps/api/js?key=AIzaSyBFliT4Ug0Ugto5davRC7krsyMhTfkI-L4&libraries=places\"></script>
  552.     <script src=\"https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js\" integrity=\"sha512-bPs7Ae6pVvhOSiIcyUClR7/q2OAsRiovw4vAkX+zJbw3ShAeeqezq50RIIcIURq7Oa20rW2n2q+fyXBNcU9lrw==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>
  553. \t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery-toast-plugin/1.3.2/jquery.toast.min.js\" integrity=\"sha512-zlWWyZq71UMApAjih4WkaRpikgY9Bz1oXIW5G0fED4vk14JjGlQ1UmkGM392jEULP8jbNMiwLWdM8Z87Hu88Fw==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>
  554. \t<script src=\"";
  555.         // line 399
  556.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("flexy/js/datedropper/datedropper-javascript.js"), "html"nulltrue);
  557.         yield "\"></script>
  558. <script src=\"";
  559.         // line 400
  560.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("flexy/js/datedropper/datedropper-javascript-lang-FR.js"), "html"nulltrue);
  561.         yield "\"></script>
  562.     <script>
  563. \tdocument.addEventListener(\"turbo:load\", function() {
  564. var isCollectReadyForCheckout = false;
  565. var isShippingReadyForCheckout = false;
  566. new dateDropper({
  567.   lang:\"fr\",
  568.   //format: \"dd/m/y\",
  569.   selector: \"input[name='startProcessingAt']\",
  570.   minDate: \"";
  571.         // line 413
  572.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate("yesterday""Y-m-d"), "html"nulltrue);
  573.         yield "\",
  574.   //autoFill:false,
  575.   expandable: true,
  576.   onChange: function (res) {
  577.     \$(\"input[name='startProcessingAt']\").trigger(\"change\");
  578.   }
  579. });
  580. new dateDropper({
  581.   lang:\"fr\",
  582.   //format: \"dd/m/y\",
  583.   selector: \"input[name='startDeliveryAt']\",
  584.   //autoFill:false,
  585.   expandable: true,
  586.   onChange: function (res) {
  587.     \$(\"input[name='startProcessingAt']\").trigger(\"change\");
  588.   }
  589. });
  590. \$(document).ready(function(){  
  591.     
  592.   \$(\".tips-shipping-agent\").owlCarousel({
  593.     dots:true,
  594.     items:5,
  595.     nav:false,
  596.     onChanged:function(){
  597.         \$(\".tips-shipping-agent\").removeClass(\"d-none\");
  598.     }
  599.   });
  600.   \$(\".pay-with-wallet\").owlCarousel({
  601.     dots:true,
  602.     items:7,
  603.     nav:false,
  604.     onChanged:function(){
  605.         \$(\".pay-with-wallet\").removeClass(\"d-none\");
  606.     }
  607.   });
  608.   
  609.     \$(\".pay-with-wallet .item\").click(function(){
  610.     \$(\".pay-with-wallet .item\").removeClass(\"selected\");
  611.      \$(this).addClass(\"selected\");
  612.      walletPayment = parseFloat(\$(this).attr(\"data-value\"));
  613.      
  614.      \$(\".wallet-payment\").html( (walletPayment) + \" DH\");
  615.      \$(\".total-to-pay\").html( ((total) - (amount) - (reductionCoupon) - (walletPayment)) + (shippingFees) + (shippingTips) + \" DH\");
  616.   });
  617.        var inputCollectAddress = document.getElementById('collect_address');
  618. \t   var inputShippingAddress = document.getElementById('shipping_address');
  619.        
  620. var optionsCollect = {
  621.   //types: ['(cities)'],
  622.   componentRestrictions: {country: 'ma'}
  623. };
  624. var optionsShipping = {
  625.   //types: ['(cities)'],
  626.   componentRestrictions: {country: 'ma'}
  627. };
  628.  var centerLatCollect = \$(\"select[name='collectCityRegion']\").find(\"option:selected\").attr(\"data-lat\"); // example latitude
  629.   var centerLngCollect = \$(\"select[name='collectCityRegion']\").find(\"option:selected\").attr(\"data-lng\"); // example longitude
  630.    var centerLatShipping =\$(\"select[name='shippingCityRegion']\").find(\"option:selected\").attr(\"data-lat\"); // example latitude
  631.   var centerLngShipping =\$(\"select[name='shippingCityRegion']\").find(\"option:selected\").attr(\"data-lng\"); // example longitude
  632. var centerPointCollect = new google.maps.LatLng(centerLatCollect, centerLngCollect);
  633. var centerPointShipping = new google.maps.LatLng(centerLatShipping, centerLngShipping);
  634. // Set the desired radius in meters
  635. var radius = 10000; // 10 kilometers
  636. var boundsCollect = new google.maps.Circle({ center: centerPointCollect, radius: radius }).getBounds();
  637. var boundsShipping = new google.maps.Circle({ center: centerPointCollect, radius: radius }).getBounds();
  638.   \$(\"select[name='collectCityRegion']\").change(function(){
  639.     centerLatCollect = \$(\"select[name='collectCityRegion']\").find(\"option:selected\").attr(\"data-lat\");
  640.     
  641.     centerLngCollect = \$(\"select[name='collectCityRegion']\").find(\"option:selected\").attr(\"data-lng\");
  642.      centerPointCollect = new google.maps.LatLng(centerLatCollect, centerLngCollect);
  643.      boundsCollect = new google.maps.Circle({ center: centerPointCollect, radius: radius }).getBounds();
  644.   });
  645.     \$(\"select[name='shippingCityRegion']\").change(function(){
  646.     centerLatShipping = \$(\"select[name='shippingCityRegion']\").find(\"option:selected\").attr(\"data-lat\");
  647.     centerLngShipping = \$(\"select[name='shippingCityRegion']\").find(\"option:selected\").attr(\"data-lng\");
  648.      centerPointShipping = new google.maps.LatLng(centerLatShipping, centerLngShipping);
  649.      boundsShipping = new google.maps.Circle({ center: centerPointCollect, radius: radius }).getBounds();
  650.     
  651.   });
  652. var autocompleteCollect = new google.maps.places.Autocomplete(inputCollectAddress, optionsCollect);
  653. var autocompleteShipping = new google.maps.places.Autocomplete(inputShippingAddress, optionsShipping);
  654. google.maps.event.addListener(autocompleteCollect, 'place_changed', function() {
  655.     
  656.     
  657.     var lngCollect = autocompleteCollect.getPlace().geometry.location.lng();
  658.     var latCollect = autocompleteCollect.getPlace().geometry.location.lat();
  659.         if (autocompleteCollect.getPlace() && boundsCollect && boundsCollect.contains(autocompleteCollect.getPlace().geometry.location)) {
  660.             // Place falls within the specified radius
  661.             isCollectReadyForCheckout = true;
  662.             console.log('Place collect is within the specified radius:', autocompleteCollect.getPlace());
  663.         } else {
  664.             isCollectReadyForCheckout = false;
  665.             // Place is outside the specified radius
  666.             console.log('Place collect is outside the specified radius:', autocompleteCollect.getPlace());
  667.         }
  668.     
  669. });
  670. google.maps.event.addListener(autocompleteShipping, 'place_changed', function() {
  671.     
  672.     
  673.     var lngShipping = autocompleteShipping.getPlace().geometry.location.lng();
  674.     var latShipping = autocompleteShipping.getPlace().geometry.location.lat();
  675.     if (autocompleteShipping.getPlace() && boundsShipping && boundsShipping.contains(autocompleteShipping.getPlace().geometry.location)) {
  676.             // Place falls within the specified radius
  677.             isShippingReadyForCheckout = true;
  678.             console.log('Place shipping is within the specified radius:', autocompleteShipping.getPlace());
  679.         } else {
  680.              isShippingReadyForCheckout = false;
  681.             // Place is outside the specified radius
  682.             console.log('Place shipping is outside the specified radius:', autocompleteShipping.getPlace());
  683.         }
  684.     
  685. });
  686.     
  687.     \$(\".choices-shipping div div\").click(function(){
  688.         
  689.             \$(\".choices-shipping div div\").removeClass(\"active\");
  690.             \$(this).addClass(\"active\");
  691.         
  692. \t\t\ttotal = cartLS.total();
  693. \t\t\tvar value = \$(this).val();
  694. \t\t\t//shippingFees = parseFloat(\$(this).find(\":selected\").attr(\"data-price\")) ;
  695. \t\t\t//\$(\".shipping-method-fees\").html(shippingFees+ \" DH\");
  696. \t\t\t//\$(\".total-to-pay\").html(((total) - (amount) - (reductionCoupon)) + (shippingFees) + \" DH\");
  697. \t\t\t//\$(\"#cash\").trigger(\"keyup\");
  698. \t\t\t\$(\"input[name='startDeliveryAt']\").val(\$(\"input[name='startProcessingAt']\").val());
  699. \t\t\t\$(\"input[name='startProcessingAt']\").trigger(\"change\");
  700.     });
  701. \t\$(\".save-button\").click(function(){
  702.     
  703.     if((isCollectReadyForCheckout && isShippingReadyForCheckout) || 1 == 1){
  704.         
  705.    
  706.                         
  707.                         
  708. \$.ajax({
  709.                             url:\"";
  710.         // line 580
  711.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pos_cart_checkout");
  712.         yield "\",
  713.                             method:\"POST\",
  714.                             data:{
  715.                                 
  716.                                 
  717. \t\t\t\t\t\t\t\torderItems: cartLS.list(),
  718.                                 shippingMethod:\$(\".shippingMethod.active\").attr(\"data-id\"),
  719.                                 deliveryType:\"collecte-and-delivery\",
  720.                                 
  721.                                 
  722.                                 //reduction:\$(\"#reduction\").val(),
  723.                                 //payedAmount:\$(\"#cash\").val(),
  724.                                 codeCoupon:\$(\"input[name=codeCoupon]\").val(),
  725.                                 startProcessingAt: \$(\"input[name=startProcessingAt]\").val()+\" \"+\$(\"select[name='collectTime']\").find(\"option:selected\").val(),
  726.                                 startDeliveryAt:\$(\"input[name=startDeliveryAt]\").val()+\" \"+\$(\"select[name='shippingTime']\").find(\"option:selected\").val(),
  727.                                 shippingAddress:\$(\"input[name=shipping_address]\").val(),
  728.                                 collectAddress:\$(\"input[name=collect_address]\").val(),
  729.                                 cityRegionCollect:\$(\"select[name='collectCityRegion']\").find(\"option:selected\").val(),
  730.                                 cityRegionShipping:\$(\"select[name='shippingCityRegion']\").find(\"option:selected\").val(),
  731.                                 shippingTips:parseFloat(\$(\".tips-shipping-agent .item.selected\").attr(\"data-value\")),
  732.                                 walletPaymentAmount:parseFloat(\$(\".pay-with-wallet .item.selected\").attr(\"data-value\")),
  733.                                 isReadyForCheckout: true
  734.                                 
  735.                             },
  736.                             success:function(result){
  737.  
  738.                                if(result.status == \"success\");
  739. \t\t\t\t\t\t\t   window.location.href = \"";
  740.         // line 608
  741.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("checkout");
  742.         yield "\";
  743.                             }
  744.                         });    
  745.  }else{
  746. \$.toast({
  747.                                             heading: 'Merci de verifier vos cordonnées',
  748.                                             text: \"Vos cordonnées quartiers ou adresses ne sont pas valident merci de verifier !\",
  749.                                             showHideTransition: 'slide',
  750.                                             hideAfter:12000,
  751.                                             icon: 'warning',
  752.                                             loaderBg: '#1ca5df', 
  753.                                             position:\"top-right\",
  754.                                             allowToastClose: true,
  755.                                             stack: false
  756.                                     })
  757.  }
  758.    
  759. });
  760. \t\$(\"input[name='startProcessingAt']\").change(function(){
  761.    
  762. \$.toast().reset('all');
  763.     
  764.                         
  765.     \$(\".checkout-area\").html(\"\");
  766.     
  767.     var isWallet = 0;
  768.     if(\$(\"#isWallet\").is(':checked')){
  769.         isWallet = 1;
  770.     }
  771.                         
  772. \$.ajax({
  773.                             url:\"";
  774.         // line 641
  775.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pos_cart_checkout");
  776.         yield "\",
  777.                             method:\"POST\",
  778.                             data:{
  779.                                 
  780.                                 orderItems: cartLS.list(),
  781.                                 shippingMethod:\$(\".shippingMethod.active\").attr(\"data-id\"),
  782.                                 deliveryType:\"collecte-and-delivery\",
  783.                                 
  784.                                 
  785.                                 //reduction:\$(\"#reduction\").val(),
  786.                                 //payedAmount:\$(\"#cash\").val(),
  787.                                 codeCoupon:\$(\"input[name=codeCoupon]\").val(),
  788.                                 startProcessingAt: \$(\"input[name=startProcessingAt]\").val()+\" \"+\$(\"select[name='collectTime']\").find(\"option:selected\").val(),
  789.                                 startDeliveryAt:\$(\"input[name=startDeliveryAt]\").val()+\" \"+\$(\"select[name='shippingTime']\").find(\"option:selected\").val(),
  790.                                 isChooseDatePreview: true
  791.                                 
  792.                             },
  793.                             success:function(result){
  794.                                 
  795.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-min-date\",result.minDateShipping);
  796.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-max-date\",\"";
  797.         // line 661
  798.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate("next year""Y-m-d"), "html"nulltrue);
  799.         yield "\");
  800.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-default-date\",result.shippingDate);
  801.                                 
  802.                                 //\$(\"#shipping-method\").find(\"option:selected\").attr(\"data-price\",result.shippingFees);
  803.                                 shippingFees = parseFloat(result.shippingFees) ;
  804.                                 \$(\".shipping-method-fees\").html(shippingFees.toFixed(2)+ \" DH\");
  805.                                 \$(\".total-to-pay\").html(((total) - (amount) - (reductionCoupon)) + (shippingFees) + (shippingTips) + \" DH\");
  806.                                 //\$(\"select[name='collectTime']\").modal('show');
  807.                                 \$(\"select[name='collectTime']\").html(result.collectHoursHTML);
  808.                                 \$(\"select[name='shippingTime']\").html(result.shippingHoursHTML);
  809.                                 \$(\"input[name='startProcessingAt']\").val(result.collectDate);
  810.                                 \$(\"input[name='startDeliveryAt']\").val(result.shippingDate);
  811.                                 
  812.                                 /*         
  813.                                 \$(\"input[name='startDeliveryAt']\").dateDropper({
  814.                                     large: true,
  815.                                     lang: 'fr',
  816.                                     theme: 'datedropper',
  817.                                     format: \"d-m-Y\",
  818.                                     expandable: true,
  819.                                     rangeStart: result.shippingDate,
  820.                                     rangeEnd: \"";
  821.         // line 682
  822.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(" next year ""Y/m/d"), "html"nulltrue);
  823.         yield "\",
  824.                                     disabledDays: \"";
  825.         // line 683
  826.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::join(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["settings"]) || array_key_exists("settings"$context) ? $context["settings"] : (function () { throw new RuntimeError('Variable "settings" does not exist.'683$this->source); })()), "get", [], "method"falsefalsefalse683), "getExcludeDatesOnlyDates", [], "method"falsefalsefalse683), ","), "html"nulltrue);
  827.         yield "\",
  828.                                     disabledWeekDays: '6'
  829.                                 });
  830.                                     */
  831.                                 
  832.                                 if(result.messages.length > 0){
  833.                                     \$.toast({
  834.                                             heading: 'Décalage de date',
  835.                                             text: result.messages,
  836.                                             showHideTransition: 'slide',
  837.                                             hideAfter:12000,
  838.                                             icon: 'warning',
  839.                                             loaderBg: '#1ca5df', 
  840.                                             position:\"top-right\",
  841.                                             allowToastClose: true,
  842.                                             stack: false
  843.                                     })
  844.                                    
  845.                                 }
  846.                             }
  847.                         });                 
  848.     
  849. });
  850. \t\$(\"input[name='startDeliveryAt']\").change(function(){
  851.    
  852. \$.toast().reset('all');
  853.     
  854.     var isWallet = 0;
  855.     if(\$(\"#isWallet\").is(':checked')){
  856.         isWallet = 1;
  857.     }
  858.                         
  859. \$.ajax({
  860.                             url:\"";
  861.         // line 716
  862.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pos_cart_checkout");
  863.         yield "\",
  864.                             method:\"POST\",
  865.                             data:{
  866.                                 
  867.                                 orderItems: cartLS.list(),
  868.                                 shippingMethod:\$(\".shippingMethod.active\").attr(\"data-id\"),
  869.                                 deliveryType:\$(\"select[name='delivery-type'] option:selected\").val(),
  870.                                 
  871.                                 
  872.                                 //reduction:\$(\"#reduction\").val(),
  873.                                 //payedAmount:\$(\"#cash\").val(),
  874.                                 startProcessingAt: \$(\"input[name=startProcessingAt]\").val()+\" \"+\$(\"select[name='collectTime']\").find(\"option:selected\").val(),
  875.                                 startDeliveryAt:\$(\"input[name=startDeliveryAt]\").val()+\" \"+\$(\"select[name='shippingTime']\").find(\"option:selected\").val(),
  876.                                 isChooseDatePreview: true
  877.                                 
  878.                             },
  879.                             success:function(result){
  880.                                 
  881.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-min-date\",result.minDateShipping);
  882.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-max-date\",\"";
  883.         // line 735
  884.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate("next year""Y-m-d"), "html"nulltrue);
  885.         yield "\");
  886.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-default-date\",result.shippingDate);
  887.                                 
  888.                                 //\$(\"#shipping-method\").find(\"option:selected\").attr(\"data-price\",result.shippingFees);
  889.                                 shippingFees = parseFloat(result.shippingFees) ;
  890.                                 \$(\".shipping-method-fees\").html(shippingFees.toFixed(2)+ \" DH\");
  891.                                 \$(\".total-to-pay\").html(((total) - (amount) - (reductionCoupon)) + (shippingFees) + (shippingTips) + \" DH\");
  892.                                 //\$(\"select[name='collectTime']\").modal('show');
  893.                                 //\$(\"select[name='collectTime']\").html(result.collectHoursHTML);
  894.                                 \$(\"select[name='shippingTime']\").html(result.shippingHoursHTML);
  895.                                 //\$(\"input[name='startProcessingAt']\").val(result.collectDate);
  896.                                 \$(\"input[name='startDeliveryAt']\").val(result.shippingDate);
  897.                                 \$(\"select[name='shippingTime']\").find(\"option:first\").attr(\"selected\",true);
  898.                                 
  899.                                 /*         
  900.                                 \$(\"input[name='startDeliveryAt']\").dateDropper({
  901.                                     large: true,
  902.                                     lang: 'fr',
  903.                                     theme: 'datedropper',
  904.                                     format: \"d-m-Y\",
  905.                                     expandable: true,
  906.                                     rangeStart: result.shippingDate,
  907.                                     rangeEnd: \"";
  908.         // line 757
  909.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(" next year ""Y/m/d"), "html"nulltrue);
  910.         yield "\",
  911.                                     disabledDays: \"";
  912.         // line 758
  913.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::join(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["settings"]) || array_key_exists("settings"$context) ? $context["settings"] : (function () { throw new RuntimeError('Variable "settings" does not exist.'758$this->source); })()), "get", [], "method"falsefalsefalse758), "getExcludeDatesOnlyDates", [], "method"falsefalsefalse758), ","), "html"nulltrue);
  914.         yield "\",
  915.                                     disabledWeekDays: '6'
  916.                                 });
  917.                                     */
  918.                                 
  919.                                 if(result.messages.length > 0){
  920.                                     \$.toast({
  921.                                             heading: 'Décalage de date',
  922.                                             text: result.messages,
  923.                                             showHideTransition: 'slide',
  924.                                             hideAfter:12000,
  925.                                             icon: 'warning',
  926.                                             loaderBg: '#1ca5df', 
  927.                                             position:\"top-right\",
  928.                                             allowToastClose: true,
  929.                                             stack: false
  930.                                     })
  931.                                    
  932.                                 }
  933.                             }
  934.                         });                 
  935.     
  936. });
  937. \$(\"select[name='collectTime']\").change(function(){
  938.     
  939.                         
  940.                         
  941. \$.ajax({
  942.                             url:\"";
  943.         // line 786
  944.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pos_cart_checkout");
  945.         yield "\",
  946.                             method:\"POST\",
  947.                             data:{
  948.                                 
  949.                                 
  950. \t\t\t\t\t\t\t\torderItems: cartLS.list(),
  951.                                 shippingMethod:\$(\".shippingMethod.active\").attr(\"data-id\"),
  952.                                 deliveryType:\$(\"select[name='delivery-type'] option:selected\").val(),
  953.                                 
  954.                                 //reduction:\$(\"#reduction\").val(),
  955.                                 //payedAmount:\$(\"#cash\").val(),
  956.                                 startProcessingAt: \$(\"input[name=startProcessingAt]\").val()+\" \"+\$(\"select[name='collectTime']\").find(\"option:selected\").val(),
  957.                                 startDeliveryAt:\$(\"input[name=startDeliveryAt]\").val(),
  958.                                 isChooseDatePreview: true
  959.                                 
  960.                             },
  961.                             success:function(result){
  962.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-min-date\",result.minDateShipping);
  963.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-max-date\",\"";
  964.         // line 804
  965.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate("next year""Y-m-d"), "html"nulltrue);
  966.         yield "\");
  967.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-default-date\",result.shippingDate);
  968.                                 //\$(\"select[name='collectTime']\").modal('show');
  969.                                 //\$(\"select[name='collectTime']\").html(result.collectHoursHTML);
  970.                                 \$(\"select[name='shippingTime']\").html(result.shippingHoursHTML);
  971.                                 //\$(\"input[name='startProcessingAt']\").val(result.collectDate);
  972.                                 \$(\"input[name='startDeliveryAt']\").val(result.shippingDate);
  973.                             }
  974.                         });                 
  975.    
  976. });
  977. \$(\"input[name='startProcessingAt']\").trigger(\"change\");
  978. }); 
  979. \$(\".orderPreview\").click(function(){
  980.     \$(\".checkout-area\").html(\"\");
  981.     
  982.     if(cartLS.list().length > 0){                        
  983. \$.ajax({
  984.                             url:\"";
  985.         // line 824
  986.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pos_cart_checkout");
  987.         yield "\",
  988.                             method:\"POST\",
  989.                             data:{
  990.                                 shippingMethod:\$(\".shippingMethod.active\").attr(\"data-id\"),
  991.                                 codeCoupon:\$(\"input[name=codeCoupon]\").val(),
  992.                                 isPromoPreview: true
  993.                             },
  994.                             success:function(result){
  995.                                 reductionCoupon = 0;
  996.                                 if(result.coupon ){
  997.                                     if(result.coupon.typeReduction==\"percent\"){
  998.                                         reductionCoupon = (total / 100) * result.coupon.valueReduction;
  999.                                     }else{
  1000.                                         reductionCoupon = result.coupon.valueReduction;
  1001.                                     }
  1002.                                     \$(\"input[name='codeCoupon']\").attr(\"data-coupon-value\",result.coupon.valueReduction);
  1003.                                     \$(\"input[name='codeCoupon']\").attr(\"data-type-value\",result.coupon.typeReduction);
  1004.                                     
  1005.                                     \$.toast({
  1006.                                             heading: result.coupon.code,
  1007.                                             text: result.message,
  1008.                                             showHideTransition: 'slide',
  1009.                                             hideAfter:12000,
  1010.                                             icon: 'success',
  1011.                                             loaderBg: '#1ca5df', 
  1012.                                             position:\"top-right\",
  1013.                                             allowToastClose: true,
  1014.                                             stack: false
  1015.                                     })
  1016.                                 }else{
  1017.                                     \$.toast({
  1018.                                             heading: \"Remarque\",
  1019.                                             text: result.message,
  1020.                                             showHideTransition: 'slide',
  1021.                                             hideAfter:12000,
  1022.                                             icon: 'warning',
  1023.                                             loaderBg: '#1ca5df', 
  1024.                                             position:\"top-right\",
  1025.                                             allowToastClose: true,
  1026.                                             stack: false
  1027.                                     })
  1028.                                 }
  1029.                                 \$(\".promo .codepromo\").html(reductionCoupon.toFixed(2)+\" DH\");
  1030.                                 \$(\".total-to-pay\").html(((total) - (amount) - (reductionCoupon)) + (shippingFees) + (shippingTips) + \" DH\");
  1031.                                 
  1032.                             }
  1033.                         });
  1034.                
  1035.     }
  1036.     else{
  1037.         alert(\"Veuillez rajouter des produit au panier\");
  1038.     }
  1039.                             
  1040.                     });
  1041.   
  1042. })
  1043.     </script>
  1044. <script>
  1045. document.addEventListener(\"turbo:load\", function() {
  1046. var collectMap;
  1047. var collectGeocoder;
  1048. function initCollectMap() {
  1049.   collectMap = new google.maps.Map(document.getElementById(\"collectMap\"), {
  1050.     center: { lat: centerLatCollect, lng: centerLngCollect }, // Set initial map center
  1051.     zoom: 8, // Set initial zoom level
  1052.   });
  1053.   
  1054.   collectMap.addListener(\"click\", function (event) {
  1055.     
  1056.     collectPlaceMarker(event.latLng);
  1057.     getCollectAddress(event.latLng);
  1058.   });
  1059. }
  1060. window.addEventListener('resize', function() {
  1061.   google.maps.event.trigger(collectMap, 'resize');
  1062. });
  1063. function collectPlaceMarker(location) {
  1064.   var marker = new google.maps.Marker({
  1065.     position: location,
  1066.     map: collectMap,
  1067.   });
  1068.   collectMap.panTo(location);
  1069. }
  1070. function getCollectAddress(latLng) {
  1071.     collectGeocoder = new google.maps.Geocoder();
  1072.   collectGeocoder.geocode({ location: latLng }, function (results, status) {
  1073.     console.log(results);
  1074.     if (status === \"OK\") {
  1075.       if (results[0]) {
  1076.         console.log(results[0].formatted_address);
  1077.       } else {
  1078.         console.log(\"No results found\");
  1079.       }
  1080.     } else {
  1081.       console.log(\"Geocoder failed due to: \" + status);
  1082.     }
  1083.   });
  1084. }
  1085. initCollectMap();
  1086. var shippingMap;
  1087. var shippingGeocoder;
  1088. function initShippingMap() {
  1089.   shippingMap = new google.maps.Map(document.getElementById(\"shippingMap\"), {
  1090.     center: { lat: centerLatShipping, lng: centerLngShipping }, // Set initial map center
  1091.     zoom: 8, // Set initial zoom level
  1092.   });
  1093.   
  1094.   shippingMap.addListener(\"click\", function (event) {
  1095.     
  1096.     shippingPlaceMarker(event.latLng);
  1097.     getShippingAddress(event.latLng);
  1098.   });
  1099. }
  1100. window.addEventListener('resize', function() {
  1101.   google.maps.event.trigger(shippingMap, 'resize');
  1102. });
  1103. function shippingPlaceMarker(location) {
  1104.   var marker = new google.maps.Marker({
  1105.     position: location,
  1106.     map: shippingMap,
  1107.   });
  1108.   shippingMap.panTo(location);
  1109. }
  1110. function getShippingAddress(latLng) {
  1111.     shippingGeocoder = new google.maps.Geocoder();
  1112.   shippingGeocoder.geocode({ location: latLng }, function (results, status) {
  1113.     console.log(results);
  1114.     if (status === \"OK\") {
  1115.       if (results[0]) {
  1116.         console.log(results[0].formatted_address);
  1117.       } else {
  1118.         console.log(\"No results found\");
  1119.       }
  1120.     } else {
  1121.       console.log(\"Geocoder failed due to: \" + status);
  1122.     }
  1123.   });
  1124. }
  1125. initShippingMap();
  1126. \$(\"#modalShippingMap\").click(function(){
  1127.     \$(\"#shippingMap\").removeClass(\"d-none\");
  1128.     \$(\"#collectMap\").addClass(\"d-none\");
  1129. });
  1130. \$(\"#modalCollectMap\").click(function(){
  1131.     \$(\"#shippingMap\").addClass(\"d-none\");
  1132.     \$(\"#collectMap\").removeClass(\"d-none\");
  1133. });
  1134. });
  1135. </script>
  1136. <!-- Modal -->
  1137. <div class=\"modal fade\" id=\"collectMapModal\" tabindex=\"-1\" aria-labelledby=\"collectMapModalLabel\" aria-hidden=\"true\">
  1138.   <div class=\"modal-dialog modal-xl\" style=\"width:800px;\">
  1139.     <div class=\"modal-content\">
  1140.       <div class=\"modal-header\">
  1141.         <h5 class=\"modal-title\" id=\"collectMapModalLabel\">Cordonnées de collect</h5>
  1142.         <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
  1143.       </div>
  1144.       <div class=\"modal-body\">
  1145.         <div id=\"collectMap\"></div>
  1146.         <div id=\"shippingMap\"  class=\"d-none\"></div>
  1147.       </div>
  1148.       <div class=\"modal-footer\">
  1149.         <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Annuler</button>
  1150.         <button type=\"button\" class=\"btn btn-primary\">Séléctionner</button>
  1151.       </div
  1152.     </div>
  1153.   </div>
  1154. </div>
  1155. ";
  1156.         
  1157.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  1158.         
  1159.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  1160.         return; yield '';
  1161.     }
  1162.     /**
  1163.      * @codeCoverageIgnore
  1164.      */
  1165.     public function getTemplateName()
  1166.     {
  1167.         return "@Flexy/FrontBundle/Themes/IlaveU/templates/cart/cart.html.twig";
  1168.     }
  1169.     /**
  1170.      * @codeCoverageIgnore
  1171.      */
  1172.     public function isTraitable()
  1173.     {
  1174.         return false;
  1175.     }
  1176.     /**
  1177.      * @codeCoverageIgnore
  1178.      */
  1179.     public function getDebugInfo()
  1180.     {
  1181.         return array (  1099 => 824,  1076 => 804,  1055 => 786,  1024 => 758,  1020 => 757,  995 => 735,  973 => 716,  937 => 683,  933 => 682,  909 => 661,  886 => 641,  850 => 608,  819 => 580,  649 => 413,  633 => 400,  629 => 399,  621 => 395,  611 => 394,  563 => 352,  560 => 347,  516 => 301,  508 => 295,  505 => 294,  498 => 292,  495 => 291,  493 => 290,  486 => 289,  484 => 287,  483 => 286,  481 => 285,  476 => 284,  473 => 283,  471 => 282,  466 => 280,  463 => 279,  461 => 278,  444 => 263,  429 => 261,  425 => 260,  401 => 239,  379 => 219,  364 => 217,  360 => 216,  333 => 194,  321 => 184,  310 => 178,  304 => 176,  302 => 175,  298 => 174,  294 => 173,  287 => 172,  284 => 171,  281 => 170,  278 => 169,  275 => 168,  272 => 167,  270 => 166,  264 => 163,  256 => 162,  253 => 161,  249 => 160,  101 => 14,  91 => 13,  74 => 6,  71 => 5,  61 => 4,  38 => 1,);
  1182.     }
  1183.     public function getSourceContext()
  1184.     {
  1185.         return new Source("{% extends \"@Flexy/FrontBundle/Themes/IlaveU/templates/layout.html.twig\"  %}
  1186. {% block stylesheets %}
  1187. \t{{parent()}}
  1188. \t<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/jquery-toast-plugin/1.3.2/jquery.toast.min.css\" integrity=\"sha512-wJgJNTBBkLit7ymC6vvzM1EcSWeM9mmOu+1USHaRBbHkm6W9EgM0HY27+UtUaprntaYQJF75rc8gjxllKs5OIQ==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\" />
  1189.     <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css\" integrity=\"sha512-tS3S5qG0BlhnQROyJXvNjeEM4UpMXHrQfTGmbQ1gKmelCxlSEBUaxhRBj/EFTzpbP4RVSrpEikbmdJobCvhE3g==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\" />
  1190.     <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css\" integrity=\"sha512-sMXtMNL1zRzolHYKEujM2AqCLUR9F2C4/05cdbxjjLSRvMQIciEPCQZo++nk7go3BtSuK9kfa/s+a4f4i5pLkw==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\" />
  1191. {% endblock %}
  1192. {% block body %}
  1193.     <style>
  1194. #collectMap,#shippingMap {
  1195.   width: 100%;
  1196.   height: 400px;
  1197. }
  1198.     .pay-with-wallet .item{
  1199.         padding:10px 7px;
  1200.         margin:0 10px;
  1201.         font-weight:bold;
  1202.         background:#45dae9;
  1203.         color:white;
  1204.         border-radius:50px;
  1205.         text-align:center;
  1206.         font-size:14px;
  1207.     }
  1208.     .pay-with-wallet .item.selected{
  1209.         
  1210.         background:#febc4a;
  1211.     }
  1212.     .tips-shipping-agent .item{
  1213.         padding:10px 15px;
  1214.         margin:0 10px;
  1215.         font-weight:bold;
  1216.         background:#45dae9;
  1217.         color:white;
  1218.         border-radius:50px;
  1219.         text-align:center;
  1220.     }
  1221.     .tips-shipping-agent .item.selected{
  1222.         
  1223.         background:#febc4a;
  1224.     }
  1225. .owl-carousel .owl-nav button.owl-next, .owl-carousel .owl-nav button.owl-prev, .owl-carousel button.owl-dot{
  1226.     background:#d5d5d5;
  1227. }
  1228. .owl-dots {
  1229.      bottom:-35px; 
  1230. }
  1231. \t.choices-shipping{
  1232. \t\tfont-size:13px;
  1233.     }
  1234.    .choices-shipping div div {
  1235.     /* border: 2px dotted #ccc; */
  1236.     padding: 20px;
  1237.     background: #f2f2f2;
  1238. }
  1239.     .choices-shipping div div.active {
  1240.     background-color: #45dae9;
  1241.     border-color: #29cedf;
  1242.     color: white;
  1243. }
  1244. \t
  1245. \t.jq-toast-wrap {
  1246.     display: block;
  1247.     position: fixed;
  1248.     width: 500px;
  1249.     pointer-events: none!important;
  1250.     letter-spacing: normal;
  1251.     z-index: 9000!important;
  1252. }
  1253. .jq-icon-warning {
  1254.     
  1255.     background-color: #9a0062;
  1256. }
  1257.     </style>
  1258. \t<div 
  1259. \t\tclass=\"body-wrapper\" >
  1260. \t\t<!-- Begin Li's Breadcrumb Area -->
  1261. \t\t<div class=\"breadcrumb-area\">
  1262. \t\t\t<div class=\"container\">
  1263. \t\t\t\t<ul id=\"progressbar\">
  1264. \t\t\t\t\t<li class=\"active\">Livraison
  1265. \t\t\t\t\t</li>
  1266. \t\t\t\t\t<li>Paiement et coordonnées</li>
  1267. \t\t\t\t\t<li>Resumé</li>
  1268. \t\t\t\t</ul>
  1269. \t\t\t</div>
  1270. \t\t</div>
  1271. \t\t<!-- Li's Breadcrumb Area End Here -->
  1272. \t\t<!--Shopping Cart Area Strat-->
  1273. \t\t<div class=\"Shopping-cart-area pt-60 pb-60\">
  1274. \t\t\t<div class=\"container\">
  1275. \t\t\t\t<div class=\"row \">
  1276. \t\t\t\t\t<div class=\"col-12\">
  1277. \t\t\t\t\t\t<form action=\"#\">
  1278. \t\t\t\t\t\t\t<div class=\"table-content table-responsive d-none\">
  1279. \t\t\t\t\t\t\t\t<table class=\"table table-striped\">
  1280. \t\t\t\t\t\t\t\t\t<thead>
  1281. \t\t\t\t\t\t\t\t\t\t<tr>
  1282. \t\t\t\t\t\t\t\t\t\t\t<th class=\"li-product-remove\">Supprimer</th>
  1283. \t\t\t\t\t\t\t\t\t\t\t<th class=\"li-product-thumbnail\">images</th>
  1284. \t\t\t\t\t\t\t\t\t\t\t<th class=\"cart-product-name\">Product</th>
  1285. \t\t\t\t\t\t\t\t\t\t\t<th class=\"li-product-price\">Prix unitaire</th>
  1286. \t\t\t\t\t\t\t\t\t\t\t<th class=\"li-product-quantity\">Quantité</th>
  1287. \t\t\t\t\t\t\t\t\t\t\t<th class=\"li-product-subtotal\">Total</th>
  1288. \t\t\t\t\t\t\t\t\t\t</tr>
  1289. \t\t\t\t\t\t\t\t\t</thead>
  1290. \t\t\t\t\t\t\t\t\t<tbody
  1291. \t\t\t\t\t\t\t\t\t\tclass=\"cart\"><!-- LocalStorage Cart Items -->
  1292. \t\t\t\t\t\t\t\t\t</tbody>
  1293. \t\t\t\t\t\t\t\t</table>
  1294. \t\t\t\t\t\t\t</div>
  1295. \t\t\t\t\t\t\t
  1296.                                                 
  1297. \t\t\t\t\t\t\t<div class=\"row\">
  1298. \t\t\t\t\t\t\t\t<div class=\"col-md-7 \">
  1299.                                     <div class=\"row\">
  1300.                                     <div class=\"col-12\">
  1301.                                     <!--Accordion Start-->
  1302.                                 <p style=\"font-weight:bold;\">Avez-vous un code promo? <span id=\"showcoupon\" style=\"cursor:pointer;\">Cliquez ici pour saisir votre code</span></p>
  1303.                                 <div id=\"checkout_coupon\" class=\"coupon-checkout-content\">
  1304.                                     <div class=\"coupon-info\">
  1305.                                         <div class=\"input-group\">
  1306.                                             <input type=\"text\" class=\"form-control\" placeholder=\"Votre code promo\" data-coupon-value=\"0\" data-coupon-type=\"amount\" name=\"codeCoupon\" aria-label=\"Recipient's username\" aria-describedby=\"button-codeCoupon\" value=\"\">
  1307.                                             <button class=\"btn btn-success orderPreview\" type=\"button\" id=\"button-codeCoupon\">Appliquer</button>
  1308.                                         </div>
  1309.                                         </div>
  1310.                                     </div>
  1311.                                     </div>
  1312.                                 </div>
  1313.                                 <!--Accordion End-->
  1314.                                         
  1315.                                     
  1316.                                 
  1317.                                     <div class=\"row choices-shipping\" style=\"margin-bottom:40px; \">
  1318. \t\t\t\t\t\t\t\t\t\t\t{% for singleShippingMethod in shippingMethods %}
  1319.                                                 <div  class=\"col-6 mt-4\" >
  1320.                                                    <div style=\"min-height:180px;\" data-id=\"{{singleShippingMethod.id}}\" class=\"shippingMethod {% if singleShippingMethod == shippingMethods|first %}active{% endif %}\">
  1321.                                                      <h4>{{singleShippingMethod.name}}</h4>
  1322.                                                     <ul>
  1323.                                                     <li>
  1324. \t\t\t\t\t\t\t\t\t\t\t\t\t\t{% set shippingDurationValue = singleShippingMethod.shippingDuration %}
  1325. \t\t\t\t\t\t\t\t\t\t\t\t\t\t{% set shippingDurationUnit = \"H\" %}
  1326. \t\t\t\t\t\t\t\t\t\t\t\t\t{% if shippingDurationValue < 1 %}
  1327. \t\t\t\t\t\t\t\t\t\t\t\t\t\t{% set shippingDurationValue = 60 * singleShippingMethod.shippingDuration  %}
  1328. \t\t\t\t\t\t\t\t\t\t\t\t\t\t{% set shippingDurationUnit = \"Min\" %}
  1329. \t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
  1330. \t\t\t\t\t\t\t\t\t\t\t\t\tTemps d’attente du Speeder <span class=\"float-right slot\">{{shippingDurationValue}} {{shippingDurationUnit}}</span></li>
  1331.                                                     <li  class=\"\">Récuperation de la commande <span class=\"float-right\">{{singleShippingMethod.preparationDuration}} H</span></li>
  1332.                                                     <li>Livraison en <span class=\"float-right\">{{singleShippingMethod.processingDuration}} H</span></li>
  1333. \t\t\t\t\t\t\t\t\t\t\t\t\t{% if singleShippingMethod.shippingRules|length > 0 %}
  1334.                                                     <li style=\"line-height: 15px;\"><small>{{singleShippingMethod.description}}</small></li>
  1335. \t\t\t\t\t\t\t\t\t\t\t\t\t{% endif %}
  1336.                                                 </ul>
  1337.                                                    </div>
  1338. \t\t\t\t\t\t\t\t\t\t\t\t
  1339.                                                 </div>
  1340. \t\t\t\t\t\t\t\t\t\t\t\t{% endfor %}
  1341.                                                 
  1342.                                             </div>
  1343. \t\t\t\t\t\t\t\t\t<div class=\"row\" >
  1344. \t\t\t\t\t\t\t\t\t<div class=\"item aos-init aos-animate  col-6\" id=\"accordionRecovery\" data-aos=\"fade-up\">
  1345. \t\t\t\t\t\t\t\t\t\t<h6>Informations de récupération</h6>
  1346. \t\t\t\t\t\t\t\t\t\t<div class=\"bg-white\">
  1347. \t\t\t\t\t\t\t\t\t\t\t<div class=\"row\">
  1348. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"box col-sm-5 col-md-12 col-lg-5\">
  1349. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>Date</label>
  1350. \t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"d-flex\">
  1351. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control datedropper chooseDate\"  data-dd-min-date=\"{{\"now\"|date('Y/m/d')}}\" value=\"{{\"now\"|date('Y/m/d')}}\" name=\"startProcessingAt\"    />
  1352. \t\t\t\t\t\t\t\t\t\t\t\t\t\t
  1353. \t\t\t\t\t\t\t\t\t\t\t\t\t</div>
  1354. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  1355. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"box col-sm-7 col-md-12 col-lg-7\">
  1356. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>Heure</label>
  1357. \t\t\t\t\t\t\t\t\t\t\t\t\t<span id=\"recovery_slot\">
  1358. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<select id=\"receive_time\" class=\"custom-select custom-select-recieve\" name=\"collectTime\" data-day=\"0\">
  1359. \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"08:00\" >Sélectionner un crénau</option>
  1360. \t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>
  1361. \t\t\t\t\t\t\t\t\t\t\t\t\t</span>
  1362. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  1363. \t\t\t\t\t\t\t\t\t\t\t</div>
  1364. \t\t\t\t\t\t\t\t\t\t\t
  1365. \t\t\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">
  1366. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group box col-sm-12\">
  1367. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>
  1368. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Adresse de récupération</b>
  1369. \t\t\t\t\t\t\t\t\t\t\t\t\t</label>
  1370. \t\t\t\t\t\t\t\t\t\t\t\t\t<!-- Button trigger modal -->
  1371. \t\t\t\t\t\t\t\t\t\t\t\t\t
  1372.                                                         <select class=\"mb-2\" name=\"collectCityRegion\" >
  1373.                                                             {% for cityRegion in cityRegions %}
  1374.                                                                 <option data-lat=\"{{cityRegion.lat}}\" data-lng=\"{{cityRegion.lng}}\" value=\"{{cityRegion.id}}\">{{cityRegion.name}}</option>
  1375.                                                             {% endfor %}
  1376.                                                         </select>
  1377. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"collect_address\" name=\"collect_address\" value=\"Maarif, Casablanca, Maroc\" class=\"form-control w-100\" >
  1378.                                                         <a  href=\"#\" id=\"modalShippingMap\" type=\"button\"  data-bs-toggle=\"modal\" data-bs-target=\"#collectMapModal\" class=\"btn btn-success mt-2\"  style=\"\" ><i class=\"fa-solid fa-location-dot\"></i> Location</a>
  1379.     
  1380. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  1381. \t\t\t\t\t\t\t\t\t\t\t</div>
  1382. \t\t\t\t\t\t\t\t\t\t</div>
  1383. \t\t\t\t\t\t\t\t\t</div>
  1384. \t\t\t\t\t\t\t\t\t<div class=\"item aos-init aos-animate col-6\" id=\"accordionRecovery\" data-aos=\"fade-up\">
  1385. \t\t\t\t\t\t\t\t\t\t<h6>Informations de livraison</h6>
  1386. \t\t\t\t\t\t\t\t\t\t<div class=\"bg-white\"> 
  1387.                                             
  1388. \t\t\t\t\t\t\t\t\t\t\t<div class=\"row\">
  1389. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"box col-sm-5 col-md-12 col-lg-5\">
  1390. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>Date</label>
  1391. \t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"d-flex\">
  1392. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control datedropper chooseDate\"  name=\"startDeliveryAt\" value=\"{{\"now\"|date('Y/m/d')}}\"   />
  1393. \t\t\t\t\t\t\t\t\t\t\t\t\t\t
  1394. \t\t\t\t\t\t\t\t\t\t\t\t\t</div>
  1395. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  1396. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"box col-sm-7 col-md-12 col-lg-7\">
  1397. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>Heure</label>
  1398. \t\t\t\t\t\t\t\t\t\t\t\t\t<span id=\"recovery_slot\">
  1399. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<select id=\"receive_time\" class=\"custom-select custom-select-recieve\" name=\"shippingTime\" data-day=\"0\">
  1400. \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"08:00\" >Sélectionner un crénau</option>
  1401. \t\t\t\t\t\t\t\t\t\t\t\t\t\t</select>
  1402. \t\t\t\t\t\t\t\t\t\t\t\t\t</span>
  1403. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  1404. \t\t\t\t\t\t\t\t\t\t\t</div>
  1405. \t\t\t\t\t\t\t\t\t\t\t
  1406. \t\t\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">
  1407. \t\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group box col-sm-12\">
  1408. \t\t\t\t\t\t\t\t\t\t\t\t\t<label>
  1409. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Adresse de livraison</b>
  1410. \t\t\t\t\t\t\t\t\t\t\t\t\t</label>
  1411. \t\t\t\t\t\t\t\t\t\t\t\t\t
  1412.                                                         <select class=\"mb-2\" name=\"shippingCityRegion\" >
  1413.                                                             {% for cityRegion in cityRegions %}
  1414.                                                                 <option data-lat=\"{{cityRegion.lat}}\" data-lng=\"{{cityRegion.lng}}\" value=\"{{cityRegion.id}}\">{{cityRegion.name}}</option>
  1415.                                                             {% endfor %}
  1416.                                                         </select>
  1417. \t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" id=\"shipping_address\" name=\"shipping_address\" value=\"Maarif, Casablanca, Maroc\" class=\"form-control w-100 \" />
  1418.                                                             
  1419. \t\t\t\t\t\t\t\t\t\t\t\t\t\t
  1420. \t\t\t\t\t\t\t\t\t\t\t\t\t
  1421.                                                     <a href=\"#\" id=\"modalShippingMap\" type=\"button\"  data-bs-toggle=\"modal\" data-bs-target=\"#collectMapModal\" class=\"btn btn-success mt-2\" style=\"\" ><i class=\"fa-solid fa-location-dot\"></i> Location</a>
  1422. \t\t\t\t\t\t\t\t\t\t\t\t</div>
  1423. \t\t\t\t\t\t\t\t\t\t\t</div>
  1424. \t\t\t\t\t\t\t\t\t\t</div>
  1425. \t\t\t\t\t\t\t\t\t</div>
  1426.                                     
  1427.                                     {% if is_granted(\"ROLE_CUSTOMER\") and customer != null %}
  1428.                                     <div class=\"col-12 mt-5\" >
  1429.                                         <h6>Payer avec ma wallet {{customer.credit}} DH</h6>
  1430.                                         <div class=\"owl-carousel pay-with-wallet d-none mt-4\">
  1431.                                             {% if customer.credit > 0 %}
  1432.                                             {% set counterCredit = 0 %}
  1433.                                                     {% for i in 0..totalCart %}
  1434.                                                         {% if
  1435.                                                          (customer.credit >= i and customer.credit <= totalCart) or
  1436.                                                          (customer.credit >= i and customer.credit >= totalCart)
  1437.                                                          %}
  1438.                                                             <div data-value=\"{{i}}\" class=\"item\"> {{i}} DH</div>
  1439.                                                             {% set counterCredit = counterCredit + i %}
  1440.                                                          {% endif %}
  1441.                                                 
  1442.                                             {% endfor %}
  1443.                                             {% endif %}
  1444.                                             
  1445.                                             
  1446.                                             </div>
  1447.                                     </div>
  1448.                                     {% endif %}
  1449. \t\t\t\t\t\t\t\t\t</div>
  1450. \t\t\t\t\t\t\t\t\t
  1451.                                     <hr>
  1452.                                     
  1453. \t\t\t\t\t\t\t\t</div>
  1454. \t\t\t\t\t\t\t\t <div class=\"col-lg-5 col-12\">
  1455.                             <div class=\"your-order\">
  1456.                                 <h3>Votre commande</h3>
  1457.                                 <div class=\"shipping\" >
  1458.                                
  1459.                                 </div>
  1460.                                 <div class=\"your-order-table table-responsive\">
  1461.                                     <table class=\"table\">
  1462.                                         <thead>
  1463.                                             <tr>
  1464.                                                 <th class=\"cart-product-name\">Produit</th>
  1465.                                                 <th class=\"cart-product-total\">Total</th>
  1466.                                             </tr>
  1467.                                         </thead>
  1468.                                         <tbody class=\"cart-checkout\">
  1469.  
  1470.                                         </tbody>
  1471.                                         <tfoot>
  1472.                                             <tr class=\"cart-subtotal\">
  1473.                                                 <th>Sous total</th>
  1474.                                                 <td><span class=\"amount total-checkout total\">0,00 MAD </span></td>
  1475.                                             </tr>
  1476. \t\t\t\t\t\t\t\t\t\t\t<tr class=\"cart-subtotal promo\">
  1477.                                                 <th>Reduction coupon</th>
  1478.                                                 <td><span class=\"amount codepromo\">0,00 MAD </span></td>
  1479.                                             </tr>
  1480.                                             {# <tr class=\"cart-subtotal\">
  1481.                                                 <th>Paiement par wallet</th>
  1482.                                                 <td><span class=\"amount wallet-payment\">0,00 MAD </span></td>
  1483.                                             </tr> #}
  1484.                                             {# <tr class=\"cart-subtotal\">
  1485.                                                 <th>Pourboire pour le livreur</th>
  1486.                                                 <td><span class=\"amount shipping-tips\">0,00 MAD </span></td>
  1487.                                             </tr> #}
  1488.                                             
  1489. \t\t\t\t\t\t\t\t\t\t\t<tr class=\"cart-subtotal\">
  1490.                                                 <th>Frais de livraison</th>
  1491.                                                 <td><span class=\"amount shipping-method-fees\">0,00 MAD </span></td>
  1492.                                             </tr>
  1493.                                             <tr class=\"order-total\">
  1494.                                                 <th>Montant á payer</th>
  1495.                                                 <td><strong><span class=\"amount total-checkout total-to-pay \">0,00 MAD</span></strong></td>
  1496.                                             </tr>
  1497. \t\t\t\t\t\t\t\t\t\t\t
  1498.                                             <tr>
  1499.                                                 <td colspan=\"2\" ><a href=\"#\" class=\"save-button btn btn-primary d-block\">Continuer</a></td>
  1500.                                             </tr>
  1501.                                         </tfoot>
  1502.                                     </table>
  1503.                                     
  1504.                                 </div>
  1505.                                 
  1506.                             </div>
  1507.                         </div>
  1508. \t\t\t\t\t\t\t</div>
  1509. \t\t\t\t\t\t</form>
  1510. \t\t\t\t\t</div>
  1511. \t\t\t\t</div>
  1512. \t\t\t</div>
  1513. \t\t</div>
  1514. \t\t<!--Shopping Cart Area End-->
  1515. \t</div>
  1516. \t<!-- Body Wrapper End Here -->
  1517.     <!-- Button trigger modal -->
  1518. {% endblock %}
  1519. {% block javascripts %}
  1520.     {{parent()}}
  1521. \t<script type=\"text/javascript\" src=\"https://maps.googleapis.com/maps/api/js?key=AIzaSyBFliT4Ug0Ugto5davRC7krsyMhTfkI-L4&libraries=places\"></script>
  1522.     <script src=\"https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js\" integrity=\"sha512-bPs7Ae6pVvhOSiIcyUClR7/q2OAsRiovw4vAkX+zJbw3ShAeeqezq50RIIcIURq7Oa20rW2n2q+fyXBNcU9lrw==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>
  1523. \t<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery-toast-plugin/1.3.2/jquery.toast.min.js\" integrity=\"sha512-zlWWyZq71UMApAjih4WkaRpikgY9Bz1oXIW5G0fED4vk14JjGlQ1UmkGM392jEULP8jbNMiwLWdM8Z87Hu88Fw==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>
  1524. \t<script src=\"{{asset('flexy/js/datedropper/datedropper-javascript.js')}}\"></script>
  1525. <script src=\"{{asset('flexy/js/datedropper/datedropper-javascript-lang-FR.js')}}\"></script>
  1526.     <script>
  1527. \tdocument.addEventListener(\"turbo:load\", function() {
  1528. var isCollectReadyForCheckout = false;
  1529. var isShippingReadyForCheckout = false;
  1530. new dateDropper({
  1531.   lang:\"fr\",
  1532.   //format: \"dd/m/y\",
  1533.   selector: \"input[name='startProcessingAt']\",
  1534.   minDate: \"{{\"yesterday\"|date(\"Y-m-d\")}}\",
  1535.   //autoFill:false,
  1536.   expandable: true,
  1537.   onChange: function (res) {
  1538.     \$(\"input[name='startProcessingAt']\").trigger(\"change\");
  1539.   }
  1540. });
  1541. new dateDropper({
  1542.   lang:\"fr\",
  1543.   //format: \"dd/m/y\",
  1544.   selector: \"input[name='startDeliveryAt']\",
  1545.   //autoFill:false,
  1546.   expandable: true,
  1547.   onChange: function (res) {
  1548.     \$(\"input[name='startProcessingAt']\").trigger(\"change\");
  1549.   }
  1550. });
  1551. \$(document).ready(function(){  
  1552.     
  1553.   \$(\".tips-shipping-agent\").owlCarousel({
  1554.     dots:true,
  1555.     items:5,
  1556.     nav:false,
  1557.     onChanged:function(){
  1558.         \$(\".tips-shipping-agent\").removeClass(\"d-none\");
  1559.     }
  1560.   });
  1561.   \$(\".pay-with-wallet\").owlCarousel({
  1562.     dots:true,
  1563.     items:7,
  1564.     nav:false,
  1565.     onChanged:function(){
  1566.         \$(\".pay-with-wallet\").removeClass(\"d-none\");
  1567.     }
  1568.   });
  1569.   
  1570.     \$(\".pay-with-wallet .item\").click(function(){
  1571.     \$(\".pay-with-wallet .item\").removeClass(\"selected\");
  1572.      \$(this).addClass(\"selected\");
  1573.      walletPayment = parseFloat(\$(this).attr(\"data-value\"));
  1574.      
  1575.      \$(\".wallet-payment\").html( (walletPayment) + \" DH\");
  1576.      \$(\".total-to-pay\").html( ((total) - (amount) - (reductionCoupon) - (walletPayment)) + (shippingFees) + (shippingTips) + \" DH\");
  1577.   });
  1578.        var inputCollectAddress = document.getElementById('collect_address');
  1579. \t   var inputShippingAddress = document.getElementById('shipping_address');
  1580.        
  1581. var optionsCollect = {
  1582.   //types: ['(cities)'],
  1583.   componentRestrictions: {country: 'ma'}
  1584. };
  1585. var optionsShipping = {
  1586.   //types: ['(cities)'],
  1587.   componentRestrictions: {country: 'ma'}
  1588. };
  1589.  var centerLatCollect = \$(\"select[name='collectCityRegion']\").find(\"option:selected\").attr(\"data-lat\"); // example latitude
  1590.   var centerLngCollect = \$(\"select[name='collectCityRegion']\").find(\"option:selected\").attr(\"data-lng\"); // example longitude
  1591.    var centerLatShipping =\$(\"select[name='shippingCityRegion']\").find(\"option:selected\").attr(\"data-lat\"); // example latitude
  1592.   var centerLngShipping =\$(\"select[name='shippingCityRegion']\").find(\"option:selected\").attr(\"data-lng\"); // example longitude
  1593. var centerPointCollect = new google.maps.LatLng(centerLatCollect, centerLngCollect);
  1594. var centerPointShipping = new google.maps.LatLng(centerLatShipping, centerLngShipping);
  1595. // Set the desired radius in meters
  1596. var radius = 10000; // 10 kilometers
  1597. var boundsCollect = new google.maps.Circle({ center: centerPointCollect, radius: radius }).getBounds();
  1598. var boundsShipping = new google.maps.Circle({ center: centerPointCollect, radius: radius }).getBounds();
  1599.   \$(\"select[name='collectCityRegion']\").change(function(){
  1600.     centerLatCollect = \$(\"select[name='collectCityRegion']\").find(\"option:selected\").attr(\"data-lat\");
  1601.     
  1602.     centerLngCollect = \$(\"select[name='collectCityRegion']\").find(\"option:selected\").attr(\"data-lng\");
  1603.      centerPointCollect = new google.maps.LatLng(centerLatCollect, centerLngCollect);
  1604.      boundsCollect = new google.maps.Circle({ center: centerPointCollect, radius: radius }).getBounds();
  1605.   });
  1606.     \$(\"select[name='shippingCityRegion']\").change(function(){
  1607.     centerLatShipping = \$(\"select[name='shippingCityRegion']\").find(\"option:selected\").attr(\"data-lat\");
  1608.     centerLngShipping = \$(\"select[name='shippingCityRegion']\").find(\"option:selected\").attr(\"data-lng\");
  1609.      centerPointShipping = new google.maps.LatLng(centerLatShipping, centerLngShipping);
  1610.      boundsShipping = new google.maps.Circle({ center: centerPointCollect, radius: radius }).getBounds();
  1611.     
  1612.   });
  1613. var autocompleteCollect = new google.maps.places.Autocomplete(inputCollectAddress, optionsCollect);
  1614. var autocompleteShipping = new google.maps.places.Autocomplete(inputShippingAddress, optionsShipping);
  1615. google.maps.event.addListener(autocompleteCollect, 'place_changed', function() {
  1616.     
  1617.     
  1618.     var lngCollect = autocompleteCollect.getPlace().geometry.location.lng();
  1619.     var latCollect = autocompleteCollect.getPlace().geometry.location.lat();
  1620.         if (autocompleteCollect.getPlace() && boundsCollect && boundsCollect.contains(autocompleteCollect.getPlace().geometry.location)) {
  1621.             // Place falls within the specified radius
  1622.             isCollectReadyForCheckout = true;
  1623.             console.log('Place collect is within the specified radius:', autocompleteCollect.getPlace());
  1624.         } else {
  1625.             isCollectReadyForCheckout = false;
  1626.             // Place is outside the specified radius
  1627.             console.log('Place collect is outside the specified radius:', autocompleteCollect.getPlace());
  1628.         }
  1629.     
  1630. });
  1631. google.maps.event.addListener(autocompleteShipping, 'place_changed', function() {
  1632.     
  1633.     
  1634.     var lngShipping = autocompleteShipping.getPlace().geometry.location.lng();
  1635.     var latShipping = autocompleteShipping.getPlace().geometry.location.lat();
  1636.     if (autocompleteShipping.getPlace() && boundsShipping && boundsShipping.contains(autocompleteShipping.getPlace().geometry.location)) {
  1637.             // Place falls within the specified radius
  1638.             isShippingReadyForCheckout = true;
  1639.             console.log('Place shipping is within the specified radius:', autocompleteShipping.getPlace());
  1640.         } else {
  1641.              isShippingReadyForCheckout = false;
  1642.             // Place is outside the specified radius
  1643.             console.log('Place shipping is outside the specified radius:', autocompleteShipping.getPlace());
  1644.         }
  1645.     
  1646. });
  1647.     
  1648.     \$(\".choices-shipping div div\").click(function(){
  1649.         
  1650.             \$(\".choices-shipping div div\").removeClass(\"active\");
  1651.             \$(this).addClass(\"active\");
  1652.         
  1653. \t\t\ttotal = cartLS.total();
  1654. \t\t\tvar value = \$(this).val();
  1655. \t\t\t//shippingFees = parseFloat(\$(this).find(\":selected\").attr(\"data-price\")) ;
  1656. \t\t\t//\$(\".shipping-method-fees\").html(shippingFees+ \" DH\");
  1657. \t\t\t//\$(\".total-to-pay\").html(((total) - (amount) - (reductionCoupon)) + (shippingFees) + \" DH\");
  1658. \t\t\t//\$(\"#cash\").trigger(\"keyup\");
  1659. \t\t\t\$(\"input[name='startDeliveryAt']\").val(\$(\"input[name='startProcessingAt']\").val());
  1660. \t\t\t\$(\"input[name='startProcessingAt']\").trigger(\"change\");
  1661.     });
  1662. \t\$(\".save-button\").click(function(){
  1663.     
  1664.     if((isCollectReadyForCheckout && isShippingReadyForCheckout) || 1 == 1){
  1665.         
  1666.    
  1667.                         
  1668.                         
  1669. \$.ajax({
  1670.                             url:\"{{path('pos_cart_checkout')}}\",
  1671.                             method:\"POST\",
  1672.                             data:{
  1673.                                 
  1674.                                 
  1675. \t\t\t\t\t\t\t\torderItems: cartLS.list(),
  1676.                                 shippingMethod:\$(\".shippingMethod.active\").attr(\"data-id\"),
  1677.                                 deliveryType:\"collecte-and-delivery\",
  1678.                                 
  1679.                                 
  1680.                                 //reduction:\$(\"#reduction\").val(),
  1681.                                 //payedAmount:\$(\"#cash\").val(),
  1682.                                 codeCoupon:\$(\"input[name=codeCoupon]\").val(),
  1683.                                 startProcessingAt: \$(\"input[name=startProcessingAt]\").val()+\" \"+\$(\"select[name='collectTime']\").find(\"option:selected\").val(),
  1684.                                 startDeliveryAt:\$(\"input[name=startDeliveryAt]\").val()+\" \"+\$(\"select[name='shippingTime']\").find(\"option:selected\").val(),
  1685.                                 shippingAddress:\$(\"input[name=shipping_address]\").val(),
  1686.                                 collectAddress:\$(\"input[name=collect_address]\").val(),
  1687.                                 cityRegionCollect:\$(\"select[name='collectCityRegion']\").find(\"option:selected\").val(),
  1688.                                 cityRegionShipping:\$(\"select[name='shippingCityRegion']\").find(\"option:selected\").val(),
  1689.                                 shippingTips:parseFloat(\$(\".tips-shipping-agent .item.selected\").attr(\"data-value\")),
  1690.                                 walletPaymentAmount:parseFloat(\$(\".pay-with-wallet .item.selected\").attr(\"data-value\")),
  1691.                                 isReadyForCheckout: true
  1692.                                 
  1693.                             },
  1694.                             success:function(result){
  1695.  
  1696.                                if(result.status == \"success\");
  1697. \t\t\t\t\t\t\t   window.location.href = \"{{path('checkout')}}\";
  1698.                             }
  1699.                         });    
  1700.  }else{
  1701. \$.toast({
  1702.                                             heading: 'Merci de verifier vos cordonnées',
  1703.                                             text: \"Vos cordonnées quartiers ou adresses ne sont pas valident merci de verifier !\",
  1704.                                             showHideTransition: 'slide',
  1705.                                             hideAfter:12000,
  1706.                                             icon: 'warning',
  1707.                                             loaderBg: '#1ca5df', 
  1708.                                             position:\"top-right\",
  1709.                                             allowToastClose: true,
  1710.                                             stack: false
  1711.                                     })
  1712.  }
  1713.    
  1714. });
  1715. \t\$(\"input[name='startProcessingAt']\").change(function(){
  1716.    
  1717. \$.toast().reset('all');
  1718.     
  1719.                         
  1720.     \$(\".checkout-area\").html(\"\");
  1721.     
  1722.     var isWallet = 0;
  1723.     if(\$(\"#isWallet\").is(':checked')){
  1724.         isWallet = 1;
  1725.     }
  1726.                         
  1727. \$.ajax({
  1728.                             url:\"{{path('pos_cart_checkout')}}\",
  1729.                             method:\"POST\",
  1730.                             data:{
  1731.                                 
  1732.                                 orderItems: cartLS.list(),
  1733.                                 shippingMethod:\$(\".shippingMethod.active\").attr(\"data-id\"),
  1734.                                 deliveryType:\"collecte-and-delivery\",
  1735.                                 
  1736.                                 
  1737.                                 //reduction:\$(\"#reduction\").val(),
  1738.                                 //payedAmount:\$(\"#cash\").val(),
  1739.                                 codeCoupon:\$(\"input[name=codeCoupon]\").val(),
  1740.                                 startProcessingAt: \$(\"input[name=startProcessingAt]\").val()+\" \"+\$(\"select[name='collectTime']\").find(\"option:selected\").val(),
  1741.                                 startDeliveryAt:\$(\"input[name=startDeliveryAt]\").val()+\" \"+\$(\"select[name='shippingTime']\").find(\"option:selected\").val(),
  1742.                                 isChooseDatePreview: true
  1743.                                 
  1744.                             },
  1745.                             success:function(result){
  1746.                                 
  1747.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-min-date\",result.minDateShipping);
  1748.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-max-date\",\"{{ \"next year\"| date('Y-m-d') }}\");
  1749.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-default-date\",result.shippingDate);
  1750.                                 
  1751.                                 //\$(\"#shipping-method\").find(\"option:selected\").attr(\"data-price\",result.shippingFees);
  1752.                                 shippingFees = parseFloat(result.shippingFees) ;
  1753.                                 \$(\".shipping-method-fees\").html(shippingFees.toFixed(2)+ \" DH\");
  1754.                                 \$(\".total-to-pay\").html(((total) - (amount) - (reductionCoupon)) + (shippingFees) + (shippingTips) + \" DH\");
  1755.                                 //\$(\"select[name='collectTime']\").modal('show');
  1756.                                 \$(\"select[name='collectTime']\").html(result.collectHoursHTML);
  1757.                                 \$(\"select[name='shippingTime']\").html(result.shippingHoursHTML);
  1758.                                 \$(\"input[name='startProcessingAt']\").val(result.collectDate);
  1759.                                 \$(\"input[name='startDeliveryAt']\").val(result.shippingDate);
  1760.                                 
  1761.                                 /*         
  1762.                                 \$(\"input[name='startDeliveryAt']\").dateDropper({
  1763.                                     large: true,
  1764.                                     lang: 'fr',
  1765.                                     theme: 'datedropper',
  1766.                                     format: \"d-m-Y\",
  1767.                                     expandable: true,
  1768.                                     rangeStart: result.shippingDate,
  1769.                                     rangeEnd: \"{{ \" next year \"|date('Y/m/d') }}\",
  1770.                                     disabledDays: \"{{settings.get().getExcludeDatesOnlyDates()|join(',')}}\",
  1771.                                     disabledWeekDays: '6'
  1772.                                 });
  1773.                                     */
  1774.                                 
  1775.                                 if(result.messages.length > 0){
  1776.                                     \$.toast({
  1777.                                             heading: 'Décalage de date',
  1778.                                             text: result.messages,
  1779.                                             showHideTransition: 'slide',
  1780.                                             hideAfter:12000,
  1781.                                             icon: 'warning',
  1782.                                             loaderBg: '#1ca5df', 
  1783.                                             position:\"top-right\",
  1784.                                             allowToastClose: true,
  1785.                                             stack: false
  1786.                                     })
  1787.                                    
  1788.                                 }
  1789.                             }
  1790.                         });                 
  1791.     
  1792. });
  1793. \t\$(\"input[name='startDeliveryAt']\").change(function(){
  1794.    
  1795. \$.toast().reset('all');
  1796.     
  1797.     var isWallet = 0;
  1798.     if(\$(\"#isWallet\").is(':checked')){
  1799.         isWallet = 1;
  1800.     }
  1801.                         
  1802. \$.ajax({
  1803.                             url:\"{{path('pos_cart_checkout')}}\",
  1804.                             method:\"POST\",
  1805.                             data:{
  1806.                                 
  1807.                                 orderItems: cartLS.list(),
  1808.                                 shippingMethod:\$(\".shippingMethod.active\").attr(\"data-id\"),
  1809.                                 deliveryType:\$(\"select[name='delivery-type'] option:selected\").val(),
  1810.                                 
  1811.                                 
  1812.                                 //reduction:\$(\"#reduction\").val(),
  1813.                                 //payedAmount:\$(\"#cash\").val(),
  1814.                                 startProcessingAt: \$(\"input[name=startProcessingAt]\").val()+\" \"+\$(\"select[name='collectTime']\").find(\"option:selected\").val(),
  1815.                                 startDeliveryAt:\$(\"input[name=startDeliveryAt]\").val()+\" \"+\$(\"select[name='shippingTime']\").find(\"option:selected\").val(),
  1816.                                 isChooseDatePreview: true
  1817.                                 
  1818.                             },
  1819.                             success:function(result){
  1820.                                 
  1821.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-min-date\",result.minDateShipping);
  1822.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-max-date\",\"{{ \"next year\"| date('Y-m-d') }}\");
  1823.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-default-date\",result.shippingDate);
  1824.                                 
  1825.                                 //\$(\"#shipping-method\").find(\"option:selected\").attr(\"data-price\",result.shippingFees);
  1826.                                 shippingFees = parseFloat(result.shippingFees) ;
  1827.                                 \$(\".shipping-method-fees\").html(shippingFees.toFixed(2)+ \" DH\");
  1828.                                 \$(\".total-to-pay\").html(((total) - (amount) - (reductionCoupon)) + (shippingFees) + (shippingTips) + \" DH\");
  1829.                                 //\$(\"select[name='collectTime']\").modal('show');
  1830.                                 //\$(\"select[name='collectTime']\").html(result.collectHoursHTML);
  1831.                                 \$(\"select[name='shippingTime']\").html(result.shippingHoursHTML);
  1832.                                 //\$(\"input[name='startProcessingAt']\").val(result.collectDate);
  1833.                                 \$(\"input[name='startDeliveryAt']\").val(result.shippingDate);
  1834.                                 \$(\"select[name='shippingTime']\").find(\"option:first\").attr(\"selected\",true);
  1835.                                 
  1836.                                 /*         
  1837.                                 \$(\"input[name='startDeliveryAt']\").dateDropper({
  1838.                                     large: true,
  1839.                                     lang: 'fr',
  1840.                                     theme: 'datedropper',
  1841.                                     format: \"d-m-Y\",
  1842.                                     expandable: true,
  1843.                                     rangeStart: result.shippingDate,
  1844.                                     rangeEnd: \"{{ \" next year \"|date('Y/m/d') }}\",
  1845.                                     disabledDays: \"{{settings.get().getExcludeDatesOnlyDates()|join(',')}}\",
  1846.                                     disabledWeekDays: '6'
  1847.                                 });
  1848.                                     */
  1849.                                 
  1850.                                 if(result.messages.length > 0){
  1851.                                     \$.toast({
  1852.                                             heading: 'Décalage de date',
  1853.                                             text: result.messages,
  1854.                                             showHideTransition: 'slide',
  1855.                                             hideAfter:12000,
  1856.                                             icon: 'warning',
  1857.                                             loaderBg: '#1ca5df', 
  1858.                                             position:\"top-right\",
  1859.                                             allowToastClose: true,
  1860.                                             stack: false
  1861.                                     })
  1862.                                    
  1863.                                 }
  1864.                             }
  1865.                         });                 
  1866.     
  1867. });
  1868. \$(\"select[name='collectTime']\").change(function(){
  1869.     
  1870.                         
  1871.                         
  1872. \$.ajax({
  1873.                             url:\"{{path('pos_cart_checkout')}}\",
  1874.                             method:\"POST\",
  1875.                             data:{
  1876.                                 
  1877.                                 
  1878. \t\t\t\t\t\t\t\torderItems: cartLS.list(),
  1879.                                 shippingMethod:\$(\".shippingMethod.active\").attr(\"data-id\"),
  1880.                                 deliveryType:\$(\"select[name='delivery-type'] option:selected\").val(),
  1881.                                 
  1882.                                 //reduction:\$(\"#reduction\").val(),
  1883.                                 //payedAmount:\$(\"#cash\").val(),
  1884.                                 startProcessingAt: \$(\"input[name=startProcessingAt]\").val()+\" \"+\$(\"select[name='collectTime']\").find(\"option:selected\").val(),
  1885.                                 startDeliveryAt:\$(\"input[name=startDeliveryAt]\").val(),
  1886.                                 isChooseDatePreview: true
  1887.                                 
  1888.                             },
  1889.                             success:function(result){
  1890.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-min-date\",result.minDateShipping);
  1891.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-max-date\",\"{{ \"next year\"| date('Y-m-d') }}\");
  1892.                                 \$(\"input[name='startDeliveryAt']\").attr(\"data-dd-opt-default-date\",result.shippingDate);
  1893.                                 //\$(\"select[name='collectTime']\").modal('show');
  1894.                                 //\$(\"select[name='collectTime']\").html(result.collectHoursHTML);
  1895.                                 \$(\"select[name='shippingTime']\").html(result.shippingHoursHTML);
  1896.                                 //\$(\"input[name='startProcessingAt']\").val(result.collectDate);
  1897.                                 \$(\"input[name='startDeliveryAt']\").val(result.shippingDate);
  1898.                             }
  1899.                         });                 
  1900.    
  1901. });
  1902. \$(\"input[name='startProcessingAt']\").trigger(\"change\");
  1903. }); 
  1904. \$(\".orderPreview\").click(function(){
  1905.     \$(\".checkout-area\").html(\"\");
  1906.     
  1907.     if(cartLS.list().length > 0){                        
  1908. \$.ajax({
  1909.                             url:\"{{path('pos_cart_checkout')}}\",
  1910.                             method:\"POST\",
  1911.                             data:{
  1912.                                 shippingMethod:\$(\".shippingMethod.active\").attr(\"data-id\"),
  1913.                                 codeCoupon:\$(\"input[name=codeCoupon]\").val(),
  1914.                                 isPromoPreview: true
  1915.                             },
  1916.                             success:function(result){
  1917.                                 reductionCoupon = 0;
  1918.                                 if(result.coupon ){
  1919.                                     if(result.coupon.typeReduction==\"percent\"){
  1920.                                         reductionCoupon = (total / 100) * result.coupon.valueReduction;
  1921.                                     }else{
  1922.                                         reductionCoupon = result.coupon.valueReduction;
  1923.                                     }
  1924.                                     \$(\"input[name='codeCoupon']\").attr(\"data-coupon-value\",result.coupon.valueReduction);
  1925.                                     \$(\"input[name='codeCoupon']\").attr(\"data-type-value\",result.coupon.typeReduction);
  1926.                                     
  1927.                                     \$.toast({
  1928.                                             heading: result.coupon.code,
  1929.                                             text: result.message,
  1930.                                             showHideTransition: 'slide',
  1931.                                             hideAfter:12000,
  1932.                                             icon: 'success',
  1933.                                             loaderBg: '#1ca5df', 
  1934.                                             position:\"top-right\",
  1935.                                             allowToastClose: true,
  1936.                                             stack: false
  1937.                                     })
  1938.                                 }else{
  1939.                                     \$.toast({
  1940.                                             heading: \"Remarque\",
  1941.                                             text: result.message,
  1942.                                             showHideTransition: 'slide',
  1943.                                             hideAfter:12000,
  1944.                                             icon: 'warning',
  1945.                                             loaderBg: '#1ca5df', 
  1946.                                             position:\"top-right\",
  1947.                                             allowToastClose: true,
  1948.                                             stack: false
  1949.                                     })
  1950.                                 }
  1951.                                 \$(\".promo .codepromo\").html(reductionCoupon.toFixed(2)+\" DH\");
  1952.                                 \$(\".total-to-pay\").html(((total) - (amount) - (reductionCoupon)) + (shippingFees) + (shippingTips) + \" DH\");
  1953.                                 
  1954.                             }
  1955.                         });
  1956.                
  1957.     }
  1958.     else{
  1959.         alert(\"Veuillez rajouter des produit au panier\");
  1960.     }
  1961.                             
  1962.                     });
  1963.   
  1964. })
  1965.     </script>
  1966. <script>
  1967. document.addEventListener(\"turbo:load\", function() {
  1968. var collectMap;
  1969. var collectGeocoder;
  1970. function initCollectMap() {
  1971.   collectMap = new google.maps.Map(document.getElementById(\"collectMap\"), {
  1972.     center: { lat: centerLatCollect, lng: centerLngCollect }, // Set initial map center
  1973.     zoom: 8, // Set initial zoom level
  1974.   });
  1975.   
  1976.   collectMap.addListener(\"click\", function (event) {
  1977.     
  1978.     collectPlaceMarker(event.latLng);
  1979.     getCollectAddress(event.latLng);
  1980.   });
  1981. }
  1982. window.addEventListener('resize', function() {
  1983.   google.maps.event.trigger(collectMap, 'resize');
  1984. });
  1985. function collectPlaceMarker(location) {
  1986.   var marker = new google.maps.Marker({
  1987.     position: location,
  1988.     map: collectMap,
  1989.   });
  1990.   collectMap.panTo(location);
  1991. }
  1992. function getCollectAddress(latLng) {
  1993.     collectGeocoder = new google.maps.Geocoder();
  1994.   collectGeocoder.geocode({ location: latLng }, function (results, status) {
  1995.     console.log(results);
  1996.     if (status === \"OK\") {
  1997.       if (results[0]) {
  1998.         console.log(results[0].formatted_address);
  1999.       } else {
  2000.         console.log(\"No results found\");
  2001.       }
  2002.     } else {
  2003.       console.log(\"Geocoder failed due to: \" + status);
  2004.     }
  2005.   });
  2006. }
  2007. initCollectMap();
  2008. var shippingMap;
  2009. var shippingGeocoder;
  2010. function initShippingMap() {
  2011.   shippingMap = new google.maps.Map(document.getElementById(\"shippingMap\"), {
  2012.     center: { lat: centerLatShipping, lng: centerLngShipping }, // Set initial map center
  2013.     zoom: 8, // Set initial zoom level
  2014.   });
  2015.   
  2016.   shippingMap.addListener(\"click\", function (event) {
  2017.     
  2018.     shippingPlaceMarker(event.latLng);
  2019.     getShippingAddress(event.latLng);
  2020.   });
  2021. }
  2022. window.addEventListener('resize', function() {
  2023.   google.maps.event.trigger(shippingMap, 'resize');
  2024. });
  2025. function shippingPlaceMarker(location) {
  2026.   var marker = new google.maps.Marker({
  2027.     position: location,
  2028.     map: shippingMap,
  2029.   });
  2030.   shippingMap.panTo(location);
  2031. }
  2032. function getShippingAddress(latLng) {
  2033.     shippingGeocoder = new google.maps.Geocoder();
  2034.   shippingGeocoder.geocode({ location: latLng }, function (results, status) {
  2035.     console.log(results);
  2036.     if (status === \"OK\") {
  2037.       if (results[0]) {
  2038.         console.log(results[0].formatted_address);
  2039.       } else {
  2040.         console.log(\"No results found\");
  2041.       }
  2042.     } else {
  2043.       console.log(\"Geocoder failed due to: \" + status);
  2044.     }
  2045.   });
  2046. }
  2047. initShippingMap();
  2048. \$(\"#modalShippingMap\").click(function(){
  2049.     \$(\"#shippingMap\").removeClass(\"d-none\");
  2050.     \$(\"#collectMap\").addClass(\"d-none\");
  2051. });
  2052. \$(\"#modalCollectMap\").click(function(){
  2053.     \$(\"#shippingMap\").addClass(\"d-none\");
  2054.     \$(\"#collectMap\").removeClass(\"d-none\");
  2055. });
  2056. });
  2057. </script>
  2058. <!-- Modal -->
  2059. <div class=\"modal fade\" id=\"collectMapModal\" tabindex=\"-1\" aria-labelledby=\"collectMapModalLabel\" aria-hidden=\"true\">
  2060.   <div class=\"modal-dialog modal-xl\" style=\"width:800px;\">
  2061.     <div class=\"modal-content\">
  2062.       <div class=\"modal-header\">
  2063.         <h5 class=\"modal-title\" id=\"collectMapModalLabel\">Cordonnées de collect</h5>
  2064.         <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
  2065.       </div>
  2066.       <div class=\"modal-body\">
  2067.         <div id=\"collectMap\"></div>
  2068.         <div id=\"shippingMap\"  class=\"d-none\"></div>
  2069.       </div>
  2070.       <div class=\"modal-footer\">
  2071.         <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Annuler</button>
  2072.         <button type=\"button\" class=\"btn btn-primary\">Séléctionner</button>
  2073.       </div
  2074.     </div>
  2075.   </div>
  2076. </div>
  2077. {% endblock %}""@Flexy/FrontBundle/Themes/IlaveU/templates/cart/cart.html.twig""/home/gebcloud/public_html/ilaveu/src/Flexy/FrontBundle/Themes/IlaveU/templates/cart/cart.html.twig");
  2078.     }
  2079. }