{% extends 'base_front.html.twig' %}
{% block meta %}
{% if notes['globalNote']['count'] > 0 %}
{% set globalNote = notes['globalNote']['totalNote'] / notes['globalNote']['count'] %}
{% else %}
{% set globalNote = 0 %}
{% endif %}
<title>Produit
{{ product.name }}</title>
<meta name="description" content="Le produit {{ product.name }} de la catégorie {{ product.subCategories.first.name }} {% if globalNote > 0 %}possède une note de {{ globalNote|number_format(1, '.') }}/5 {% else %}à un stock limité à {{ product.quantity }} articles, dépéchez-vous !{% endif %}">
{% if not product.isActivated %}
<meta name="robots" content="noindex">
{% endif %}
{% endblock %}
{% block style %}
<link href="{{ asset('css/jquery.rateyo.css') }}" rel="stylesheet">
<link rel="stylesheet" href="{{ asset('css/jquery.datetimepicker.min.css') }}">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Mukta&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{{ asset('css/formReservation.css') }}">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
<link rel="stylesheet" href="{{ asset('css/singleProduct/style.css') }}">
<link rel="stylesheet" href="{{ asset('css/front/promo.css') }}">
{% endblock %}
{% form_theme formComment _self %}
{% block body %}
<!-- Modal options groups -->
<div class="modal fade" id="modalOptionGP" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
<div class="modal-dialog myWidth" role="document">
<div class="modal-content">
{# <form action=""> #}
<div class="modal-header">
<h5 class="modal-title" id="">Modifier les groupes d'options</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="row">
{# <div class="col-lg-6 col-12" >
<div id="optionsimage">
<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos.toArray()[0].url) }}" alt="">
</div>
</div> #}
<div class="col-12" id="valeurOpion" style="display: block">
{# <div class="mb-3">
<div class="name_option">Type de visite <span>(choisir une seule option)</span></div>
<div class="cont_valeurs_option">
<div class="cont_one_value">
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" name="flexRadioDefault" id="flexRadioDefault1">
<label class="custom-control-label one_value" for="flexRadioDefault1">
<div class="infos_value">Visite thématique (par exemple : Histoire médiévale) <span>10 €</span></div>
</label>
</div>
<div>
<label for="flexRadioDefault1" class="labelOneValue">
<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
</label>
</div>
</div>
<div class="cont_one_value">
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" name="flexRadioDefault" id="flexRadioDefault1">
<label class="custom-control-label one_value" for="flexRadioDefault1">
<div class="infos_value">Type de visite<span>10 €</span></div>
</label>
</div>
<div>
<label for="flexRadioDefault1" class="labelOneValue">
<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
</label>
</div>
</div>
<div class="cont_one_value">
<div class="custom-control custom-radio">
<input class="custom-control-input" type="radio" name="flexRadioDefault" id="flexRadioDefault1">
<label class="custom-control-label one_value" for="flexRadioDefault1">
<div class="infos_value">Type de visite<span>10 €</span></div>
</label>
</div>
<div>
<label for="flexRadioDefault1" class="labelOneValue">
<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
</label>
</div>
</div>
</div>
</div>
<div class="mb-3">
<div class="name_option">Options supplémentaires <span>(plusieurs choix possibles)</span></div>
<div class="cont_valeurs_option">
<div class="cont_one_value">
<div class="custom-control custom-checkbox">
<input class="custom-control-input" type="checkbox" name="flexcheckboxDefault" id="flexcheckboxDefault1">
<label class="custom-control-label one_value" for="flexcheckboxDefault1">
<div class="infos_value">Visite thématique (par exemple : Histoire médiévale) <span>10 €</span></div>
</label>
</div>
<label for="flexcheckboxDefault1" class="labelOneValue">
<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
</label>
</div>
<div class="cont_one_value">
<div class="custom-control custom-checkbox">
<input class="custom-control-input" type="checkbox" name="flexcheckboxDefault" id="flexcheckboxDefault1">
<label class="custom-control-label one_value" for="flexcheckboxDefault1">
<div class="infos_value">Type de visite<span>10 €</span></div>
</label>
</div>
<label for="flexcheckboxDefault1" class="labelOneValue">
<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
</label>
</div>
<div class="cont_one_value">
<div class="custom-control custom-checkbox">
<input class="custom-control-input" type="checkbox" name="flexcheckboxDefault" id="flexcheckboxDefault1">
<label class="custom-control-label one_value" for="flexcheckboxDefault1">
<div class="infos_value">Type de visite<span>10 €</span></div>
</label>
</div>
<label for="flexcheckboxDefault1" class="labelOneValue">
<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ product.photos[0].url) }}" alt="" srcset="">
</label>
</div>
</div>
</div> #}
</div>
</div>
</div>
{# {% endfor %}
{% endif %} #}
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
<button type="submit" class="btn btn-primary" id="" onclick="validemodalgroupe('goptions')">Valider</button>
</div>
{# </form> #}
</div>
</div>
</div>
<!-- Fin Modal options groups -->
<!-- Modal option chambre -->
<div class="modal fade" id="modalOptionChambre" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
<div class="modal-dialog myWidth" role="document">
<div class="modal-content">
{# <form action=""> #}
<div class="modal-header">
<h5 class="modal-title" id="">Selectionner les chambres</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
{# Option chambre #}
{% if product.typeHebergements is not null %}
<div class="container my-3">
<div class="row">
{% if product.chambres.toArray()|length > 0 %}
{% for index, chambre in product.chambres %}
{% if chambre.imageChambre %}
<div class="col-lg-6 col-md-6 col-10 mb-4">
<img src="{{ asset(constant('App\\Services\\File::IMAGE_ROOM_OPTION_DIR') ~ chambre.imageChambre) }}" alt="" class="imageChambre">
</div>
{% else %}
<div class="col-md-6 col-10 mb-4"></div>
{% endif %}
<div class="col-lg-4 col-md-4 col-4 my-auto para">
{# <p class="para-1">Chambre n° {{ index }}</h4> #}
{% if chambre.typeChambre %}
<p class="para-1">{{ chambre.typeChambre }}</p>
{% endif %}
<p class="para-3">
{% for Typelits, qt in chambre.litChambreData %}
{% if product.typeHebergements.slugTypeHebergm == "hotel" %}
{% set nbrParticipants = 0 %}
{% for lit in chambre.typeDeLits.toArray() %}
{% set nbrParticipants = nbrParticipants + lit.place %}
{% endfor %}
<input type="hidden" name="" id="roomParticipant_{{ chambre.id}}" value="{{nbrParticipants}}">
{% endif %}
{# {% if chambre.nombreLits %} #}
<span class="span-1">{{ qt }} {{ Typelits }}{{ qt > 1 ? "s" : '' }} </span><br>
{# {% endif %} #}
{% endfor %}
</p>
{# Price if hotel #}
{% if product.typeHebergements.slugTypeHebergm == "hotel" %}
<p>Prix par nuit : {{ chambre.tarifNuit }} €</p>
<input type="hidden" name="" id="priceRoom_{{ chambre.id }}" value="{{ chambre.tarifNuit }}">
{# Prix par jour : {{ chambre.tarifJour }} €</p> #}
{% else %} {# if not hotel#}
{# <p>[prixnothotel]</p> #}
{% endif %}
</div>
<div class="col-lg-2 col-md-2 col-3 my-auto">
<div class="buttonAdd" class="form-check">
<input class="form-check-input" type="checkbox" value="" id="roomButton_{{ chambre.id }}">
<label class="form-check-label" for="defaultCheck1" style="line-height: initial; font-weight: bold;">
Ajouter
</label>
</div>
</div>
{# <div class="col-lg-3 col-md-3 col-3 my-auto">
<button class="btn btn-primary btn-sm" id="roomButton{{ roomHebergment.id }}" data-statut="ajouter" onclick="toggleRoomSelection({{ roomHebergment.id }})" style="height: auto;">
Ajouter
</button>
</div> #}
{% endfor %}
{% else %}
<p class="mx-auto">Pas de chambre...</p>
{% endif %}
</div>
</div>
{% endif %}
</div>
{# {% endfor %}
{% endif %} #}
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
<button type="submit" class="btn btn-primary" id="" onclick="validemodalgroupe('chambre')">Valider</button>
</div>
{# </form> #}
</div>
</div>
</div>
<!-- Fin Modal option chambre -->
<!-- Modal options -->
<div class="modal fade" id="modalOption" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
<div class="modal-dialog myWidth" role="document">
<div class="modal-content">
{# <form action=""> #}
<div class="modal-header">
<h5 class="modal-title" id="">Modifier les options</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="row">
<input type="hidden" id="id_optionmodal">
<input type="hidden" id="name_optionmodal">
<input type="hidden" id="image_optionmodal">
<div class="col-lg-6 col-12" >
<div id="optionsimage"></div>
</div>
<div class="col-lg-6 col-12" style="display: block">
<div class="optionscolor">
<label >couleur d'option</label>
<select name="" id="optionscolor" class="form-control wide" style="display: block;">
</select>
</div><br>
<div class="optionsform">
<label for="optionsform">Format</label>
<select name="" id="optionsform" class="form-control wide" style="display: block !important;">
</select>
</div><br>
<div class="optionsfinition">
<label for="optionsfinition">Finition :</label>
<select name="" id="optionsfinition" class="form-control wide" style="display: block !important;">
</select>
</div><br>
<div class="optionspapier">
<label for="optionspapier">Papier :</label>
<select name="" id="optionspapier" class="form-control wide"style="display: block !important;">
</select>
</div><br>
<div class="optionsetiquette">
<label for="optionsetiquette">Étiquette :</label>
<select name="" id="optionsetiquette" class="form-control wide" style="display: block !important;">
</select>
</div><br>
<div class="optionsruban">
<label for="optionsruban">Ruban: :</label>
<select name="" id="optionsruban" class="form-control wide" style="display: block !important;">
</select>
</div><br>
<div class="optionsquantite">
<label for="optionsquantite">Quantité :</label>
<select name="" id="optionsquantite" class="form-control wide" style="display: block !important;">
</select>
</div><br>
</div>
</div>
</div>
{# {% endfor %}
{% endif %} #}
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button>
<button type="submit" class="btn btn-primary" id="validemodaloption" onclick="validemodaloption()">Ok</button>
</div>
{# </form> #}
</div>
</div>
</div>
<!-- Fin Modal options -->
<!-- Modal Reductions -->
<div class="modal fade" id="modalReduction" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
<div class="modal-dialog myWidth" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="">Les réductions disponibles pour cet hébergement</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
{% for reductionData in product.productReductions %}
<div class="reduction-item">
<p class="p-3">
- Recevez une réduction de <b>{{ reductionData.reduction }}%</b>
si vous faites une réservation à partir de
<b>{{ reductionData.startDay }} jours</b>.
</p>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
<!-- Fin Modal Reductions -->
<!-- Modal Tarif Degressif -->
<div class="modal fade" id="modalTarif" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle"
aria-hidden="true">
<div class="modal-dialog myWidth" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="">Les tarifs degressifs disponibles pour cette activités</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
{% for tarif in product.tarifDegressifs %}
<div class="tarif-item">
<p class="p-3">
- Si vous êtes à partir de <b>{{ tarif.nbrPers }} personnes</b>,
vous recevriez une réduction de
<b>{{ tarif.reduction }}%</b>.
</p>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
<!-- Fin Modal Reductions -->
<!-- Modal caracteristique hebergement -->
<div class="modal fade" id="modalCarateristiqHeb" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle"
aria-hidden="true">
<div class="modal-dialog modal600" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="">Caractéristiques de l'hébergement</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="card-body info-hebegement">
{% set totalChambre = 0 %}
{% if product.chambres.toArray() != [] %} {# If the product have chambre #}
{% for chambre in product.chambres %}
{% set totalChambre = totalChambre + chambre.NumChambre %}
{% endfor %}
{% else %}
{% set totalChambre = product.nbChambre %}
{% endif %}
<p class="card-text"><i class="fas fa-home" style="color:#FE7708"></i> Nombre total de chambres:
<span style="color:#0DE8C7">{{ totalChambre }}</span>
</p>
{% if product.securities.toArray() != [] %}
<p class="card-text"><i class="fas fa-shield-alt" style="color:#FE7708"></i> Sécurité:
{% for securt in product.securities.toArray() %}
<span style="color:#0DE8C7"> {{ securt.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.typeLocalisations.toArray() != [] %}
<p class="card-text"><i class="fas fa-map-marker-alt" style="color:#FE7708"></i> Localisation:
{% for typeLocalisation in product.typeLocalisations.toArray() %}
<span style="color:#0DE8C7">
{{ typeLocalisation.labels }}
</span> {% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.equipment.toArray() != [] %}
<p class="card-text"><i class="fas fa-tools" style="color:#FE7708"></i> Équipements:
{% for equipt in product.equipment.toArray() %}
<span style="color:#0DE8C7"> {{ equipt.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.caracteristics.toArray() != [] %}
<p class="card-text"><i class="fas fa-cogs" style="color:#FE7708"></i> Confort:
{% for caract in product.caracteristics.toArray() %}
<span style="color:#0DE8C7"> {{ caract.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.langueHotes.toArray() != [] %}
<p class="card-text"><i class="fa fa-language" style="color:#FE7708"></i> Langage propriétaire:
{% for langue in product.langueHotes.toArray() %}
<span style="color:#0DE8C7"> {{ langue.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.equipementsCuisines.toArray() != [] %}
<p class="card-text"><i class="fas fa-drumstick-bite" style="color:#FE7708"></i> Equipements de cuisine:
{% for equipementCuisine in product.equipementsCuisines.toArray() %}
<span style="color:#0DE8C7"> {{ equipementCuisine.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.salleDeBains.toArray() != [] %}
<p class="card-text"><i class="fas fa-sink" style="color:#FE7708"></i> Salle de bain:
{% for oneSalleDeBain in product.salleDeBains.toArray() %}
<span style="color:#0DE8C7"> {{ oneSalleDeBain.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.accessoiresDeChambres.toArray() != [] %}
<p class="card-text"><i class="fas fa-person-booth" style="color:#FE7708"></i> Accessoires de chambres:
{% for oneAccessoiresDeChambres in product.accessoiresDeChambres.toArray() %}
<span style="color:#0DE8C7"> {{ oneAccessoiresDeChambres.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.mobilierExterieurs.toArray() != [] %}
<p class="card-text"><i class="fas fa-seedling" style="color:#FE7708"></i> Mobilier extérieur:
{% for oneMobilierExterieurs in product.mobilierExterieurs.toArray() %}
<span style="color:#0DE8C7"> {{ oneMobilierExterieurs.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
</div>
</div>
</div>
</div>
</div>
<!-- Fin Modal caracteristique hebergement -->
<div class="list-single-carousel" style="margin-top:90px; position: relative">
<div class="owl-carousel owl-theme owl-second">
{% for photo in product.photos %}
<div class="item" style="height:400px;background:url({{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ photo.url) }})no-repeat center;background-size: cover" alt="{{ photo.url }}"></div>
{% endfor %}
</div>
<div class="col-md-2 col-12 btnMedia">
<div class="vendor-head text-xl-right row">
{% if product.photos is not empty %}
<div class="col-md-12 mb-3">
<a href="#" class="btn btn-default btn-sm ml-2 text-center" id="open-popup-images">Voir les photos</a>
</div>
{% endif %}
{% if product.youtubeVideo %}
<div class="col-md-12">
<a class="popup-youtube btn btn-default btn-sm ml-2 text-center" href="{{ product.youtubeVideo }}">Voir la vidéo</a>
</div>
{% endif %}
</div>
</div>
</div>
{% if isPromoAdmin %}
<div class="bannier-promo mt-5">
<div class="cont container">
Promotion
<span class="percent">{{ isPromoAdmin.value }}%</span>
{# <svg class="outlined-text" width="80%" height="200" viewBox="0 0 800 200" preserveAspectRatio="xMidYMid meet">
<text x="50" y="140">-20%</text>
</svg> #}
de commission en cours jusqu'au <span class="date-fin-prom">{{ isPromoAdmin.endAt|format_date('long', locale='fr') }}</span>
pour tous les serveices
</div>
</div>
{% endif %}
<div class="list-single-second mt-1">
<div class="container">
<div class="">
<h2 class="mb10 card titreProduct">{{ product.name }}</h2>
<div class="row">
<div class="col-md-6 col-12">
<div class="vendor-head text-left">
<p class="text-black-50">
<span class="mr-2">
<i class="fas fa-map-marker-alt "></i>
</span>
{% for department in product.departments %}
{{ department.name }}
{% if not loop.last %},
{% endif %}
{% else %}
Dans toute la France
{% endfor %}
<br>Service de la catégorie
<a href="{{ path('front_product_subcategory', {'subCategorySlug': product.subCategories.first.subCategorySlug}) }}" class="btn-default-link">{{ product.subCategories.first.name }}</a>
</p>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalCenter">
Lire les conditions générales de vente
</button>
<!-- Modal -->
{% if (product.company.conditionsVente|raw) is null or (product.company.conditionsVente|raw == '') %}
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterTitle">Condition générale de vente</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
Veulliez contactez votre prestataire pour connaitre la condition de vente
</div>
</div>
</div>
</div>
{% else %}
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-xl" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterTitle">Condition générale de vente</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
{{ product.company.conditionsVente | raw }}
</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
{# for hebergement only#}
{% if product.typeHebergements is not null%}
<div class="col-md-6">
<div class="card">
<div class="card-body info-hebegement">
{% set totalChambre = 0 %}
{% if product.chambres.toArray() != [] %} {# If the product have chambre #}
{% for chambre in product.chambres %}
{% set totalChambre = totalChambre + chambre.NumChambre %}
{% endfor %}
{% else %}
{% set totalChambre = product.nbChambre %}
{% endif %}
<p class="card-text"><i class="fas fa-home" style="color:#FE7708"></i> Nombre total de chambres:
<span style="color:#0DE8C7">{{ totalChambre }}</span>
</p>
{% if product.securities.toArray() != [] %}
<p class="card-text"><i class="fas fa-shield-alt" style="color:#FE7708"></i> Sécurité:
{% for securt in product.securities.toArray() %}
<span style="color:#0DE8C7"> {{ securt.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.typeLocalisations.toArray() != [] %}
<p class="card-text"><i class="fas fa-map-marker-alt" style="color:#FE7708"></i> Localisation:
{% for typeLocalisation in product.typeLocalisations.toArray() %}
<span style="color:#0DE8C7">
{{ typeLocalisation.labels }}
</span> {% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.equipment.toArray() != [] %}
<p class="card-text"><i class="fas fa-tools" style="color:#FE7708"></i> Équipements:
{% for equipt in product.equipment.toArray() %}
<span style="color:#0DE8C7"> {{ equipt.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.caracteristics.toArray() != [] %}
<p class="card-text"><i class="fas fa-cogs" style="color:#FE7708"></i> Confort:
{% for caract in product.caracteristics.toArray() %}
<span style="color:#0DE8C7"> {{ caract.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
{% if product.langueHotes.toArray() != [] %}
<p class="card-text"><i class="fa fa-language" style="color:#FE7708"></i> Langage propriétaire:
{% for langue in product.langueHotes.toArray() %}
<span style="color:#0DE8C7"> {{ langue.labels }} </span>
{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% endif %}
</div>
<button type="button" class="btn btn-primary" id="btnMoreCaraqHeb" data-toggle="modal" data-target="#modalCarateristiqHeb">Plus de details</details></button>
</div>
</div>
{% endif %}
{# for location voiture only #}
{% set isVehicules = false %}
{% for singleCategory in product.subcategories %}
{% if singleCategory.id == 53 %} {# if subcategories is vehicules #}
{% set isVehicules = true %}
{% endif %}
{% endfor %}
{% if isVehicules == true %}
<div class="col-md-6">
<div class="card">
<div class="card-body infoVehicl">
<div class="oneInfoVehicl">
<div class="cercle-icon">
<img src="{{ asset('icon/vehicules/manual-transmission.png') }}" alt="">
</div>
{# Manuelle #}
{{caracteristiques["gearboxType"] is not null ? caracteristiques["gearboxType"] : "-" }}
</div>
<div class="oneInfoVehicl">
<div class="cercle-icon">
<img src="{{ asset('icon/vehicules/canister.png') }}" alt="">
</div>
{# Essence #}
{{caracteristiques["fuelType"] is not null ? caracteristiques["fuelType"] : "-" }}
</div>
<div class="oneInfoVehicl">
<div class="cercle-icon">
<img src="{{ asset('icon/vehicules/air-conditioner.png') }}" alt="">
</div>
{# Oui #}
{% if caracteristiques["isAirConditioned"]%}
Oui
{% else %}
Non
{% endif %}
</div>
<div class="oneInfoVehicl">
<div class="cercle-icon">
<img src="{{ asset('icon/vehicules/car.png') }}" alt="">
</div>
{# 5 portes #}
{{ caracteristiques["doorCount"] is not null ? caracteristiques["doorCount"] ~ " portes" : "-" }}
</div>
<div class="oneInfoVehicl">
<div class="cercle-icon">
<img src="{{ asset('icon/vehicules/people.png') }}" alt="">
</div>
{# 5 places #}
{{caracteristiques["seatCount"] is not null ? caracteristiques["seatCount"] ~ " places" : "-" }}
</div>
<div class="oneInfoVehicl">
<div class="cercle-icon">
<img src="{{ asset('icon/vehicules/download-speed.png') }}" alt="">
</div>
{# Illimité #}
{{caracteristiques["speedLimit"] is not null ? caracteristiques["speedLimit"] ~ " Km/h" : "Illimité" }}
</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
<div class="vendor-meta bg-white border m-0 ">
<div class="vendor-meta-item vendor-meta-item-bordered">
{% if product.typeHebergements is null or product.typeHebergements.slugTypeHebergm != 'hotel' %}
{% set today = "now"|date('Y-m-d') %}
{% set customPriceFound = false %}
{% set customPrice = 0 %}
{% set currentPrice = 0 %}
{% set price = 0 %}
{% set difference = null %}
{% set reductionPercentage = 0 %}
{% set duration = null %}
{% set countdown = null %}
{% set reductionValid = false %}
{% for dayPrice in product.dayPrice %}
{% set formattedDate = dayPrice.customDate|date('Y-m-d') %}
{% if formattedDate == today %}
{% set customPriceFound = true %}
{% set customPrice = dayPrice.customPrice|number_format(2, '.', '') %}
{% endif %}
{% endfor %}
{% set month = "now"|date('n') %}
{% if month >= 3 and month <= 5 %}
{% set springPrice = product.springPrice %}
{% if springPrice is not null %}
{% set currentPrice = product.springPrice %}
{% else %}
{% set currentPrice = 0 %}
{% endif %}
{% elseif month >= 6 and month <= 8 %}
{% set summerPrice = product.summerPrice %}
{% if summerPrice is not null %}
{% set currentPrice = product.summerPrice %}
{% else %}
{% set currentPrice = 0 %}
{% endif %}
{% elseif month >= 9 and month <= 11 %}
{% set autumnPrice = product.autumnPrice %}
{% if autumnPrice is not null %}
{% set currentPrice = product.autumnPrice %}
{% else %}
{% set currentPrice = 0 %}
{% endif %}
{% else %}
{% set winterPrice = product.winterPrice %}
{% if winterPrice is not null %}
{% set currentPrice = product.winterPrice %}
{% else %}
{% set currentPrice = 0 %}
{% endif %}
{% endif %}
{% set day = "now"|date('N') %}
{% if day == 6 or day == 7 %}
{% set weekEndPrice = product.weekEndPrice %}
{% if weekEndPrice is not null %}
{% set currentPrice = product.weekEndPrice %}
{% else %}
{% set currentPrice = 0 %}
{% endif %}
{% endif %}
{% set periodPrice = 0 %}
{% for period in product.periodPrice.toArray() %}
{% set startDate = period.startDate|date("Y-m-d") %}
{% set endDate = period.endDate|date("Y-m-d") %}
{% if today >= startDate and today <= endDate and period.price is not null %}
{% set periodPrice = period.price %}
{% else %}
{% set currentPrice = 0 %}
{% endif %}
{% endfor %}
{% if periodPrice != 0 %}
{% set currentPrice = periodPrice %}
{% endif %}
{% if customPriceFound and customPrice !=0 %}
{% set price = customPrice %}
{% elseif currentPrice != 0 and currentPrice is not null and customPrice == 0 %}
{% set price = currentPrice %}
{% elseif currentPrice == 0 or currentPrice is null and customPrice == 0 %}
{% set price = product.price %}
{% endif %}
{% for autoReduce in product.productAutoReduction.toArray %}
{% if autoReduce.createdAt is not null and autoReduce.countdown is not null and autoReduce.duration is not null and autoReduce.reductionPercentage is not null %}
{% set difference = date(today).diff(autoReduce.createdAt).days %}
{% set duration = autoReduce.duration %}
{% set countdown = autoReduce.countdown %}
{% set reductionPercentage = autoReduce.reductionPercentage %}
{% set durationout = duration + countdown %}
{# {{ dump(countdown,difference,durationout,duration) }} #}
{% set reductionValid = difference > countdown and difference <= durationout %}
{% endif %}
{% endfor %}
{% if product.company.type != "service" %}
<span class="vendor-price">
{{ product.price|number_format(2, '.', '') }}€
</span>
{% elseif reductionValid %}
{% set priceReduced = price - ((price * reductionPercentage) / 100) %}
<span class="vendor-price">
{{ priceReduced|number_format(2, '.', '') }}€
</span>
{% else %}
<span class="vendor-price">
{{ price|number_format(2, '.', '') }}€
</span>
{% endif %}
<span class="vendor-text">Prix</span>
{% else %}
{% set lengthRoomNight = 0 %}
{% set statusByNight = false %}
{% set allPriceByNight = 0 %}
{% set lengthRoomDay = 0 %}
{% set statusByDay = false %}
{% set allPriceByDay = 0 %}
{% if product.chambres is defined %}
{% for roomOption in product.chambres.toArray %}
{% if roomOption.tarifNuit is defined %}
{% set lengthRoomNight = lengthRoomNight + 1 %}
{% set statusByNight = true %}
{% set allPriceByNight = allPriceByNight + roomOption.tarifNuit %}
{% endif %}
{% if roomOption.tarifJour is not null %}
{% set lengthRoomDay = lengthRoomDay + 1 %}
{% set statusByDay = true %}
{% set allPriceByDay = allPriceByDay + roomOption.tarifJour %}
{% endif %}
{% endfor %}
{% if statusByDay or statusByNight %}
<p>Prix moyen d'une chambre:</p>
{% endif %}
{% if statusByNight %}
<li>par nuit : <strong>{{ (allPriceByNight / lengthRoomNight)|number_format(2, '.') }}€</strong></li>
{# <li>Prix par nuit : <strong>{{ product.price|number_format(2, '.') }}€</strong></li> #}
{% endif %}
{% if statusByDay %}
{# <li>par jour : <strong>{{ (allPriceByDay / lengthRoomDay)|number_format(2, '.') }}€</strong></li> #}
{# <li>Prix de séjour : <strong>{{ product.price|number_format(2, '.') }}€</strong></li> #}
{% endif %}
{% endif %}
{% if not statusByNight and not statusByDay %}
<li>Prix : <strong>Veuillez definir le prix de votre hotel</strong></li>
{% endif %}
{# <span class="vendor-text">Prix</span>
<span class="vendor-price">
{{ product.price|number_format(2, '.', '') }}€
</span> #}
{% endif %}
</div>
<div class="vendor-meta-item vendor-meta-item-bordered">
{% if product.quantity %}
<span class="vendor-guest">
{{ product.quantity }}
</span>
<span class="vendor-text">Quantité restante</span>
{% endif %}
</div>
{% set notesProduct = 0 %}
{% for avi in product.avis %}
{% set notesProduct = notesProduct + avi.globalNote %}
{% endfor %}
{% set noteTotalProduct = (notesProduct > 0) ? notesProduct / product.avis|length : 0 %}
<div class="vendor-meta-item vendor-meta-item-bordered">
<span class="rating-star">
{% for i in 1..5 %}
{% if i < noteTotalProduct %}
<i class="fa fa-star rated"></i>
{% else %}
<i class="fa fa-star rate-mute"></i>
{% endif %}
{% endfor %}
</span>
<span class="rating-count vendor-text">({{ product.avis|length }})</span>
</div>
</div>
</div>
</div>
<!-- /.page-header -->
<!-- page-header -->
{# Zoom img option #}
{% if product.company.isConfirmed %}
{% if product.productOptions %}
{% for option in product.productOptions %}
{% if option.image1 %}
<img id="{{ option.id }}btn1img" class="imgZoomOption" src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ option.image1) }}">
{% endif %}
{% if option.image2 %}
<img id="{{ option.id }}btn2img" class="imgZoomOption" src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ option.image2) }}">
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
<div class="backgroundTrans"></div>
<button class="exitZoomOpt">X</button>
{# Zoom img option #}
{# Pannier #}
{# <div class="tab-pane fade active show" id="allguest" role="tabpanel" aria-labelledby="allguest-tab" style="width:100%">
<div class="card-body">
<h3>Mon panier ({{ products|length }} produit{% if products|length > 1 %}s{% endif %})</h3>
</div>
<div class="table-responsive" style="width:100%">
<table class="table mt-4">
<thead>
<tr>
<th class="wedding-budget-event">Designation</th>
<th class="wedding-budget-estimate">Aperçu</th>
<th class="wedding-budget-estimate">Prix à l'unité</th>
<th class="wedding-budget-actual">Quantité</th>
<th class="wedding-budget-paid">Total produit</th>
<th class="wedding-budget-paid"></th>
</tr>
</thead>
<tbody>
{% if pack %}
<tr>
<td>{{ pack.name }}</td>
<td><img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR')) ~ pack.image }}" style="height:50px;border-radius:2px"></td>
<td><span class="total-amount">{{ pack.price|number_format(2, '.') }}€</span></td>
<td>1</td>
<td><span class="total-amount">{{ pack.price|number_format(2, '.') }}€</span></td>
<td class="paid-total"><a href="{{ path('front_my_basket_remove_pack', {'id': pack.id}) }}" class="btn btn-rounded btn-default">Supprimer du panier</a></td>
</tr>
{% endif %}
{% set TotalPriceProduct = 0 %}
{% for product in products %}
<tr class="border-bottom">
<td>{{ product.product.name }}
{% set isClothing = null %}
{% for subcategory in product.product.subCategories %}
{% if subcategory.isClothing %}
{% set isClothing = true %}
{% endif %}
{% endfor %}
{% if isClothing %}
<br><strong>Taille : {{ product.size }}</strong>
{% endif %}
{% set isColor = null %}
{% for subcategory in product.product.subCategories %}
{% if subcategory.isColor %}
{% set isColor = true %}
{% endif %}
{% endfor %}
{% if isColor %}
<br><strong>Couleur : {{ product.color }}</strong>
{% endif %}
</td>
<td><img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR')) ~ product.product.photos.first.url }}" style="height:50px;border-radius:2px"></td>
{% if product.promo %}
{% set ProductPrice = product.product.price - product.promo %}
{% else %}
{% set ProductPrice = product.product.price %}
{% endif %}
<td class="estimate-total"><span class="total-amount">{% if product.promo %}<small><del>{{ product.product.price|number_format(2, '.') }}€</del></small> <strong>{{ ProductPrice|number_format(2, '.') }}€</strong>{% else %}{{ ProductPrice|number_format(2, '.') }}€{% endif %}</span><br>{% if product.promo %}(code promo -{{ product.promo }}€){% endif %}</td>
<td class="actual-total">{{ product.quantity }}</td>
{% set TotalWithQuantity = product.quantity * ProductPrice %}
{% set TotalPriceProduct = TotalPriceProduct + TotalWithQuantity %}
<td class="paid-total"><span class="total-amount">{{ TotalWithQuantity|number_format(2, '.') }}€</span></td>
<td class="paid-total"><a href="{{ path('front_my_basket_remove_product', {'id': product.product.id}) }}" class="btn btn-rounded btn-default">Supprimer du panier</a></td>
</tr>
{% for option in product.options %}
{% set optionObject = filter_service.getProductOption(option) %}
{% set TotalPriceProduct = TotalPriceProduct + optionObject.price %}
<tr class="border-bottom" style="background:#fff">
<td class="pl-4"><strong>Option :</strong> {{ optionObject.name }}</td>
<td></td>
<td class="estimate-total"><span class="total-amount">{{ optionObject.price|number_format(2, '.') }}€</span></td>
<td class="actual-total"></td>
<td class="paid-total"><span class="total-amount">{{ optionObject.price|number_format(2, '.') }}€</span></td>
<td class="paid-total"></td>
</tr>
{% endfor %}
{% endfor %}
{% if pack or products is not empty %}
<tr>
<td>TOTAL :</td>
<td></td>
<td></td>
<td></td>
{% if pack %}
{% set TotalPriceProduct = TotalPriceProduct + pack.price %}
{% endif %}
<td>{{ TotalPriceProduct|number_format(2, '.') }}€</td>
</tr>
{% endif %}
{% if not pack and products is empty %}
<tr><td>Aucun produit ajouté au panier</td></tr>
{% endif %}
</tbody>
</table>
</div>
<div class="card-footer" style="height:70px">
{% if products|length > 0 or pack is not null %}
{% if is_granted('ROLE_ENTERPRISE') == false %}
<div class="float-left">
{{ form_start(form, {'attr': {'class': 'form-inline'}}) }}
<div class="form-group">
{{ form_widget(form.codePromo) }}
</div>
<button type="submit" class="btn btn-default ml-3">Valider</button>
{{ form_end(form) }}
{% if isMessagePromo is defined and isMessagePromo %}
<span style="color:green">Code promo valide !</span>
{% endif %}
</div>
<div class="float-right">
<a href="{{ path('front_command_livraison') }}" class="btn btn-primary">Commander</a>
</div>
{% endif %}
{% endif %}
</div>
</div> #}
{# Pannier #}
<div class="vendor-content-wrapper">
<div class="container">
<div class="row">
<div
class="col-xl-8 col-lg-9 col-md-9 col-sm-12 col-12">
<!--vendor-details -->
{# get qt max participant #}
{% if product.typeHebergements is not null %}
{% if product.typeHebergements.slugTypeHebergm != 'hotel' %}
{% set nbrParticipants = 0 %}
{% for chambre in product.chambres %}
{% for lit in chambre.typeDeLits.toArray() %}
{% set nbrParticipants = nbrParticipants + lit.place %}
{% endfor %}
{% endfor %}
<input id="participantsMax" type="hidden" name="" value={{ nbrParticipants }}>
{% else %}
<input id="participantsMax" type="hidden" name="participantsMax" min="1" value=1>
{% endif %}
{% endif %}
<div style="overflow: hidden">
<div class="card border card-shadow-none">
<h3 class="card-header bg-white">À propos</h3>
<div class="card-body card-box overflow-hidden">
<!--/.vendor-details -->
<!--vendor-description -->
{% if product.company.isEditorGuide %}
{% if product.productDescription and product.template %}
{{ include('front/html/template/template'~product.template~'.html.twig') }}
{% else %}
<p class="lead">{{ product.text|raw }}</p>
{% endif %}
{% else %}
<p class="lead">{{ product.text|raw }}</p>
{% endif %}
</div>
</div>
<!--vendor-description -->
<!-- Affichage options -->
{% set optiongroups = product.productOptions.toArray %}
{% if optiongroups != [] %}
{% include "front/product/options/option.html.twig" with {'optiongroups' : optiongroups} %}
{% endif %}
<!-- review-block -->
{% for message in app.flashes('success') %}
<div class="alert alert-success">
{{ message }}
</div>
{% endfor %}
<div id="reviews">
<div class="card border card-shadow-none ">
<div class="card-header bg-white">
<h3 class="mb0 d-inline-block" id="global_notes">Notes</h3>
{% if app.user and app.user.roles[0] == 'ROLE_USER' %}
{% set ifAvis = filter_service.getAvisUserExist(app.user, product) %}
{% if ifAvis == false %}
{# A afficher seulement en fin de séjour #}
<a href="#review-form" class="btn btn-default btn-sm float-right d-inline-block">Laissez un avis</a>
{% endif %}
{% endif %}
</div>
<div class="card-body">
<div class="review-block">
<div class="row">
<div
class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12">
<!-- review-sidebar -->
<div class="review-sidebar">
{% if notes['globalNote']['count'] > 0 %}
{% set globalNote = notes['globalNote']['totalNote'] / notes['globalNote']['count'] %}
{% else %}
{% set globalNote = 0 %}
{% endif %}
<div class="review-total">{{ globalNote|number_format(1, '.') }}</div>
<div class="review-text">moyenne des notes</div>
<span class="rated">
{% for i in 1..5 %}
{% if i <= globalNote|round %}
<i class="fa fa-star"></i>
{% else %}
<i class="far fa-star"></i>
{% endif %}
{% endfor %}
</span>
{% if notes['globalNote']['count'] %}
<p>Note de
{{ globalNote|number_format(1, '.') }}
basée sur
{{ notes['globalNote']['count'] }}
note
{% if notes['globalNote']['count'] > 1 %}s
{% endif %}.</p>
{% else %}
<p>Aucune note pour le moment</p>
{% endif %}
</div>
<!-- /.review-sidebar -->
</div>
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12">
<div
class="review-box">
<!-- review-list -->
<div class="review-list">
{% set globalQualityService = notes['qualityService']['count'] ? notes['qualityService']['totalNote'] / notes['qualityService']['count'] : notes['qualityService']['count'] %}
<div class="review-for">Qualité du service</div>
<div class="review-rating">
<span class="rated">
{% for i in 1..5 %}
{% if i <= globalQualityService %}
<i class="fa fa-star"></i>
{% else %}
<i class="far fa-star"></i>
{% endif %}
{% endfor %}
</span>
</div>
<div class="review-number">{{ globalQualityService|number_format(1, '.') }}</div>
</div>
<!-- /.review-list -->
<!-- review-list -->
<div class="review-list">
{% set globalPrice = notes['price']['count'] ? notes['price']['totalNote'] / notes['price']['count'] : notes['price']['count'] %}
<div class="review-for">Prix</div>
<div class="review-rating">
<span class="rated">
{% for i in 1..5 %}
{% if i <= globalPrice %}
<i class="fa fa-star"></i>
{% else %}
<i class="far fa-star"></i>
{% endif %}
{% endfor %}
</span>
</div>
<div class="review-number">{{ globalPrice|number_format(1, '.') }}</div>
</div>
<!-- /.review-list -->
<!-- review-list -->
<div class="review-list">
{% set globalSpeed = notes['speed']['count'] ? notes['speed']['totalNote'] / notes['speed']['count'] : notes['speed']['count'] %}
<div class="review-for">Rapidité</div>
<div class="review-rating">
<span class="rated">
{% for i in 1..5 %}
{% if i <= globalSpeed %}
<i class="fa fa-star"></i>
{% else %}
<i class="far fa-star"></i>
{% endif %}
{% endfor %}
</span>
</div>
<div class="review-number">{{ globalSpeed|number_format(1, '.') }}</div>
</div>
<div class="review-list">
{% set globalConformite = notes['conformDescription']['count'] ? notes['conformDescription']['totalNote'] / notes['conformDescription']['count'] : notes['conformDescription']['count'] %}
<div class="review-for">Description conforme</div>
<div class="review-rating">
<span class="rated">
{% for i in 1..5 %}
{% if i <= globalConformite %}
<i class="fa fa-star"></i>
{% else %}
<i class="far fa-star"></i>
{% endif %}
{% endfor %}
</span>
</div>
<div class="review-number">{{ globalConformite|number_format(1, '.') }}</div>
</div>
<div class="review-list">
{% set globalCommunication = notes['communication']['count'] ? notes['communication']['totalNote'] / notes['communication']['count'] : notes['communication']['count'] %}
<div class="review-for">Communication</div>
<div class="review-rating">
<span class="rated">
{% for i in 1..5 %}
{% if i <= globalCommunication %}
<i class="fa fa-star"></i>
{% else %}
<i class="far fa-star"></i>
{% endif %}
{% endfor %}
</span>
</div>
<div class="review-number">{{ globalCommunication|number_format(1, '.') }}</div>
</div>
<!-- /.review-list -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card border card-shadow-none widget-vendor-list ">
<div class="card-body pl-0 pr-0">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<h3 class="mb20">Avis</h3>
</div>
{# <pre>
{{ dump(productAvis|slice(0, 3)) }}
</pre> #}
{% for key,productAvi in productAvis|slice(0, 3) %}
{% if productAvi.isDesactivatedByAdmin == null and productAvi.isDesactivatedByAdmin == false %}
<div class="card border card-shadow-none ">
<!-- review-user -->
<div class="card-header bg-white mb0">
<div class="review-user">
<div class="user-img">
<img src="{{ asset(constant('App\\Services\\File::IMAGE_CLIENT_DIR') ~ productAvi.client.image) }}" alt="{{ productAvi.client.firstName }}" class="rounded-circle" style="width:50px;height:50px;object-fit:cover"></div>
<div class="user-meta">
<h5 class="user-name mb-0">{{ productAvi.client.firstName }}<span class="user-review-date">{{ productAvi.createdAt|date('d/m/Y') }}</span>
</h5>
<div class="given-review">
<span class="rated">
<i class="fa fa-star"></i>
{% for i in 2..5 %}
{% if i <= productAvi.globalNote|round %}
<i class="fa fa-star"></i>
{% else %}
<i class="far fa-star"></i>
{% endif %}
{% endfor %}
</span>
</div>
</div>
</div>
</div>
<!-- /.review-user -->
<div class="card-body">
<!-- review-descripttions -->
<div class="review-descriptions mb-2" id="cli_{{key}}">
<p>
<i>{{ productAvi.text }}</i>
</p>
<div class="cont_img_comment">
{% for imageComment in productAvi.imageComments.toArray() %}
<img src={{ asset(constant('App\\Services\\File::IMAGE_COMMENT_DIR') ~ imageComment.url) }} class="img_comment">
{% endfor %}
</div>
</div>
{% if productAvi.responseCompany %}
<div class="review-descriptions mb-2" id="prest_{{key}}">
Réponse du prestataire :<br>
<i>{{ productAvi.responseCompany }}</i>
</div>
{% endif %}
<!-- /.review-descripttions -->
</div>
</div>
{% endif %}
{% else %}
<p class="p-3">Aucun avis pour le moment</p>
{% endfor %}
</div>
</div>
{# <div id='calendar'></div> #}
</div>
{% if app.user and app.user.roles[0] == 'ROLE_USER' %}
{% set tab = filter_service.getLocationUse(app.user, product) %}
{% if tab is not null %}
{% if "now"|date("U") > tab.endAt|date("U") %}
{% set ifAvis = filter_service.getAvisUserExist(app.user, product) %}
{% if ifAvis == false %}
<div class="card border card-shadow-none leave-review" id="review-form">
<div class="card-header bg-white mb0">
<h3 class="mb0">Laissez un avis</h3>
</div>
<div class="card-body">
<div class="review-rating-select">
<div class="rate-selection">
<span class="text-dark">Qualité du service</span>
<span id="rateYo1" class="jq-ry-container ml-4" style="width: 70px;">
<div class="jq-ry-group-wrapper">
<div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
<div class="jq-ry-rated-group jq-ry-group" id="rate1" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
</div>
</span>
</div>
<div class="rate-selection">
<span class="text-dark">Fiabilité</span>
<span id="rateYo2" class="jq-ry-container ml-4" style="width: 70px;">
<div class="jq-ry-group-wrapper">
<div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
<div class="jq-ry-rated-group jq-ry-group" id="rate2" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
</div>
</span>
</div>
<div class="rate-selection">
<span class="text-dark">Prix</span>
<span id="rateYo3" class="jq-ry-container ml-4" style="width: 70px;">
<div class="jq-ry-group-wrapper">
<div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
<div class="jq-ry-rated-group jq-ry-group" id="rate3" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
</div>
</span>
</div>
<div class="rate-selection">
<span class="text-dark">Rapidité</span>
<span id="rateYo4" class="jq-ry-container ml-4" style="width: 70px;">
<div class="jq-ry-group-wrapper">
<div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
<div class="jq-ry-rated-group jq-ry-group" id="rate4" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
</div>
</span>
</div>
<div class="rate-selection">
<span class="text-dark">Conforme à la description</span>
<span id="rateYo5" class="jq-ry-container ml-4" style="width: 70px;">
<div class="jq-ry-group-wrapper">
<div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
<div class="jq-ry-rated-group jq-ry-group" id="rate5" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
</div>
</span>
</div>
<div class="rate-selection">
<span class="text-dark">Communication</span>
<span id="rateYo6" class="jq-ry-container ml-4" style="width: 70px;">
<div class="jq-ry-group-wrapper">
<div class="jq-ry-normal-group jq-ry-group"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#d3d3d3" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
<div class="jq-ry-rated-group jq-ry-group" id="rate6" style="width: 72%;"><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg><!--?xml version="1.0" encoding="utf-8"?--><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewbox="0 12.705 512 486.59" x="0px" y="0px" xml:space="preserve" width="14px" height="14px" fill="#ff9227" style="margin-left: 0px;">
<polygon points="256.814,12.705 317.205,198.566 512.631,198.566 354.529,313.435 414.918,499.295 256.814,384.427 98.713,499.295 159.102,313.435 1,198.566 196.426,198.566 "></polygon>
</svg>
</div>
</div>
</span>
</div>
</div>
{{ form_start(formComment) }}
<div class="row">
{# <div style="color:red">{{ form_errors(formComment) }}</div> #}
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 mt30">
{# <div class="form-group">
{{ form_label(form.imageComment, '', {'label_attr': {'class': 'control-label'}}) }}
{{ form_widget(form.imageComment) }}
</div> #}
{# <div class="col-md-12"> #}
{{form_widget(formComment)}}
{# </div> #}
{# <div class="form-group">
{{ form_label(formComment.text, '', {'label_attr': {'class': 'control-label'}}) }}
{{ form_widget(formComment.text, {'attr': {'class': 'form-control', 'rows': 5}}) }}
</div> #}
</div>
<!-- Button -->
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="form-group">
<button id="submit" name="submit" class="btn btn-default">Ajouter mon avis</button>
</div>
</div>
</div>
{# {{ form_rest(formComment) }} #}
{{ form_end(formComment) }}
</div>
</div>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
</div>
<!-- /.review-content -->
</div>
<!-- /.location -->
<!-- list-sidebar -->
<div class="col-xl-4 col-lg-3 col-md-3 col-sm-12 col-12">
<div
class="sidebar-venue">
<!-- FORMULAIRE DU PANIER -->
{% set isService = false %}
{% for productSubCategory in product.subCategories %}
{% if productSubCategory.isService == true %}
{% set isService = true %}
{% endif %}
{% endfor %}
{% if isService != true %}
{% include "front/product/cart/cart_form.html.twig" with {'product' : product} %}
{% endif %}
{% if isService == true %}
<!-- TEST DU TYPE DE SERVICE (location ou réservation) -->
{% set isLocation = false %}
{% for singleCategory in product.subcategories %}
{% if singleCategory.name == "Location de salle" or singleCategory.name == "Location de vehicule" %}
{% set isLocation = true %}
{% endif %}
{% endfor %}
{% if isLocation == true or product.typeLocation is not null %}
<!-- FORMULAIRE DE LOCATION -->
{% include "front/product/location/location_form.html.twig" with {'product' : product} %}
{% endif %}
{% if isLocation == false and product.typeLocation is null %}
<!-- FORMULAIRE DE RESERVATION DE SERVICES -->
{% include "front/product/reservation/reservation_form.html.twig" with {'product' : product} %}
{% endif %}
{% endif %}
{% if product.company.type != "service" %}
<div class="vendor-owner-profile mb30">
<div class="vendor-owner-profile-head">
<h3 class="mb-0">Livraison</h3>
</div>
<div class="vendor-owner-profile-content">
<ul class="list-group list-group-flush">
<li class="list-group-item">
<span class="mr-2">
<i class="fas fa-fw fa-map-marker-alt"></i>
</span>
{% for department in product.departments %}
{{ department.name }}
{% if not loop.last %},
{% endif %}
{% else %}
Toute la France
{% endfor %}
</li>
</ul>
</div>
</div>
{% endif %}
<!-- venue-admin -->
<div class="vendor-owner-profile mb30">
<div class="vendor-owner-profile-head">
<h3 class="mb-4">Prestataire</h3>
</div>
<div class="vendor-owner-profile-content">
<ul class="list-group list-group-flush">
<li class="list-group-item">
<span class="mr-2">
<a href="{{ path('front_company_single', {'companySlug': product.company.companySlug, 'id': product.company.id}) }}" class="btn btn-default btn-sm ml-2 text-center">Voir le prestataire</a>
</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- /.list-sidebar -->
</div>
</div>
<!-- vendor-thumbnail section -->
<div class="space-small">
<div class="container">
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<h2>Autres services du prestataire</h2>
</div>
</div>
<div class="row">
{% for otherProduct in otherProducts %}
{% set subCategorySlug = otherProduct.subCategories.toArray()[0].subCategorySlug %}
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12">
<div class="container-block-Pcompanies mb-3">
<div class="container-imageP zoomimg">
{% if otherProduct.subCategories[0].categories[0] is defined %}
<a href="{{ path('front_product_single', {'slug': otherProduct.subCategories[0].categories[0].slug, 'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 'product_id': otherProduct.id, 'productSlug': otherProduct.productSlug}) }}">
{% if otherProduct.photos is not empty %}
<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ otherProduct.photos.first.url) }}" alt="{{ otherProduct.name }}" class="img-fluid" style="object-fit: cover; border-radius: .5rem .5rem 0 0;">
{% endif %}
</a>
{% endif %}
</div>
<div class="container-info-presta" style="padding-bottom: 80px;">
<h2 class="vendor-title">
{% set subCategory = otherProduct.subCategories.toArray()[0] %}
{% set slug = "" %}
{% if otherProduct.typeActivity is not null %}
{% set slug = otherProduct.typeActivity.slug %}
{% elseif otherProduct.typeHebergements is not null %}
{% set slug = otherProduct.typeHebergements.slugTypeHebergm %}
{% else %}
{% set slug = subCategory.categories.toArray[0].slug %}
{% endif %}
{% if otherProduct.subCategories[0].categories[0] is defined %}
<a href="{{ path('front_product_single', {
'slug': slug,
'subCategorySlug': otherProduct.subCategories[0].subCategorySlug,
'product_id': otherProduct.id,
'productSlug': otherProduct.productSlug})
}}" class="title">{{ otherProduct.name }}</a>
{% endif %}
</h2>
<p class="vendor-address">
{% for department in otherProduct.departments %}
{{ department.name }}
{% if not loop.last %},
{% endif %}
{% else %}
Toute la France
{% endfor %}
</p>
{# <p>
<i class="fas fa-money-bill-wave"></i>
Prix
<strong>{{ otherProduct.price|number_format(2, '.', '') }}</strong>€
</p> #}
<p>
{% if otherProduct.typeHebergements.slugTypeHebergm is defined and otherProduct.typeHebergements.slugTypeHebergm != 'hotel' %}
<i class="fas fa-money-bill-wave"></i>
Prix :
<strong>{{ otherProduct.price|number_format(2, '.') }}</strong>€
{% else %}
{% set lengthRoomNight = 0 %}
{% set statusByNight = false %}
{% set allPriceByNight = 0 %}
{% set lengthRoomDay = 0 %}
{% set statusByDay = false %}
{% set allPriceByDay = 0 %}
{% if otherProduct.chambres is defined %}
{% for roomOption in otherProduct.chambres.toArray %}
{% if roomOption.tarifNuit is defined %}
{% set lengthRoomNight = lengthRoomNight + 1 %}
{% set statusByNight = true %}
{% set allPriceByNight = allPriceByNight + roomOption.tarifNuit %}
{% endif %}
{% if roomOption.tarifJour is not null %}
{% set lengthRoomDay = lengthRoomDay + 1 %}
{% set statusByDay = true %}
{% set allPriceByDay = allPriceByDay + roomOption.tarifJour %}
{% endif %}
{% endfor %}
{% if statusByDay or statusByNight %}
<p>Prix moyen d'une chambre:</p>
{% endif %}
{% if statusByNight %}
<p>
<i class="fas fa-money-bill-wave"></i>
par nuit
<strong>{{ (allPriceByNight / lengthRoomNight)|number_format(2, '.') }}</strong>€
</p>
{% endif %}
{% if statusByDay %}
{# <p>
<i class="fas fa-money-bill-wave"></i>
par jour
<strong>{{ (allPriceByDay / lengthRoomDay)|number_format(2, '.') }}</strong>€
</p> #}
{% endif %}
{% endif %}
{% if not statusByNight and not statusByDay %}
<p>
Prix : <strong>Prix en attente</strong>
</p>
{% endif %}
{# <i class="fas fa-money-bill-wave"></i>
Prix :
<strong>{{ otherProduct.price|number_format(2, '.') }}</strong>€ #}
{% endif %}
</p>
<p>
<i class="fa fa-star rated"></i>
{{ otherProduct.avis|length }} Avis</p>
{% if otherProduct.quantity %}
<p>{{ otherProduct.quantity }}
Quantité restante</p>
{% else %}
<p style="color: transparent;">Quantité restante</p>
{% endif %}
</div>
<div class="wishlist-sign">
<a href="#" class="btn-wishlist">
<i class="fa fa-heart"></i>
</a>
</div>
{% if otherProduct.subCategories[0].categories[0] is defined %}
<a href="{{ path('front_product_single', {
'slug': slug,
'subCategorySlug': otherProduct.subCategories[0].subCategorySlug,
'product_id': otherProduct.id,
'productSlug': otherProduct.productSlug
}) }}" class="title">
<button class="btnVoirP btn">Voir {% if subCategorySlug == "hebergements"%}l'hébergement{% else %}plus{% endif %}
</button>
</a>
{% endif %}
</div>
</div>
{% else %}
<div class="col-md-12 mt-5 text-center">
<p>Aucun autre produit.</p>
</div>
{% endfor %}
</div>
{# <div class="row">
{% for otherProduct in otherProducts %}
<div class="col-xl-4 col-lg-4 col-md-6 col-sm-6 col-12">
<div
class="vendor-thumbnail">
<!-- Vendor thumbnail -->
<div
class="vendor-img zoomimg">
<!-- Vendor img -->
<a href="{{ path('front_product_single', {'slug': otherProduct.subCategories[0].categories[0].slug, 'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 'product_id': otherProduct.id, 'productSlug': otherProduct.productSlug}) }}">
{% if otherProduct.photos is not empty %}
<img src="{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ otherProduct.photos.first.url) }}" alt="{{ otherProduct.name }}" class="img-fluid">
{% endif %}
</a>
<div class="wishlist-sign">
<a href="#" class="btn-wishlist">
<i class="fa fa-heart"></i>
</a>
</div>
</div>
<!-- /.Vendor img -->
<div
class="vendor-content">
<!-- Vendor Content -->
<h2 class="vendor-title">
<a href="{{ path('front_product_single', {'slug': otherProduct.subCategories[0].categories[0].slug, 'subCategorySlug': otherProduct.subCategories[0].subCategorySlug, 'product_id': otherProduct.id, 'productSlug': otherProduct.productSlug}) }}" class="title">{{ otherProduct.name }}</a>
</h2>
<p class="vendor-address">
{% for department in otherProduct.departments %}
{{ department.name }}
{% if not loop.last %},
{% endif %}
{% else %}
Toute la France
{% endfor %}
</p>
</div>
<div class="vendor-meta">
<div class="vendor-meta-item vendor-meta-item-bordered">
<span class="vendor-price">
{{ otherProduct.price|number_format(2, '.', '') }}€
</span>
<span class="vendor-text">Prix</span>
</div>
<div class="vendor-meta-item vendor-meta-item-bordered">
{% if otherProduct.quantity %}
<span class="vendor-guest">
{{ otherProduct.quantity }}
</span>
<span class="vendor-text">Quantité restante</span>
{% endif %}
</div>
{% set notes = 0 %}
{% for avi in otherProduct.avis %}
{% set notes = notes + avi.globalNote %}
{% endfor %}
{% set noteTotal = (notes > 0) ? notes / otherProduct.avis|length : 0 %}
<div class="vendor-meta-item vendor-meta-item-bordered">
<span class="rating-star">
{% for i in 1..5 %}
{% if i < noteTotal %}
<i class="fa fa-star rated"></i>
{% else %}
<i class="fa fa-star rate-mute"></i>
{% endif %}
{% endfor %}
</span>
<span class="rating-count vendor-text">({{ otherProduct.avis|length }})</span>
</div>
</div>
<!-- /.Vendor Content -->
</div>
<!-- /.Vendor thumbnail -->
</div>
{% else %}
<div class="col-md-12 mt-5 text-center">
<p>Aucun autre produit.</p>
</div>
{% endfor %}
</div> #}
</div>
</div>
{# Question #}
<div class="col-sm-12 col-md-5 col-lg-4 col-xl-3 position-fixed" id="chatbar" style="bottom:0;right:50px;z-index: 1000">
<div class="panel panel-primary myradiuss">
{# <div class="d-flex justify-content-between panel-heading p-2" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" id="accordion" style="background:#A066F2;border-radius: 8px 8px 0 0;cursor:pointer">
<span style="color:#fff">
<i class="fas fa-comments"></i>
Une question sur ce
{% if product.company == 'product' %}produit{% else %}service{% endif%}
?</span>
<div class="btn-group pull-right">
<a type="button" class="btn btn-default btn-xs">
<i class="fas fa-chevron-down"></i>
</a>
</div>
</div> #}
<div class="panel-collapse collapse" id="collapseOne" style="border:1px solid #A066F2">
{# <div class="modal-header">
{# <h5 class="modal-title" id="exampleModalLongTitle">Créer un ticket</h5> #}
{# <button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div> #}
<div class="titreSMS"><h3 style="margin-bottom: 0">Discutez avec le prestataire</h3></div>
{{ form_start(formTicket) }}
<span class="collapseMessage" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">X</span>
<div class="modal-body">
{# supprime d'apres le retour 12/08/22
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-6 col-12">
<div class="form-group">
{{ form_row(formTicket.subject) }}
</div>
</div> #}
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="form-group">
{{ form_row(formTicket.messagings) }}
</div>
</div>
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="form-group">
<input class='form-control' name="productID" type="hidden" value={{ product.id }} readonly>
</div>
</div>
</div>
<div class="modal-footer">
{# <button type="button" class="btn btn-secondary" data-dismiss="modal">Fermer</button> #}
<button type="submit" class="btn btn-primary">Envoyer</button>
</div>
{{ form_end(formTicket) }}
{# <div class="p-3" id="messageSuccessContact" style="background:green;color:#fff;display:none">Message envoyé !</div>
{{ form_start(formContact, {'attr': {'id': 'contactFormProduct'}}) }}
<div class="panel-body" style="background:#fff">
<div class="chat">
{{ form_widget(formContact.message, {'attr': {'rows': 12}}) }}
</div>
</div>
<div class="panel-footer">
<div class="input-group">
{{ form_widget(formContact.email) }}
<span class="input-group-btn">
<button type="submit" class="btn btn-warning btn-sm" id="btn-chat">Envoyer</button>
</span>
</div>
</div>
{{ form_end(formContact) }} #}
</div>
</div>
</div>
</div>
{# Modal chat #}
<!-- Button trigger modal -->
{% if app.user %}
<div class="position-fixed" id="MyChat" data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
<i class="fas fa-comments MyIconChat"></i>
</div>
{# <div class="position-fixed" id="MyChat" data-toggle="modal" data-target="#modalChat">
<i class="fas fa-comments MyIconChat"></i>
</a>
</div> #}
{% else %}
<script src="">
function connect(){
window.open("{{ path('connection-test', {'product_id': product.id, 'productSlug': product.productSlug }) }}", "pub", "menubar=no");
}
</script>
<div class="position-fixed" id="MyChat">
{% if product.subCategories[0].categories[0] is defined %}
<a href="{{ path('front_product_single', {'slug': product.subCategories[0].categories[0].slug, 'subCategorySlug': product.subCategories[0].subCategorySlug, 'product_id': product.id, 'productSlug': product.productSlug}) }}" onclick="connect();">
{% endif %}
<a href="{{ path('connection-test', {'product_id': product.id, 'productSlug': product.productSlug }) }}" onclick="connect();" rel="noopener" target="_blank">
<i class="fas fa-comments MyIconChat"></i>
</a>
</div>
{% endif %}
{# Modal chat #}
{% endblock %}
{% block _avis_imageComments_widget %}
<p>Ici, vous pouvez ajouter vos image, sa taille ne doit pas dépasser 400ko !</p>
<div class="form-group">
<button class="btn btn-primary" id="add_image" data-target="#block_{{id}}" type="button">Ajouter une image</button>
</div>
{{form_widget(form)}}
<input type="hidden" id="widgets-counter" value="0">
<input type="hidden" id="conteur-input" value="0">
{% endblock %}
{% block _avis_imageComments_entry_row %}
{{form_widget(form)}}
{% endblock %}
{% block _avis_imageComments_entry_widget %}
<div class="form-group" id="block_{{id}}">
<div class="row">
<div class="col-10 mt-3">
<div class="row">
<div class="col-md-12 image-errors">
{{ form_widget(form.url, {'attr': {'class': 'form-control file-input'}}) }}
{{ form_errors(form.url, {'attr': {'class': 'form-control message'}}) }}
</div>
</div>
</div>
<div class="col-2 mt-3">
<button type="button" data-action="delete" data-target="#block_{{id}}" class="btn btn-danger">X</button>
</div>
</div>
</div>
{% endblock %}
{% block javascript %}
<script src="{{ asset('js/formLocationHebergemtn.js')}}"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/4.2.0/core/locales-all.min.js'></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
<script title="zoom img comment">
{% for key,productAvi in productAvis|slice(0, 3) %}
if ($('.img_comment').length) {
$('#cli_{{key}} .img_comment').magnificPopup({
items: [{% for imageComment in productAvi.imageComments.toArray() %}{
src: "{{ asset(constant('App\\Services\\File::IMAGE_COMMENT_DIR') ~ imageComment.url) }}",
title: 'Photo ' + {{ loop.index }}
},{% endfor %}],
gallery: {
enabled: true
},
type: 'image' // this is a default type
});
}
{% endfor %}
</script>
<script>
if (document.getElementById("profil_user_image")) {
document.getElementById("profil_user_image").addEventListener('change', function() {
var reader = new FileReader();
reader.onload = function (e) {
// get loaded data and render thumbnail.
console.log(e.target)
document.getElementById("image-preview").style.background = `url(${e.target.result})no-repeat center`;
document.getElementById("image-preview").style.backgroundSize = `cover`;
};
// read the image file as a data URL.
reader.readAsDataURL(this.files[0]);
});
}
</script>
{{ parent() }}
{# Script zoom option #}
<script>
let backgroundFlou = document.querySelector('.backgroundTrans');
let exitBtn = document.querySelector('.exitZoomOpt');
//Affiche image clikee
function afficheImgOption(idbtn) {
let img = document.getElementById(idbtn + "img");
//console.log(img);
//img.classList.add('showImgOption');
img.style.display = "block";
backgroundFlou.style.display = "block";
exitBtn.style.display = "block";
}
//Fermer par contoure image
backgroundFlou.addEventListener('click', function () {
let imgZoomOp = document.querySelectorAll(".imgZoomOption");
imgZoomOp.forEach(function(item,index){
imgZoomOp[index].style.display = "none";
})
backgroundFlou.style.display = "none";
exitBtn.style.display = "none";
})
//Fermer par boutton X
exitBtn.addEventListener('click', function () {
let imgZoomOp = document.querySelectorAll(".imgZoomOption");
imgZoomOp.forEach(function(item,index){
imgZoomOp[index].style.display = "none";
})
backgroundFlou.style.display = "none";
exitBtn.style.display = "none";
})
</script>
<script>
var counte = [];
$('#add_image').click(function () {
const index = + $('#widgets-counter').val();
var tab = this.dataset.target;
var valeur = tab + "_" + index;
if (counte.length < 3) {
counte.push(valeur);
const tmpl = $('#avis_imageComments').data('prototype').replace(/__name__/g, index);
$('#avis_imageComments').append(tmpl);
$('#widgets-counter').val(index + 1);
}
handleDeleteButtons();
})
function handleDeleteButtons() {
$('button[data-action="delete"]').click(function (event) {
event.preventDefault();
const target = this.dataset.target;
var num = counte.indexOf(target);
$(target).remove();
if (num != -1) {
counte.splice(num, 1);
}
});
}
function updateCounter() {
const count = + $('#comment_imageComment div.form-group').length;
$('#widgets-counter').val(count);
}
updateCounter();
handleDeleteButtons();
// OnFileValidation();
var previewPicture = function (e) {
// e.files contient un objet FileList
const [picture] = e.files
// "picture" est un objet File
if (picture) {
// On change l'URL de l'image
document.getElementById("img_profil").src = URL.createObjectURL(picture)
}
}
</script>
<script tite="gestion options front" src="{{ asset('js/gestion_option.js') }}">
</script>
<script>
$(document).ready(function () {
$('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
});
});
{# Moins Plus Qty #}
function wcqib_refresh_quantity_increments() {
jQuery("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").each(function (a, b) {
var c = jQuery(b);
c.addClass("buttons_added"),
c.children().first().before('<input type="button" value="-" class="minus" />'),
c.children().last().after('<input type="button" value="+" class="plus" />')
})
}
String.prototype.getDecimals || (String.prototype.getDecimals = function () {
var a = this,
b = ("" + a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
return b ? Math.max(0, (b[1] ? b[1].length : 0) - (b[2] ? + b[2] : 0)) : 0
}),
jQuery(document).ready(function () {
wcqib_refresh_quantity_increments()
}),
jQuery(document).on("updated_wc_div", function () {
wcqib_refresh_quantity_increments()
}),
jQuery(document).on("click", ".plus, .minus", function () {
var a = jQuery(this).closest(".quantity").find(".qty"),
b = parseFloat(a.val()),
c = parseFloat(a.attr("max")),
d = parseFloat(a.attr("min")),
e = a.attr("step");
b && "" !== b && "NaN" !== b || (b = 0),
"" !== c && "NaN" !== c || (c = ""),
"" !== d && "NaN" !== d || (d = 0),
"any" !== e && "" !== e && void 0 !== e && "NaN" !== parseFloat(e) || (e = 1),
jQuery(this).is(".plus") ? c && b >= c ? a.val(c) : a.val((b + parseFloat(e)).toFixed(e.getDecimals())) : d && b <= d ? a.val(d) : b > 0 && a.val((b - parseFloat(e)).toFixed(e.getDecimals())),
a.trigger("change")
});
{# Moins Plus Qty #}
if ($('#open-popup-images').length) {
$('#open-popup-images').magnificPopup({
items: [{% for photo in product.photos %}{
src: "{{ asset(constant('App\\Services\\File::IMAGE_PRODUCT_DIR') ~ photo.url) }}",
title: 'Photo ' + {{ loop.index }}
},{% endfor %}],
gallery: {
enabled: true
},
type: 'image' // this is a default type
});
}
</script>
<script>
{# window.addEventListener('load', (event) => {
localStorage.clear();
}); #}
{# Call option article #}
function modiffOption(id_option,url) {
console.log('zaaa',url);
fetch(`${url}/option/${id_option}`)
.then(response=> response.json())
.then(data=>{
$(".nice-select").attr("style", "display: none !important");
$("#id_optionmodal").val(id_option);
$("#name_optionmodal").val(data.options.name);
$("#image_optionmodal").val(data.options.image1);
var imageopt=`<img id="optionbtn1img" src="/upload/produits/${data.options.image1}">`;
$("#optionsimage").html(imageopt);
console.log('image',imageopt);
console.log('subcates',data.options);
console.log('olor',data.options.colorsOption);
if ( typeof data.options.colorsOption != "undefined" && data.options.colorsOption != null && data.options.colorsOption.length != null && data.options.colorsOption.length > 0) {
var colorso ="";
for (let i = 0; i < data.options.colorsOption.length; i++) {
colorso +='<option>'+ data.options.colorsOption[i]+'</option>'
}
$("#optionscolor").html(colorso);
$(".optionscolor").attr("style", "display: block !important");
$("#optionscolor").attr("style", "display: block !important");
}else{
$(".optionscolor").attr("style", "display: none !important");
}
if (typeof data.options.format != "undefined" && data.options.format != null && data.options.format.length != null && data.options.format.length > 0) {
var formatopt ="";
for (let i = 0; i < data.options.format.length; i++) {
formatopt +='<option>'+data.options.format[i]+'</option>'
}
$("#optionsform").html(formatopt);
$(".optionsform").attr("style", "display: block !important");
$("#optionsform").attr("style", "display: block !important");
}
else{
$(".optionsform").attr("style", "display: none !important");
}
if (typeof data.options.finition != "undefined" && data.options.finition != null && data.options.finition.length != null && data.options.finition.length > 0) {
var finitions ="";
for (let i = 0; i < data.options.finition.length; i++) {
finitions +='<option>'+data.options.finition[i]+'</option>'
}
$("#optionsfinition").html(finitions);
$(".optionsfinition").attr("style", "display: block !important");
$("#optionsfinition").attr("style", "display: block !important");
}
else{
$(".optionsfinition").attr("style", "display: none !important");
}
if (typeof data.options.papier != "undefined" && data.options.papier != null && data.options.papier.length != null && data.options.papier.length > 0) {
var papiers ="";
for (let i = 0; i < data.options.papier.length; i++) {
papiers +='<option>'+data.options.papier[i]+'</option>'
}
$("#optionspapier").html(papiers);
$(".optionspapier").attr("style", "display: block !important");
$("#optionspapier").attr("style", "display: block !important");
}
else{
$(".optionspapier").attr("style", "display: none !important");
}
if (typeof data.options.quantite != "undefined" && data.options.quantite != null && data.options.quantite.length != null && data.options.quantite.length > 0) {
var quantites ="";
for (let i = 0; i < data.options.quantite.length; i++) {
quantites +='<option>'+data.options.quantite[i]+'</option>'
}
$("#optionsquantite").html(quantites);
$(".optionsquantite").attr("style", "display: block !important");
$("#optionsquantite").attr("style", "display: block !important");
}
else{
$(".optionsquantite").attr("style", "display: none !important");
}
if (typeof data.options.etiquette != "undefined" && data.options.etiquette != null && data.options.etiquette.length != null && data.options.etiquette.length > 0) {
var etiquettes ="";
for (let i = 0; i < data.options.etiquette.length; i++) {
etiquettes +='<option>'+data.options.etiquette[i]+'</option>'
}
$("#optionsetiquette").html(etiquettes);
$(".optionsetiquette").attr("style", "display: block !important");
$("#optionsetiquette").attr("style", "display: block !important");
}
else{
$(".optionsetiquette").attr("style", "display: none !important");
}
if (typeof data.options.ruban != "undefined" && data.options.ruban != null && data.options.ruban.length != null && data.options.ruban.length > 0) {
var rubans ="";
for (let i = 0; i < data.options.ruban.length; i++) {
rubans +='<option>'+data.options.ruban[i]+'</option>'
}
$("#optionsruban").html(rubans);
$(".optionsruban").attr("style", "display: block !important");
$("#optionsruban").attr("style", "display: block !important");
}
else{
$(".optionsruban").attr("style", "display: none !important");
}
$("#modalOption").modal("show");
});
}
// function envoiGroupOption(params) {
// console.log("io fa tonga");
// var valeuroptions = localStorage.getItem('produit_option');
// $("#storageGroupsOption").val(valeuroptions);
// }
// valide modal option article only
function validemodaloption() {
//$("#optionscolor").val();
$("#modalOption").modal("hide");
console.log($("#optionscolor").val(),$("#id_optionmodal").val());
const data = {
idoption: $("#id_optionmodal").val(),
nomoption: $("#name_optionmodal").val(),
imageoption: $("#image_optionmodal").val(),
color: $("#optionscolor").val(),
form: $("#optionsform").val(),
finition: $("#optionsfinition").val(),
papier: $("#optionspapier").val(),
quantite: $("#optionsquantite").val(),
etiquette: $("#optionsetiquette").val(),
ruban: $("#optionsruban").val(),
};
// let datas = new FormData();
// return datas.append("data", JSON.stringify(data));
localStorage.setItem($("#id_optionmodal").val(), JSON.stringify(data));
// if chambre
if(document.querySelectorAll('.buttonAdd')) {
const buttons = document.querySelectorAll('.buttonAdd');
const labells = new Array()
buttons.forEach(function(button){
const idRoom = button.querySelector('input[type="checkbox"]:checked')
if(idRoom){
idRoom.value = idRoom.id.split('_')[1]
labells.push(idRoom.value)
}
})
// put array labells in localStorage
localStorage.setItem('room_option', JSON.stringify(labells));
}
}
// Fonction afiches toute reduction
function voirtouteReduction(id_product,url){
$("#modalReduction").modal("hide");
}
// Fonction afiches toute caracteristique hebergement
function voirtouteReduction(id_product, url) {
$("#modalReduction").modal("hide");
}
// Fonction afiches tous option (onfly for service)
function voirtoutOption(id_product,url) {
console.log('kokokoko',url);
console.log('isID',id_product);
// var id_product=314;
$("#valeurOpion").html("");
fetch(`${url}/tous-options-product/${id_product}`)
.then(response=> response.json())
.then(data=>{ // return front/product/cart/optionHtml/row.html.twig
$("#valeurOpion").append(data);
});
// Vérifier si les données sur les chambres sont stockées dans le localStorage
console.log("veridier si les données sont stockées dans le localStorage")
if (localStorage.getItem('room_option')) {
// Récupérer les données sous forme d'Array
const labells = JSON.parse(localStorage.getItem('room_option'));
console.log("labells",labells)
// Pour chaque valeur de l'Array, cocher la case correspondante
labells.forEach(function(idRoom){
const checkbox = document.querySelector('#roomButton_' + idRoom);
if (checkbox) {
checkbox.checked = true;
}
});
}
if (localStorage.getItem('produit_option')) {
// Récupérer les données sous forme d'Array
const labells = JSON.parse(localStorage.getItem('produit_option'));
console.log("labells",labells)
// Pour chaque valeur de l'Array, cocher la case correspondante
labells.forEach(function(idRoom){
const checkbox = document.querySelector('#roomButton_' + idRoom);
if (checkbox) {
checkbox.checked = true;
}
});
}
}
{# Save infos group d'option and chambre in localstorage and update prix total #}
function validemodalgroupe(modalToHide) {
// Hide modal depend of options
if (modalToHide == "chambre") {
$("#modalOptionChambre").modal("hide");
} else {
$("#modalOptionGP").modal("hide");
}
// If group option exist on the page
if(document.getElementsByClassName('goption')) {
var goption= document.getElementsByClassName('goption');
var labels =new Array();
var totalPriceOption = 0;
for (let i = 0; i < goption.length; i++) {
var id_goption = goption[i].id.split("_");
var label= document.getElementsByClassName('label_'+id_goption[1]);
var hidden= document.getElementsByClassName('hidden_'+id_goption[1]);
var qte= document.getElementsByClassName('qte_'+id_goption[1]);
// console.log('labeb',label);
var compter=0;
var lab =new Array();
var qt =new Array();
for (let l = 0; l < label.length; l++) {
console.log('type', label[l].type);
if ((label[l].type=="checkbox" && label[l].checked) ||
(label[l].type == "radio" && label[l].checked)) {
lab[compter] = hidden[l].value;
qt[compter] = qte[l].value;
// Extract the price from hidden[l].value
let priceString = hidden[l].value.split("#_#")[1];
let price = parseFloat(priceString);
// Multiply by the corresponding quantity and add to the total price
totalPriceOption += price * parseFloat(qte[l].value);
compter++
}
}
labels[i] = {idoption: id_goption[1], labelo: lab, qte: qt};
}
console.log('valin label',labels);
localStorage.setItem('produit_option', JSON.stringify(labels));
// update prix total in front
calculerPrixTotal(totalPriceOption);
}
// If option chambre
if(document.querySelectorAll('.buttonAdd')) {
let totalPriceRoom = 0;
let totalPlaceParticipant = 0;
const buttons = document.querySelectorAll('.buttonAdd');
const labells = new Array()
buttons.forEach(function(button){
const idRoom = button.querySelector('input[type="checkbox"]:checked')
if(idRoom){
idRoom.value = idRoom.id.split('_')[1]
labells.push(idRoom.value)
if (document.getElementById(`priceRoom_${idRoom.value}`)) {
totalPriceRoom += parseFloat(document.getElementById(`priceRoom_${idRoom.value}`).value);
}
if(document.getElementById(`roomParticipant_${idRoom.value}`)){ // if it's an hotel
totalPlaceParticipant += parseInt(document.getElementById(`roomParticipant_${idRoom.value}`).value);
}
}
})
// put array labells in localStorage
localStorage.setItem('room_option', JSON.stringify(labells));
console.log('localstorage',localStorage.getItem('room_option'));
if(totalPlaceParticipant > 0){
document.getElementById("participantsMax").value = totalPlaceParticipant;
validationQtParticipant();
}
if (totalPriceRoom > 0) { // if totalPriceRoom positif -> it's an hotel
document.getElementById("totalPriceHidden").value = totalPriceRoom;
calculerPrixTotal(); // Actualisez le prix total apres avoir choisir des chambres
}
}
}
// Ajouter au panier (only for article)
document.addEventListener('DOMContentLoaded', function () {
if (!document.getElementById('form_add_bascket')) {
return;
}
var form = document.getElementById('form_add_bascket');
// var url = window.location.href.split('/');
// var param_url = url[0]+'//'+url[2];
// var checkOpt = document.querySelectorAll('.option-product');
// var dataOptios = [];
// for (var i = 0; i < checkOpt.length; i++) {
// checkOpt[i].addEventListener('change', (option) => {
// // console.log('pppp',this);
// var idop = option.target.getAttribute('data-id');
// // console.log("izzz",param_url, idop);
// fetch(`${param_url}/option/${idop}`)
// .then(response=> response.json())
// .then(data=>{
// console.log('qqqqqq',data.options);
// console.log('nn',option.target.checked);
// if (option.target.checked) {
// var dataOption={
// idoption: data.options.id ? data.options.id : null,
// nomoption: data.options.name ? data.options.name : null,
// imageoption: data.options.image1 ? data.options.image1 : null,
// color: data.options.colorsOption[0] ? data.options.colorsOption[0] : null,
// form: data.options.format[0] ? data.options.format[0] : null,
// finition: data.options.finition[0] ? data.options.finition[0] : null,
// papier: data.options.papier[0] ? data.options.papier[0] : null,
// quantite: data.options.quantite[0] ? data.options.quantite[0] : null,
// etiquette: data.options.etiquette[0] ? data.options.etiquette[0] : null,
// ruban: data.options.ruban[0] ? data.options.ruban[0] : null ,
// }
// dataOptios.push(dataOption);
// }else{
// console.log('miala checked');
// console.log('donnée',dataOptios);
// for (let g = 0; g < dataOptios.length; g++) {
// if (dataOptios[g].idoption == idop) {
// console.log('données_hita',dataOptios[g].idoption);
// }
// }
// }
// });
// })
// }
form.addEventListener('submit', (e) => {
e.preventDefault();
let form = e.target;
const formData = new FormData(form);
// for (let h = 0; h < dataOptios.length; h++) {
// // formData.append("OpId_"+j, values[j]);
// // console.log("valuo",values[j]);
// console.log('tonga_aty',dataOptios[h]);
// }
var valeuroptions=localStorage.getItem('produit_option');
localStorage.removeItem('produit_option');
console.log("localstor", valeuroptions);
formData.append("groupOption", valeuroptions);
// var table=[];
// for (let o = 0; o < valeuroptions.length; o++) {
// table[]= valeuroptions[o];
// }
// console.log('valertab', table);
if (Object.keys(localStorage).length != 0) {
var values = [];
keys = Object.keys(localStorage);
i = keys.length;
while ( i-- ) {
values.push( localStorage.getItem(keys[i]) );
localStorage.removeItem(keys[i]);
}
formData.append("tail",values.length);
for (let j = 0; j < values.length; j++) {
formData.append("OpId_"+j, values[j]);
console.log("valuo",values[j]);
}
}
fetch(form.action, {
method: form.method,
body: formData
}).then(response => response.json())
.then(data => {
if (data.message === 'ok') {
if (data.response === 'added') {
const btnAdd = document.getElementById('btn_add');
btnAdd.classList.replace('btn-primary', 'btn-danger');
btnAdd.textContent = 'Supprimer du panier';
const msgElt = document.getElementById('message_form');
msgElt.classList.replace('text-danger', 'text-success');
msgElt.classList.add('text-center');
msgElt.textContent = 'Produit ajouté au panier !';
let nbProducts = parseInt(document.getElementById('nb_basket').innerHTML);
nbProducts++;
document.getElementById('nb_basket').textContent = nbProducts;
} else if (data.response === 'removed') {
const btnAdd = document.getElementById('btn_add');
btnAdd.classList.replace('btn-danger', 'btn-primary');
btnAdd.textContent = 'Ajouter au panier';
const msgElt = document.getElementById('message_form');
msgElt.classList.replace('text-danger', 'text-success');
msgElt.classList.add('text-center');
msgElt.textContent = 'Produit supprimé du panier !';
let nbProducts = parseInt(document.getElementById('nb_basket').innerHTML);
nbProducts--;
document.getElementById('nb_basket').textContent = nbProducts;
} else if (data.response === 'error') {
const msgElt = document.getElementById('message_form');
msgElt.textContent = data.response;
}
} else if (data.message === 'error') {
if (data.response === 'Quantité non disponible'){
const msgElt = document.getElementById('message_form');
msgElt.classList.replace('text-success', 'text-danger');
msgElt.classList.add('text-center');
msgElt.textContent = 'Quantité pas disponible';
return;
}
if (data.response === 'Quantité option non disponible') {
const msgElt = document.getElementById('message_form');
msgElt.classList.replace('text-success', 'text-danger');
msgElt.classList.add('text-center');
msgElt.textContent = 'Il y a une quantité d\'option pas disponible';
return;
}
}
});
return false;
})
const btnWish = document.getElementById('btn_add_wish');
if (btnWish) {
btnWish.addEventListener('click', () => {
fetch("{{ path('front_add_wish', {'id': product.id}) }}", { method: "POST" }).then(response => response.json()).then(data => {
if (data.message === 'ok') {
if (data.response === 'added') {
btnWish.style.color = '#fff';
btnWish.style.backgroundColor = '#ff4d4d';
document.getElementById('text_btn').textContent = "Supprimer";
} else if (data.response === 'removed') {
btnWish.style.color = '#ff4d4d';
btnWish.style.backgroundColor = '#fff';
document.getElementById('text_btn').textContent = "Ajouter";
}
}
});
})
}
})
</script>
<script>
const formContact = document.getElementById('contactFormProduct');
if (formContact) {
formContact.addEventListener('submit', (e) => {
e.preventDefault();
let form = e.target;
const formData = new FormData(form);
fetch(form.action, {
method: form.method,
body: formData
}).then(response => response.json()).then(data => {
if (data.status === 'ok') {
document.getElementById('messageSuccessContact').style.display = 'block';
formContact.reset();
}
});
return false;
})
}
</script>
<script src="{{ asset('js/jquery.rateyo.min.js') }}"></script>
<script>
$(function () {
$("#rateYo1, #rateYo2, #rateYo3, #rateYo4, #rateYo5, #rateYo6 ").rateYo({rating: 3.6});
});
$("#rateYo1").rateYo().on("rateyo.change", function (e, data) {
var $rateYo = $("#rateYo1").rateYo("rating");
$('#avis_serviceQuality').val($rateYo);
});
$("#rateYo2").rateYo().on("rateyo.change", function (e, data) {
var $rateYo = $("#rateYo2").rateYo("rating");
$('#avis_fiability').val($rateYo);
});
$("#rateYo3").rateYo().on("rateyo.change", function (e, data) {
var $rateYo = $("#rateYo3").rateYo("rating");
$('#avis_price').val($rateYo);
});
$("#rateYo4").rateYo().on("rateyo.change", function (e, data) {
var $rateYo = $("#rateYo4").rateYo("rating");
$('#avis_speed').val($rateYo);
});
$("#rateYo5").rateYo().on("rateyo.change", function (e, data) {
var $rateYo = $("#rateYo5").rateYo("rating");
$('#avis_conformDescription').val($rateYo);
});
$("#rateYo6").rateYo().on("rateyo.change", function (e, data) {
var $rateYo = $("#rateYo6").rateYo("rating");
$('#avis_communication').val($rateYo);
});
</script>
{% set isService = false %}
{% for productSubCategory in product.subCategories %}
{% if productSubCategory.isService == true %}
{% set isService = true %}
{% endif %}
{% endfor %}
{% if isService == true %}
<!-- LOCATIONS -->
{% set isLocation = false %}
{% for singleCategory in product.subcategories %}
{% if singleCategory.name == "Location de salle" or singleCategory.name == "Location de vehicule" %}
{% set isLocation = true %}
{% endif %}
{% endfor %}
{% if isLocation is defined %}
<!-- LOCATIONS -->
{% if isLocation == true or product.typeLocation is not null %}
{% set locations = [] %}
{% for location in product.locations %}
{#% if annonce.categorie.libelle != 'SERVICES' %#}
{#% Si la location est en attente ou si la location est acceptée, elle est ajoutée au tableau locations %#}
{% if location.isAccepted is same as(null) or location.isAccepted is same as(true) and location.isLannul != 1 %}
{% set locations = locations|merge([{debut: location.startAt, fin: location.endAt, typeLocation: location.product.typeLocation ? location.product.typeLocation.label : "" }]) %}
{% endif %}
{#% else %}
{% set locations = locations|merge([{debut: location.dateDebut|date("d/m/Y H:i"), fin: location.dateFin|date("d/m/Y H:i"), statut: location.statutLocation.id }]) %}
{% endif %#}
{% endfor %}
{% set planningCompanies = [] %}
{% for planningCompanie in product.company.planningCompanies %}
{% if planningCompanie is defined %}
{% set planningCompanies = planningCompanies|merge([{debut: planningCompanie.start, fin: planningCompanie.end }]) %}
{% endif %}
{% endfor %}
<script>
const checkOptLocation = document.querySelectorAll('.cheklocationclass');
for (var i = 0; i < checkOptLocation.length; i++) {
checkOptLocation[i].addEventListener('change', (option) => {
if (option.target.checked) {
const priceOptionre = option.target.getAttribute('data-price');
console.log('yyyaaa',$("#totalPricese").html());
var total= parseFloat($("#totalPricese").html()) + parseFloat(priceOptionre);
$("#totalPricese").html(total);
}else{
const priceOptionre = option.target.getAttribute('data-price');
var total= parseFloat($("#totalPricese").html()) - parseFloat(priceOptionre);
$("#totalPricese").html(total);
}
})
}
</script>
<script>
let locations = {{ locations|json_encode|raw }};
let planningCompanies = {{ planningCompanies|json_encode|raw }};
</script>
{% if product.typeLocation %}
{% if product.typeLocation.label == 'heure' %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.8.1/baguetteBox.min.js"></script>
<script src="{{asset('/js/jquery.datetimepicker.full.js')}}"></script>
<script src="{{ asset('/js/calendrierLocationHeure.js') }}"></script>
{% else %}
<script src="{{ asset('/js/calendrierJours.js') }}"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
{% endif %}
{% else %}
<script src="{{ asset('/js/calendrierJours.js') }}"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
{% endif %}
{% endif %}
<!-- RESERVATIONS -->
{% if isLocation is same as(false) and product.typeLocation is null %}
{% set reservationsList = [] %}
{% for reservation in product.reservations %}
{% if reservation.isAccepted is same as(null) or reservation.isAccepted is same as(true)%}
{% set reservationsList = reservationsList|merge([{date_livraison: reservation.reservationPlannedAt}]) %}
{% endif %}
{% endfor %}
{# <script>
const checkOptResevatio = document.querySelectorAll('.chekboxclass');
// console.log('ffafffa', checkOptResevatio);
for (var i = 0; i < checkOptResevatio.length; i++) {
checkOptResevatio[i].addEventListener('change', (option) => {
console.log('vvvvvvv', option.target.checked, parseFloat($("#totalPricere").html()));
if (option.target.checked) {
const priceOptionre = option.target.getAttribute('data-price');
var total= parseFloat($("#totalPricere").html()) + parseFloat(priceOptionre);
$("#totalPricere").html(total);
}else{
const priceOptionre = option.target.getAttribute('data-price');
var total= parseFloat($("#totalPricere").html()) - parseFloat(priceOptionre);
$("#totalPricere").html(total);
}
})
}
</script> #}
<script>
let reservationsList = {{ reservationsList|json_encode|raw }};
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.8.1/baguetteBox.min.js"></script>
<script src="{{asset('/js/jquery.datetimepicker.full.js')}}"></script>
<script src="{{ asset('/js/calendrierReservation.js') }}"></script>
{% endif %}
{% endif %}
{% endif %}
{% endblock %}