templates/default/product_details.html.twig line 1

  1. {% extends 'base.html.twig' %}
  2.     {% block title %}MOPO{% endblock %}
  3. {% block body %}
  4.     <div id="page-container" class="fade show">
  5.     <div id="product" class="section-container pt-20px">
  6.         <!-- BEGIN container -->
  7.         <div class="container">
  8.             <!-- BEGIN breadcrumb -->
  9.             <ul class="breadcrumb">
  10.                 <li class="breadcrumb-item"><a href="{{ path('home') }}">Accueil</a></li>
  11.                 <li class="breadcrumb-item"><a href="#">{{ selected_product.brand }}</a></li>
  12.                 <li class="breadcrumb-item active">{{ selected_product.productName }}</li>
  13.             </ul>
  14.             <!-- END breadcrumb -->
  15.             <!-- BEGIN product -->
  16.             <div class="product">
  17.                 <!-- BEGIN product-detail -->
  18.                 <div class="product-detail">
  19.                     <!-- BEGIN product-image -->
  20.                     <div class="product-image">
  21.                         <!-- BEGIN product-thumbnail -->
  22.                         <div class="product-thumbnail">
  23.                             <ul class="product-thumbnail-list" id="hide_scrollbar">
  24.                                 {% for image in images %}
  25.                                 <li class="active"><a href="#" data-click="show-main-image"
  26.                                                       data-url="{{ asset('assets/img/product/' ~ image.imageName) }}"><img
  27.                                                 src="{{ asset('assets/img/product/' ~ image.imageName) }}" alt="{{ image.imageName }}"/></a>
  28.                                 </li>
  29.                                 {% endfor %}
  30.                             </ul>
  31.                         </div>
  32.                         <!-- END product-thumbnail -->
  33.                         <!-- BEGIN product-main-image -->
  34.                         {% if images is empty %}
  35.                         <div class="product-main-image" data-id="main-image">
  36.                             <img src="{{ asset('assets/img/product/default.png') }}" alt="no image"/>
  37.                         </div>
  38.                         {% else %}
  39.                             <div class="product-main-image" data-id="main-image">
  40.                                 <img src="{{ asset('assets/img/product/' ~ images[0].imageName) }}" alt="{{ images[0].imageName }}"/>
  41.                             </div>
  42.                         {% endif %}
  43.                         <!-- END product-main-image -->
  44.                     </div>
  45.                     <!-- END product-image -->
  46.                     <!-- BEGIN product-info -->
  47.                     <div class="product-info">
  48.                         <!-- BEGIN product-info-header -->
  49.                         <div class="product-info-header">
  50.                             <h1 class="product-title text-uppercase text-red-600">{{ selected_product.productName }} -
  51.                                 Réf
  52.                                 #{{ selected_product.productReference }} </h1>
  53.                         </div>
  54.                         <!-- END product-info-header -->
  55.                         <!-- BEGIN product-description -->
  56.                         <div class="product-warranty">
  57.                             <h4 class="text-red-600">Description</h4>
  58.                             <p class="product-desc-text">
  59.                                 {{ selected_product.productDescription }}
  60.                             </p>
  61.                         </div>
  62.                         <!-- END product-description -->
  63.                         <!-- BEGIN product-warranty -->
  64.                         <div class="product-warranty">
  65.                             {% if selected_product.productQuantity > 0 %}
  66.                                 <div class="pull-right"><span
  67.                                             class="fw-bold text-red-600">Disponibilité:</span> {{ selected_product.productQuantity }}
  68.                                     en
  69.                                     stock
  70.                                 </div>
  71.                                 <div class="pull-right"><span
  72.                                             class="fw-bold text-red-600">Etat:</span> {{ selected_product.condition }}
  73.                                 </div>
  74.                             {% else %}
  75.                                 <div class="pull-right"><span
  76.                                             class="fw-bold text-red-600">Disponibilité:</span> NON DISPONIBLE
  77.                                 </div>
  78.                                 <div class="pull-right"><span
  79.                                             class="fw-bold text-red-600">Etat:</span> -
  80.                                 </div>
  81.                                 <div class="pull-right"><span class="fw-bold text-red-600">Garantie:</span> -</div>
  82.                             {% endif %}
  83.                         </div>
  84.                         <!-- END product-warranty -->
  85.                         <!-- BEGIN product-purchase-container -->
  86.                         <div class="container-fluid">
  87.                             <div class="row">
  88.                                 <div class="col-lg-6 col-md-6 col-sm-12">
  89.                                     <div class="product-discount">
  90.                                         <span>{{ (selected_product.productPrice / tva)|number_format(2) }}€ HT</span>
  91.                                     </div>
  92.                                     <div class="product-price">
  93.                                         <div class="price">{{ selected_product.productPrice }}€ TTC</div>
  94.                                     </div>
  95.                                 </div>
  96.                                 {% if selected_product.productQuantity > 0 %}
  97.                                     <div class="col-lg-6 col-md-6 col-sm-12">
  98.                                         {{ form_start(form, {'attr': {'id': 'add-to-cart-form'}}) }}
  99.                                             <div class="row">
  100.                                                 {{ form_label(form.product_quantity, 'Quantité:', {'label_attr': {'class': 'fw-bold'}}) }}
  101.                                                 <div class="col-6 d-flex align-items-end">
  102.                                                     {{ form_widget(form.product_quantity, {'attr': {'class': 'form-control text-center shadow-none'}}) }}
  103.                                                 </div>
  104.                                                 <div class="col-6 d-flex align-items-end ps-0">
  105.                                                     <button type="submit" name="ajouter"
  106.                                                             class="btn btn-outline-dark" id="form-add-cart" onclick="addToCart(this.form)">
  107.                                                         <i class="fa fa-cart-plus"></i>
  108.                                                     </button>
  109.                                                 </div>
  110.                                             </div>
  111.                                         {{ form_end(form) }}
  112.                                     </div>
  113.                                 {% endif %}
  114.                             </div>
  115.                         </div>
  116.                         <!-- END product-purchase-container -->
  117.                     </div>
  118.                     <!-- END product-info -->
  119.                 </div>
  120.                 <!-- END product-detail -->
  121.                 <!-- BEGIN product-tab -->
  122.                 <h4 class="text-red-600 text-center m-3">Caractéristiques</h4>
  123.                 <div class="table-responsive">
  124.                     <!-- BEGIN table-product -->
  125.                     <table class="table table-product table-striped">
  126.                         <thead>
  127.                         <tr>
  128.                             <th></th>
  129.                             <th></th>
  130.                         </tr>
  131.                         </thead>
  132.                         <tbody>
  133.                         <tr>
  134.                             <td class="field">Marque</td>
  135.                             <td>
  136.                                 {{ selected_product.brand }}
  137.                             </td>
  138.                         </tr>
  139.                         <tr>
  140.                             <td class="field">Modèle</td>
  141.                             <td>
  142.                                 {{ selected_product.model }}
  143.                             </td>
  144.                         </tr>
  145.                         {% if selected_product.productYear != null  %}
  146.                         <tr>
  147.                             <td class="field">Année</td>
  148.                             <td>
  149.                                 {{ selected_product.productYear }}
  150.                             </td>
  151.                         </tr>
  152.                         {% endif %}
  153.                         {% if selected_product.productKm != null  %}
  154.                         <tr>
  155.                             <td class="field">Kilométrage</td>
  156.                             <td>
  157.                                 {{ selected_product.productKm }} km
  158.                             </td>
  159.                         </tr>
  160.                         {% endif %}
  161.                         </tbody>
  162.                     </table>
  163.                     <!-- END table-product -->
  164.                 </div>
  165.                 <!-- END table-responsive -->
  166.             </div>
  167.             <!-- END container -->
  168.         </div>
  169.         <!-- END #product -->
  170.     </div>
  171. {% endblock %}