src/Flexy/FrontBundle/templates/products/singleProduct.html.twig line 1

Open in your IDE?
  1. {% extends "@Flexy/FrontBundle/templates/layout.html.twig"  %}
  2. {% block body %}
  3.  <div class="body-wrapper">
  4.             <!-- Begin Header Area -->
  5.             <!-- Header Area End Here -->
  6.             <!-- Begin Li's Breadcrumb Area -->
  7.             <div class="breadcrumb-area menu-item">
  8.                 <div class="container simple-container">
  9.                     <div class="breadcrumb-content">
  10.                         <ul>
  11.                             <li><a href="{{path('front_home')}}">Accueil</a></li>
  12.                             {% for category in singleProduct.categoriesProduct %}
  13.                             <li ><a href="{{path('single_category_product',{id:category.id})}}">{{category}}</a></li>
  14.                             {% endfor %}
  15.                             <li class="active">{{singleProduct.name}}</li>
  16.                             
  17.                         </ul>
  18.                     </div>
  19.                 </div>
  20.             </div>
  21.             <!-- Li's Breadcrumb Area End Here -->
  22.             <!-- content-wraper start -->
  23.             <div class="content-wraper">
  24.                 <div class="container">
  25.                     <div class="row single-product-area">
  26.                         <div class="col-lg-5 col-md-5">
  27.                            <!-- Details de produit Left -->
  28.                             <div class="product-details-left sp-tab-style-left-page">
  29.                                 <div class="product-details-images slider-navigation-1">
  30.                                     <div class="lg-image menu-item">
  31.                                         <a class="popup-img venobox vbox-item" href="/uploads/{{asset(singleProduct.image)}}" data-gall="myGallery">
  32.                                             <img  src="/uploads/{{asset(singleProduct.image)}}" alt="{{singleProduct.name}}">
  33.                                         </a>
  34.                                     </div>
  35.                                     {% for image in singleProduct.images %}
  36.                                     <div class="lg-image  menu-item">
  37.                                         <a class="popup-img venobox vbox-item" href="/uploads/images/products{{asset(image.path)}}" data-gall="myGallery">
  38.                                             <img  src="/uploads/images/products{{asset(image.path)}}" alt="{{image.alt}}">
  39.                                         </a>
  40.                                     </div>
  41.                                     {% endfor %}
  42.                                     
  43.                                 </div>
  44.                                 <div class="tab-style-left">
  45.                                     <div class="sm-image"><img  src="/uploads/{{asset(singleProduct.image)}}" alt="{{singleProduct.name}}"></div>
  46.                                     {% for image in singleProduct.images %}
  47.                                         <div class="sm-image"><img  src="/uploads/images/products{{asset(image.path)}}" alt="{{image.alt}}"></div>
  48.                                     {% endfor %}
  49.                                 
  50.                                 </div>
  51.                             </div>
  52.                             <!--// Details de produit Left -->
  53.                         </div>
  54.                         <div class="col-lg-4 col-md-5">
  55.                             <div class="product-details-view-content pt-60">
  56.                                 <div class="product-info">
  57.                                     
  58.                                     <h2>{{singleProduct.name}}</h2>
  59.                                     <p class="sell-by">
  60.                                     
  61.                                     {% if singleProduct.brand %} Marque: <a href="#">{{singleProduct.brand}}</a>{% endif %}  {% if singleProduct.vendor %} / <a href="#"> Par {{singleProduct.vendor}} </a>{% endif %}</span>
  62.                                     
  63.                                     
  64.                                     
  65.                                     </p>
  66.                                     {% if singleProduct.skuCode %}
  67.                                     <span class="product-details-ref d-none">Reference: {{singleProduct.skuCode}}</span>
  68.                                     {% endif %}
  69.                                    
  70.                                     <div class="price-box pt-20">
  71.                                         <span class="new-price new-price-2">MAD {{singleProduct.formattedPrice}}</span>
  72.                                         {% if singleProduct.oldPrice or singleProduct.oldPrice > 0 %}
  73.                                         <span class="old-price">MAD {{singleProduct.oldPrice / 100}}</span>
  74.                                         {% endif %}
  75.                                     </div>
  76.                                     <div class="product-desc">
  77.                                         <p>
  78.                                             <span>
  79.                                             {{singleProduct.shortDescription|raw}}
  80.                                             </span>
  81.                                         </p>
  82.                                     </div>
  83.                                      <div class="rating-box pt-20">
  84.                                      <h5>Rating : {{singleProduct.rating|number_format(1, '.', ',')}}/5</h5>
  85.                                       
  86.                                             
  87.                                         <ul class="rating rating-with-review-item">
  88.                                              {% if singleProduct.rating > 0 %}
  89.                                            {% for stars in 1..singleProduct.rating|number_format %}
  90.                                              <li><i class="fa fa-star"></i></li>
  91.                                                 
  92.                                             {% endfor %}
  93.                                               {% if singleProduct.rating|number_format < 5 %}
  94.                                                 {% for stars in singleProduct.rating|number_format..4 %}
  95.                                                     <li class="no-star"><i class="fa fa-star"></i></li>
  96.                                                 {% endfor %}
  97.                                             {% endif %}
  98.                                                {% else %}
  99.                                         <li class="no-star"><i class="fa fa-star"></i></li>
  100.                                         <li class="no-star"><i class="fa fa-star"></i></li>
  101.                                          <li class="no-star"><i class="fa fa-star"></i></li>
  102.                                          <li class="no-star"><i class="fa fa-star"></i></li>
  103.                                                   {% endif %}
  104.                                                             
  105.                                    
  106.                                  
  107.                                             
  108.                                            
  109.                                 
  110.                                             <li class="menu-item" ><a href="#reviews" id="showcomments">   Avis ({{ singleProduct.comments|length }}) <i class="fa fa-comments" ></i> </a></li>
  111.                                 
  112.                                         </ul>
  113.                                     </div>
  114.                                     <div class="product-variants p-3">
  115.                                         <div class="produt-variants-size">
  116.                                            {% if singleProduct.attributValues|length > 0 %}
  117.                                                
  118.                                             <select class="nice-select">
  119.                                            {% for attribut in singleProduct.attributValues %}
  120.                                                <option value="{{attribut.id}}" title="S">{{attribut}}</option>
  121.                                             
  122.                                           {% endfor %}
  123.                                           </select>
  124.                                             {% endif %}
  125.                                         </div>
  126.                                     </div>
  127.                                     <div class="single-add-to-cart">
  128.                                         <form action="#" class="cart-quantity">
  129.                                             <div class="quantity">
  130.                                                 <label>Quantité</label>
  131.                                                 <div class="cart-plus-minus">
  132.                                                     <input class="cart-plus-minus-box" value="1" type="text">
  133.                                                     <div class="dec qtybutton"><i class="fa fa-angle-down"></i></div>
  134.                                                     <div class="inc qtybutton"><i class="fa fa-angle-up"></i></div>
  135.                                                 </div>
  136.                                             </div>
  137.                                             <button data-vendor="{{singleProduct.vendor.id}}" data-id="{{singleProduct.id}}"  data-name="{{singleProduct.name}}" data-image="uploads/{{asset(singleProduct.image)}}" data-price="{{singleProduct.formattedPrice}}"  data-url="{{path('single_product',{id:singleProduct.id}) }}"  class="add-cart add-to-cart active add-product-to-cart" >Ajouter au panier</button>
  138.                                         </form>
  139.                                     </div>
  140.                                     <div class="menu-item product-additional-info pt-25">
  141.                                         <div class="product-social-sharing pt-25">
  142.                                             <ul>
  143.                                                 <li class="facebook"><a href="#"><i class="fa fa-facebook"></i>Facebook</a></li>
  144.                                                 <li class="twitter"><a href="#"><i class="fa fa-twitter"></i>Twitter</a></li>
  145.                                                 <li class="google-plus"><a href="#"><i class="fa fa-google-plus"></i>Google +</a></li>
  146.                                                 <li class="instagram"><a href="#"><i class="fa fa-instagram"></i>Instagram</a></li>
  147.                                             </ul>
  148.                                         </div>
  149.                                     </div>
  150.                                     
  151.                                 </div>
  152.                             </div>
  153.                         </div> 
  154.                         <div class="col-lg-3 col-md-3 ">
  155.                                                             <div class="block-reassurance ">
  156.                                             <div class="row " > 
  157.                                             {% if singleProduct.vendor %}
  158.                                                 <div class="col-12 p-3 " >
  159.                                                         <div class="card actions p-3">
  160.                                                             <h5>Vendeur : <span class="badge badge-warning" >{{singleProduct.vendor}}</span></h5>
  161.                                                                 <div>
  162.                                                                     <p>
  163.                                                                     <small>
  164.                                                                     100% Evaluation du vendeur<br>
  165.                                                                     67 abonnés <br>
  166.                                                                     </small>
  167.                                                                     <h6>Performance vendeur</h6>
  168.                                                                     <p>
  169.                                                                     <span class="badge badge-success text-white" ><i class="fa fa-star" ></i></span> Expeditions : <span class="badge badge-success text-white" >Excellent</span>
  170.                                                                     <br>
  171.                                                                     <span class="badge badge-success text-white" ><i class="fa fa-star" ></i></span> Qualité : <span class="badge badge-warning text-white" >Moyen</span>
  172.                                                                     <br>
  173.                                                                     <span class="badge badge-success text-white" ><i class="fa fa-star" ></i></span> Avis consommateurs : <span class="badge badge-warning text-white" >Moyen</span>
  174.                                                                     
  175.                                                                     </p>
  176.                                                                     </p>
  177.                                                                 </div>
  178.                                                    
  179.                                                          </div>
  180.                                                 </div>
  181.                                                 {% endif %}
  182.                                                     <div class="col-12" >
  183.                                                         <section class="card p-3  -mbs -fs12">
  184.    <h6 class="-fs14 -m -upp -pas">Livraison &amp; Retours</h6>
  185.    <div class="-hr">
  186.       <article class="-pvxs -hr _bet ">
  187.          <h6 class="-ptxs -fs16 -m -phs">Choisissez le lieu</h6>
  188.          <div class="-fw -pas  mb-2">
  189.             <div class="-pvs mb-1">
  190.                <select required="" class="sel _ol" id="fi-regionId" name="city" aria-label="Région">
  191.                  {% for singleCity in cities %}
  192.                     <option value="{{singleCity.id}}" >{{singleCity.name}}</option>
  193.                  {% endfor %}
  194.                </select>
  195.             </div>
  196.             <div class="-pbxs">
  197.                <select required="" class="sel _ol" id="fi-cityId" name="departement" aria-label="Ville">
  198.                     {% for singleDepartement in departements %}
  199.                     <option value="{{singleDepartement.id}}" >{{singleDepartement.name}}</option>
  200.                  {% endfor %}
  201.                </select>
  202.             </div>
  203.          </div>
  204.          <section class="-pr" data-delivery-info="">
  205.             <div data-info-block="">
  206.                <article class="-df -pvxs -phs">
  207.                  
  208.                   <div class="-df -fw-w -c-bet -fg1 mb-2">
  209.                      <div class="-df -fw">
  210.                         <h6 class="-fs14 -m -prs">Livraison à domicile</h6>
  211.                         
  212.                      </div>
  213.                      <div>
  214.                         <div class="markup -ptxs">Livraison <em>15.10 Dhs</em></div>
  215.                         <div class="markup -ptxs">Livraison le <em>16 février</em> si vous commandez d'ici <em>14hrs 42mins</em></div>
  216.                      </div>
  217.                   </div>
  218.                </article>
  219.                <article class="-df -pvxs -phs mb-2">
  220.                   
  221.                   <div class="-df -fw-w -c-bet -fg1">
  222.                      <div class="-df -fw">
  223.                         <h6 class="-fs14 -m -prs">Point relais</h6>
  224.                         
  225.                      </div>
  226.                      <div>
  227.                         <div class="markup -ptxs">Livraison <em>8.40 Dhs</em></div>
  228.                         <div class="markup -ptxs">Retrait le <em>16 février</em> si vous commandez d'ici <em>14hrs 42mins</em></div>
  229.                      </div>
  230.                   </div>
  231.                </article>
  232.             </div>
  233.          </section>
  234.       </article>
  235.       <article class="-df -hr _bet -pas mb-2">
  236.         
  237.          <div class="-df -d-co -c-bet">
  238.             <h6 class="-fs14 -fw -m">Politique de retour</h6>
  239.             <p class="-ptxs">Retour gratuit dans les 15 jours pour les articles provenant de boutiques officielles et dans les 7 jours pour le reste.<a class="_more -mlxs -di" target="_blank" rel="noopener" href="/politique-retour/">En savoir plus</a></p>
  240.          </div>
  241.       </article>
  242.    </div>
  243. </section>
  244.                                                     </div>
  245.                                                 </div>
  246.                                         
  247.                                     </div>
  248.                         </div>
  249.                     </div>
  250.                 </div>
  251.             </div>
  252.             <!-- content-wraper end -->
  253.             <!-- Begin Product Area -->
  254.             <div class="product-area pt-35">
  255.                 <div class="container">
  256.                     <div class="row">
  257.                         <div class="col-lg-12">
  258.                             <div class="li-product-tab">
  259.                                 <ul class="nav li-product-menu">
  260.                                    <li><a class="active" data-toggle="tab" href="#description" id="description_pro"><span>Description</span></a></li>
  261.                                    <li><a data-toggle="tab" href="#product-details" id="description_technique"><span>Descriptif technique</span></a></li>
  262.                                    <li><a data-toggle="tab" href="#reviews" id="comments"><span>Avis</span></a></li>
  263.                                 </ul>               
  264.                             </div>
  265.                             <!-- Begin Li's Tab Menu Content Area -->
  266.                         </div>
  267.                     </div>
  268.                     <div class="tab-content">
  269.                         <div id="description" class="tab-pane active show" role="tabpanel">
  270.                             <div class="product-description">
  271.                                 <span>
  272.                                     {{singleProduct.description|raw}}
  273.                                 </span>
  274.                             </div>
  275.                         </div>
  276.                         <div id="product-details" class="tab-pane p-5" role="tabpanel">
  277.                                 <table class="table table-sm  ">
  278.                                             
  279.                                             <tbody>
  280.                                                 <tr>
  281.                                                 <th scope="row">Modele</th>
  282.                                                 <td>MOD{{singleProduct.skuCode}}</td>
  283.                                                 </tr>
  284.                                                 <tr>
  285.                                                 <th scope="row">Marque</th>
  286.                                                 <td>{{singleProduct.brand}}</td>
  287.                                                 </tr>
  288.                                                 <tr>
  289.                                                 <th scope="row">SKU</th>
  290.                                                 <td>{{singleProduct.skuCode}}</td>
  291.                                                 </tr>
  292.                                                 <tr>
  293.                                                 <th scope="row">Poids (Kg)</th>
  294.                                                 <td>0.9 </td>
  295.                                                 </tr>
  296.                                                 
  297.                                                 
  298.                                                 
  299.                                                 
  300.                                             </tbody>
  301.                                             </table>
  302.                         </div>
  303.                         <div id="reviews" class="tab-pane" role="tabpanel">
  304.                             <div class="product-reviews">
  305.     <div class="container">        
  306.         <div class="row">
  307.             <div class="col-sm-3">
  308.                 <div class="rating-block">
  309.                     <h4>AVIS </h4>
  310.                     <h2 class="bold padding-bottom-7"> {{singleProduct.rating|number_format(1, '.', ',')}} <small>/ 5</small></h2>
  311.                     
  312.                      {% if singleProduct.rating > 0 %}
  313.                      {% for stars in 1..singleProduct.rating|number_format %}
  314.                       <button type="button" class="btn btn-warning btn-sm" aria-label="Left Align">
  315.                       <i class="fa fa-star"></i>
  316.                         </button>   {% endfor %}
  317.                                               {% if singleProduct.rating|number_format < 5 %}
  318.                                                 {% for stars in singleProduct.rating|number_format..4 %}
  319.                         <button type="button" class="btn btn-default btn-grey btn-sm" aria-label="Left Align">
  320.                       <i class="fa fa-star"></i>
  321.                     </button>
  322.                                                 {% endfor %}
  323.                                             {% endif %}
  324.                                               {% else %}
  325.     <button type="button" class="btn btn-default btn-grey btn-sm" aria-label="Left Align"> <i class="fa fa-star"></i></button>
  326.       <button type="button" class="btn btn-default btn-grey btn-sm" aria-label="Left Align"> <i class="fa fa-star"></i></button>
  327.     <button type="button" class="btn btn-default btn-grey btn-sm" aria-label="Left Align"> <i class="fa fa-star"></i></button>
  328.     <button type="button" class="btn btn-default btn-grey btn-sm" aria-label="Left Align"> <i class="fa fa-star"></i></button>
  329.                             
  330.                                                 {% endif %}
  331.                     
  332.                 </div>
  333.             </div>
  334.             <div class="col-sm-3">
  335.                 <h4> &nbsp;</h4>
  336.                 <div class="pull-left">
  337.                     <div class="pull-left" style="width:35px; line-height:1;">
  338.                         <div style="height:9px; margin:5px 0;">5   <i class="fa fa-star"></i> </div>
  339.                     </div>
  340.                     <div class="pull-left" style="width:180px;">
  341.                         <div class="progress" style="height:9px; margin:8px 0;">
  342.                             {% set percentage = 0 %}
  343.                             {% if singleProduct.getStars5 > 0 %}
  344.                             {% set percentage = (singleProduct.getStars5 / singleProduct.comments|length ) * 100 %}
  345.                             {% endif  %}
  346.                           <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="5" aria-valuemin="0" aria-valuemax="5" style="width: {{ percentage }}%">
  347.                             <span class="sr-only">80% Complete (danger)</span>
  348.                           </div>
  349.                         </div>
  350.                     </div>
  351.                     <div class="pull-right" style="margin-left:10px;"> {{singleProduct.getStars5}}</div>
  352.                 </div>
  353.                 <div class="pull-left">
  354.                     <div class="pull-left" style="width:35px; line-height:1;">
  355.                         <div style="height:9px; margin:5px 0;">4  <i class="fa fa-star"></i> </div>
  356.                     </div>
  357.                     <div class="pull-left" style="width:180px;">
  358.                         <div class="progress" style="height:9px; margin:8px 0;">
  359.                             {% set percentage = 0 %}
  360.                             {% if singleProduct.getStars4 > 0 %}
  361.                             {% set percentage = (singleProduct.getStars4 / singleProduct.comments|length ) * 100 %}
  362.                             {% endif  %}
  363.                           <div class="progress-bar progress-bar-primary" role="progressbar" aria-valuenow="4" aria-valuemin="0" aria-valuemax="5" style="width: {{percentage}}%">
  364.                             <span class="sr-only">80% Complete (danger)</span>
  365.                           </div>
  366.                         </div>
  367.                     </div>
  368.                     <div class="pull-right" style="margin-left:10px;">
  369.                         
  370.                         {{singleProduct.getStars4}}
  371.                         
  372.                         </div>
  373.                 </div>
  374.                 <div class="pull-left">
  375.                     <div class="pull-left" style="width:35px; line-height:1;">
  376.                         <div style="height:9px; margin:5px 0;">3  <i class="fa fa-star"></i></div>
  377.                     </div>
  378.                     <div class="pull-left" style="width:180px;">
  379.                         <div class="progress" style="height:9px; margin:8px 0;">
  380.                             {% set percentage = 0 %}
  381.                             {% if singleProduct.getStars3 > 0 %}
  382.                             {% set percentage = (singleProduct.getStars3 / singleProduct.comments|length ) * 100 %}
  383.                             {% endif  %}
  384.                           <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="3" aria-valuemin="0" aria-valuemax="5" style="width:{{percentage}}%">
  385.                             <span class="sr-only">80% Complete (danger)</span>
  386.                           </div>
  387.                         </div>
  388.                     </div>
  389.                     <div class="pull-right" style="margin-left:10px;">{{singleProduct.getStars3}}</div>
  390.                 </div>
  391.                 <div class="pull-left">
  392.                     <div class="pull-left" style="width:35px; line-height:1;">
  393.                         <div style="height:9px; margin:5px 0;">2  <i class="fa fa-star"></i></div>
  394.                     </div>
  395.                     <div class="pull-left" style="width:180px;">
  396.                         <div class="progress" style="height:9px; margin:8px 0;">
  397.                             {% set percentage = 0 %}
  398.                             {% if singleProduct.getStars2 > 0 %}
  399.                             {% set percentage = (singleProduct.getStars2 / singleProduct.comments|length ) * 100 %}
  400.                             {% endif  %}
  401.                           <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="2" aria-valuemin="0" aria-valuemax="5" style="width: {{percentage}}%">
  402.                             <span class="sr-only">80% Complete (danger)</span>
  403.                           </div>
  404.                         </div>
  405.                     </div>
  406.                     <div class="pull-right" style="margin-left:10px;">{{singleProduct.getStars2}}</div>
  407.                 </div>
  408.                 <div class="pull-left">
  409.                     <div class="pull-left" style="width:35px; line-height:1;">
  410.                         <div style="height:9px; margin:5px 0;">1  <i class="fa fa-star"></i></div>
  411.                     </div>
  412.                     <div class="pull-left" style="width:180px;">
  413.                         <div class="progress" style="height:9px; margin:8px 0;">
  414.                             {% set percentage = 0 %}
  415.                             {% if singleProduct.getStars1 > 0 %}
  416.                             {% set percentage = (singleProduct.getStars1 / singleProduct.comments|length ) * 100 %}
  417.                             {% endif  %}
  418.                           <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="1" aria-valuemin="0" aria-valuemax="5" style="width: {{percentage}}%">
  419.                             <span class="sr-only">80% Complete (danger)</span>
  420.                           </div>
  421.                         </div>
  422.                     </div>
  423.                     <div class="pull-right" style="margin-left:10px;">{{singleProduct.getStars1}}</div>
  424.                 </div>
  425.             </div>            
  426.         </div>            
  427.         
  428.         <div class="row">
  429.             <div class="col-sm-7">
  430.                   
  431.                 <hr/>
  432.                 <div class="review-block">
  433.                    {% for singleComment in singleProduct.comments %}
  434.                     <div class="row">
  435.                         <div class="col-sm-3">
  436.                             <img src="http://dummyimage.com/60x60/666/ffffff&text=No+Image" class="img-rounded">
  437.                             <div class="review-block-name"><b> {{singleComment.customer.lastName}} {{singleComment.customer.firstName}}</b></div>
  438.                             <div class="review-block-date">{{singleComment.createdAt|date("Y-m-d H:i")}} </div>
  439.                         </div>
  440.                         <div class="col-sm-9">
  441.                             <div class="review-block-rate">
  442.                                    {% for stars in 1..singleComment.rating %}
  443.                                 <button type="button" class="btn btn-warning btn-xs" aria-label="Left Align">
  444.                                   <i class="fa fa-star"></i>
  445.                                 </button>
  446.                    
  447.                                      {% endfor %}
  448.                             
  449.                                     {% if singleComment.rating < 5 %}
  450.                                  {% for stars in singleComment.rating..4 %}
  451.                                 <button type="button" class="btn btn-default btn-grey btn-xs" aria-label="Left Align">
  452.                                   <i class="fa fa-star"></i>
  453.                                 </button>
  454.                                  {% endfor %}
  455.                                  {% endif %}
  456.                             </div>
  457.                             <div class="review-block-title">COMMENTAIRES</div>
  458.                             <div class="review-block-description">{{singleComment.comment|raw}}</div>
  459.                         </div>
  460.                     </div>
  461.                     
  462.                     <hr/>
  463.                      {% endfor %}
  464.                      
  465.                 </div>
  466.             </div>
  467.         </div>
  468.         
  469.     </div> <!-- /container -->
  470.                                 <div class="product-details-comment-block">
  471.                                        {% for singleComment in singleProduct.comments %}
  472.                                     
  473.                                         <!-- <div class="comment-details">
  474.                                          <div class="comment-author-infos pt-25">
  475.                                             <span>
  476.                                             {{singleComment.customer.lastName}} {{singleComment.customer.firstName}}
  477.                                             <ul class="rating d-inline">
  478.                                             {% for stars in 1..singleComment.rating %}
  479.                                                 <li><i class="fa fa-star"></i></li>
  480.                                                 
  481.                                             {% endfor %}
  482.                                             
  483.                                             {% if singleComment.rating < 5 %}
  484.                                                 {% for stars in singleComment.rating..4 %}
  485.                                                     <li class="no-star"><i class="fa fa-star"></i></li>
  486.                                                 {% endfor %}
  487.                                             {% endif %}
  488.                                             
  489.                                         </ul>
  490.                                             </span>
  491.                                             
  492.                                             <em>{{singleComment.createdAt|date("Y-m-d H:i")}}</em>
  493.                                         </div>
  494.                                             
  495.                                             <p>{{singleComment.comment|raw}}</p>
  496.                                         </div>
  497.                                         <hr style="margin:0;">-->
  498.                                     {% endfor %}
  499.                                     {% if is_granted("ROLE_CUSTOMER") %}
  500.                                     <div class="review-btn">
  501.                                         <a class="review-links" href="#" data-toggle="modal" data-target="#mymodal">Ajouter un commentaire!</a>
  502.                                     </div>
  503.                                     <!-- Begin Prévisualiser | Modal Area -->
  504.                                     <div class="modal fade modal-wrapper" id="mymodal" >
  505.                                         <div class="modal-dialog modal-dialog-centered" role="document">
  506.                                             <div class="modal-content">
  507.                                                 <div class="modal-body">
  508.                                                     <h3 class="review-page-title">Ajouter un commentaire</h3>
  509.                                                     <div class="modal-inner-area row">
  510.                                                         <div class="col-lg-6">
  511.                                                            <div class="li-review-product">
  512.                                                                <img width="200px" src="/uploads/{{asset(singleProduct.image)}}" alt="Li's Product">
  513.                                                                <div class="li-review-product-desc">
  514.                                                                    <p class="li-product-name">{{singleProduct.name}}</p>
  515.                                                                    <p>
  516.                                                                        <span>{{singleProduct.shortDescription|raw}}</span>
  517.                                                                    </p>
  518.                                                                </div>
  519.                                                            </div>
  520.                                                         </div>
  521.                                                         <div class="col-lg-6">
  522.                                                             <div class="li-review-content">
  523.                                                                 <!-- Begin Feedback Area -->
  524.                                                                 <div class="feedback-area">
  525.                                                                     <div class="feedback">
  526.                                                                         <h3 class="feedback-title">Votre avis</h3>
  527.                                                                         <form action="{{path('comment_product',{id:singleProduct.id})}}" method="POST">
  528.                                                                             <p class="your-opinion">
  529.                                                                                 <label>Evaluer le produit</label>
  530.                                                                                 <span>
  531.                                                                                     <select name="rating" class="star-rating">
  532.                                                                                       <option value="1">1</option>
  533.                                                                                       <option value="2">2</option>
  534.                                                                                       <option value="3">3</option>
  535.                                                                                       <option value="4">4</option>
  536.                                                                                       <option value="5">5</option>
  537.                                                                                     </select>
  538.                                                                                 </span>
  539.                                                                             </p>
  540.                                                                             <p class="feedback-form">
  541.                                                                                 <label for="feedback">Votre commentaire</label>
  542.                                                                                 <textarea id="feedback" name="comment" cols="45" rows="8" aria-required="true"></textarea>
  543.                                                                             </p>
  544.                                                                             <div class="feedback-input">
  545.                                                                               
  546.                                                                                 
  547.                                                                                 <div class="feedback-btn pb-15">
  548.                                                                                     <a href="#" class="close register-button d-none" data-dismiss="modal" aria-label="Close">Close</a>
  549.                                                                                     <button class="register-button" type="submit">Envoyer</button>
  550.                                                                                 </div>
  551.                                                                             </div>
  552.                                                                         </form>
  553.                                                                     </div>
  554.                                                                 </div>
  555.                                                                 <!-- Feedback Area End Here -->
  556.                                                             </div>
  557.                                                         </div>
  558.                                                     </div>
  559.                                                 </div>
  560.                                             </div>
  561.                                         </div>
  562.                                     </div>   
  563.                                     <!-- Prévisualiser | Modal Area End Here -->
  564.                                     {% endif  %}
  565.                                 </div>
  566.                             </div>
  567.                         </div>
  568.                     </div>
  569.                 </div>
  570.             </div>
  571.             <!-- Product Area End Here -->
  572.             <!-- Begin Li's PC Portable Product Area -->
  573.             <section class="product-area li-laptop-product pt-30 pb-50">
  574.                 <div class="container">
  575.                     <div class="row">
  576.                         <!-- Begin Li's Section Area -->
  577.                         <div class="col-lg-12">
  578.                             <div class="li-section-title">
  579.                                 <h2>
  580.                                     <span>Produits en relation</span>
  581.                                 </h2>
  582.                             </div>
  583.                             <div class="row">
  584.                                 <div class="product-active owl-carousel">
  585.                                 
  586.                                   {% for singleProduct in associatedProducts %}
  587.                                         {% 
  588.                                         include "@Flexy/FrontBundle/templates/products/includes/_singleProduct.html.twig" with
  589.                                         {
  590.                                             singleProduct:singleProduct,
  591.                                         }
  592.                                          %} 
  593.                                 {% endfor %}
  594.                                 </div>
  595.                             </div>
  596.                         </div>
  597.                         <!-- Li's Section Area End Here -->
  598.                     </div>
  599.                 </div>
  600.             </section>
  601.             <!-- Li's PC Portable Product Area End Here -->
  602.             <!-- Begin Footer Area -->
  603. </div>
  604. {% endblock %}
  605. {% block javascripts %}
  606. {{parent()}}
  607. <script>
  608. $(document).ready(function(){
  609.                     $.ajax({
  610.                         url: "{{path('departements_ajax')}}",
  611.                         data:{
  612.                             city:$("select[name='city']").val()
  613.                         },
  614.                         success:function(data){
  615.                             
  616.                             $("select[name='departement']").html(data);
  617.                         },
  618.                     });
  619.                     $("select[name='city'").change(function(){
  620.                     $.ajax({
  621.                         url: "{{path('departements_ajax')}}",
  622.                         data:{
  623.                             city:$(this).val()
  624.                         },
  625.                         success:function(data){
  626.                             
  627.                             $("select[name='departement']").html(data);
  628.                         },
  629.                     });
  630.                     });
  631.           $("#showcomments").click(function(){
  632.                
  633.                $("#comments").addClass("active show");
  634.                $("#reviews").addClass("active show");
  635.                $("#description_technique").removeClass("active show");
  636.                $("#product-details").removeClass("active show");
  637.                 $("#description_pro").removeClass("active show");
  638.                 $("#description").removeClass("active show");
  639.                 
  640.      });
  641.         });
  642. </script>
  643. {% endblock %}