templates/checkout/checkout.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Les trésors de Luna - Contact{% endblock %}
  3. {% block javascripts %}
  4.   <script type="module" src="{{asset('js/buying.js')}}"></script>
  5.   <script type="module" src="{{asset('js/classes/Cart.js')}}"></script>
  6.   <script type="module" src="{{asset('js/payment.js')}}"></script>
  7.   <script type="module" src="{{asset('js/classes/PaymentDataManager.js')}}"></script>
  8. {% endblock javascripts %}
  9. {% block body %}
  10. <body>
  11.   <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
  12.     <defs>
  13.       <symbol xmlns="http://www.w3.org/2000/svg" id="link" viewBox="0 0 24 24">
  14.         <path fill="currentColor"
  15.           d="M12 19a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm5 0a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm0-4a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm-5 0a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm7-12h-1V2a1 1 0 0 0-2 0v1H8V2a1 1 0 0 0-2 0v1H5a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3Zm1 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-9h16Zm0-11H4V6a1 1 0 0 1 1-1h1v1a1 1 0 0 0 2 0V5h8v1a1 1 0 0 0 2 0V5h1a1 1 0 0 1 1 1ZM7 15a1 1 0 1 0-1-1a1 1 0 0 0 1 1Zm0 4a1 1 0 1 0-1-1a1 1 0 0 0 1 1Z" />
  16.       </symbol>
  17.       <symbol xmlns="http://www.w3.org/2000/svg" id="arrow-right" viewBox="0 0 24 24">
  18.         <path fill="currentColor"
  19.           d="M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76Z" />
  20.       </symbol>
  21.       <symbol xmlns="http://www.w3.org/2000/svg" id="category" viewBox="0 0 24 24">
  22.         <path fill="currentColor"
  23.           d="M19 5.5h-6.28l-.32-1a3 3 0 0 0-2.84-2H5a3 3 0 0 0-3 3v13a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-10a3 3 0 0 0-3-3Zm1 13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-13a1 1 0 0 1 1-1h4.56a1 1 0 0 1 .95.68l.54 1.64a1 1 0 0 0 .95.68h7a1 1 0 0 1 1 1Z" />
  24.       </symbol>
  25.       <symbol xmlns="http://www.w3.org/2000/svg" id="calendar" viewBox="0 0 24 24">
  26.         <path fill="currentColor"
  27.           d="M19 4h-2V3a1 1 0 0 0-2 0v1H9V3a1 1 0 0 0-2 0v1H5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3Zm1 15a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-7h16Zm0-9H4V7a1 1 0 0 1 1-1h2v1a1 1 0 0 0 2 0V6h6v1a1 1 0 0 0 2 0V6h2a1 1 0 0 1 1 1Z" />
  28.       </symbol>
  29.       <symbol xmlns="http://www.w3.org/2000/svg" id="heart" viewBox="0 0 24 24">
  30.         <path fill="currentColor"
  31.           d="M20.16 4.61A6.27 6.27 0 0 0 12 4a6.27 6.27 0 0 0-8.16 9.48l7.45 7.45a1 1 0 0 0 1.42 0l7.45-7.45a6.27 6.27 0 0 0 0-8.87Zm-1.41 7.46L12 18.81l-6.75-6.74a4.28 4.28 0 0 1 3-7.3a4.25 4.25 0 0 1 3 1.25a1 1 0 0 0 1.42 0a4.27 4.27 0 0 1 6 6.05Z" />
  32.       </symbol>
  33.       <symbol xmlns="http://www.w3.org/2000/svg" id="plus" viewBox="0 0 24 24">
  34.         <path fill="currentColor"
  35.           d="M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2Z" />
  36.       </symbol>
  37.       <symbol xmlns="http://www.w3.org/2000/svg" id="minus" viewBox="0 0 24 24">
  38.         <path fill="currentColor" d="M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2Z" />
  39.       </symbol>
  40.       <symbol xmlns="http://www.w3.org/2000/svg" id="cart" viewBox="0 0 24 24">
  41.         <path fill="currentColor"
  42.           d="M8.5 19a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 8.5 19ZM19 16H7a1 1 0 0 1 0-2h8.491a3.013 3.013 0 0 0 2.885-2.176l1.585-5.55A1 1 0 0 0 19 5H6.74a3.007 3.007 0 0 0-2.82-2H3a1 1 0 0 0 0 2h.921a1.005 1.005 0 0 1 .962.725l.155.545v.005l1.641 5.742A3 3 0 0 0 7 18h12a1 1 0 0 0 0-2Zm-1.326-9l-1.22 4.274a1.005 1.005 0 0 1-.963.726H8.754l-.255-.892L7.326 7ZM16.5 19a1.5 1.5 0 1 0 1.5 1.5a1.5 1.5 0 0 0-1.5-1.5Z" />
  43.       </symbol>
  44.       <symbol xmlns="http://www.w3.org/2000/svg" id="check" viewBox="0 0 24 24">
  45.         <path fill="currentColor"
  46.           d="M18.71 7.21a1 1 0 0 0-1.42 0l-7.45 7.46l-3.13-3.14A1 1 0 1 0 5.29 13l3.84 3.84a1 1 0 0 0 1.42 0l8.16-8.16a1 1 0 0 0 0-1.47Z" />
  47.       </symbol>
  48.       <symbol xmlns="http://www.w3.org/2000/svg" id="trash" viewBox="0 0 24 24">
  49.         <path fill="currentColor"
  50.           d="M10 18a1 1 0 0 0 1-1v-6a1 1 0 0 0-2 0v6a1 1 0 0 0 1 1ZM20 6h-4V5a3 3 0 0 0-3-3h-2a3 3 0 0 0-3 3v1H4a1 1 0 0 0 0 2h1v11a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V8h1a1 1 0 0 0 0-2ZM10 5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v1h-4Zm7 14a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V8h10Zm-3-1a1 1 0 0 0 1-1v-6a1 1 0 0 0-2 0v6a1 1 0 0 0 1 1Z" />
  51.       </symbol>
  52.       <symbol xmlns="http://www.w3.org/2000/svg" id="star-outline" viewBox="0 0 15 15">
  53.         <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
  54.           d="M7.5 9.804L5.337 11l.413-2.533L4 6.674l2.418-.37L7.5 4l1.082 2.304l2.418.37l-1.75 1.793L9.663 11L7.5 9.804Z" />
  55.       </symbol>
  56.       <symbol xmlns="http://www.w3.org/2000/svg" id="star-solid" viewBox="0 0 15 15">
  57.         <path fill="currentColor"
  58.           d="M7.953 3.788a.5.5 0 0 0-.906 0L6.08 5.85l-2.154.33a.5.5 0 0 0-.283.843l1.574 1.613l-.373 2.284a.5.5 0 0 0 .736.518l1.92-1.063l1.921 1.063a.5.5 0 0 0 .736-.519l-.373-2.283l1.574-1.613a.5.5 0 0 0-.283-.844L8.921 5.85l-.968-2.062Z" />
  59.       </symbol>
  60.       <symbol xmlns="http://www.w3.org/2000/svg" id="search" viewBox="0 0 24 24">
  61.         <path fill="currentColor"
  62.           d="M21.71 20.29L18 16.61A9 9 0 1 0 16.61 18l3.68 3.68a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.39ZM11 18a7 7 0 1 1 7-7a7 7 0 0 1-7 7Z" />
  63.       </symbol>
  64.       <symbol xmlns="http://www.w3.org/2000/svg" id="user" viewBox="0 0 24 24">
  65.         <path fill="currentColor"
  66.           d="M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19ZM12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4Z" />
  67.       </symbol>
  68.       <symbol xmlns="http://www.w3.org/2000/svg" id="close" viewBox="0 0 15 15">
  69.         <path fill="currentColor"
  70.           d="M7.953 3.788a.5.5 0 0 0-.906 0L6.08 5.85l-2.154.33a.5.5 0 0 0-.283.843l1.574 1.613l-.373 2.284a.5.5 0 0 0 .736.518l1.92-1.063l1.921 1.063a.5.5 0 0 0 .736-.519l-.373-2.283l1.574-1.613a.5.5 0 0 0-.283-.844L8.921 5.85l-.968-2.062Z" />
  71.       </symbol>
  72.     </defs>
  73.   </svg>
  74.   <div class="preloader-wrapper">
  75.     <div class="preloader">
  76.     </div>
  77.   </div>
  78.   <div class="offcanvas offcanvas-end" data-bs-scroll="true" tabindex="-1" id="offcanvasCart" aria-labelledby="My Cart">
  79.     <div class="offcanvas-header justify-content-center">
  80.       <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
  81.     </div>
  82.     <div class="offcanvas-body">
  83.       <div class="order-md-last">
  84.         <h4 class="d-flex justify-content-between align-items-center mb-3">
  85.           <span class="text-primary">Your cart</span>
  86.           <span class="badge bg-primary rounded-circle pt-2">3</span>
  87.         </h4>
  88.         <ul class="list-group mb-3">
  89.           <li class="list-group-item d-flex justify-content-between lh-sm">
  90.             <div>
  91.               <h6 class="my-0">Grey Hoodie</h6>
  92.               <small class="text-body-secondary">Brief description</small>
  93.             </div>
  94.             <span class="text-body-secondary">$12</span>
  95.           </li>
  96.           <li class="list-group-item d-flex justify-content-between lh-sm">
  97.             <div>
  98.               <h6 class="my-0">Dog Food</h6>
  99.               <small class="text-body-secondary">Brief description</small>
  100.             </div>
  101.             <span class="text-body-secondary">$8</span>
  102.           </li>
  103.           <li class="list-group-item d-flex justify-content-between lh-sm">
  104.             <div>
  105.               <h6 class="my-0">Soft Toy</h6>
  106.               <small class="text-body-secondary">Brief description</small>
  107.             </div>
  108.             <span class="text-body-secondary">$5</span>
  109.           </li>
  110.           <li class="list-group-item d-flex justify-content-between">
  111.             <span class="fw-bold">Total (USD)</span>
  112.             <strong>$20</strong>
  113.           </li>
  114.         </ul>
  115.         <button class="w-100 btn btn-primary btn-lg" type="submit">Continue to checkout</button>
  116.       </div>
  117.     </div>
  118.   </div>
  119.   <div class="offcanvas offcanvas-end" data-bs-scroll="true" tabindex="-1" id="offcanvasSearch"
  120.     aria-labelledby="Search">
  121.     <div class="offcanvas-header justify-content-center">
  122.       <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
  123.     </div>
  124.     <div class="offcanvas-body">
  125.       <div class="order-md-last">
  126.         <h4 class="text-primary text-uppercase mb-3">
  127.           Search
  128.         </h4>
  129.         <div class="search-bar border rounded-2 border-dark-subtle">
  130.           <form id="search-form" class="text-center d-flex align-items-center" action="" method="">
  131.             <input type="text" class="form-control border-0 bg-transparent" placeholder="Search Here" />
  132.             <iconify-icon icon="tabler:search" class="fs-4 me-3"></iconify-icon>
  133.           </form>
  134.         </div>
  135.       </div>
  136.     </div>
  137.   </div>
  138.   <section id="banner" class="py-3" style="background: #F9F3EC;">
  139.     <div class="container">
  140.       <div class="hero-content py-5 my-3">
  141.         <h2 class="display-1 mt-3 mb-0">Information de livraison </h2>
  142.         <nav class="breadcrumb">
  143.           <a class="breadcrumb-item nav-link" href="{{path('app_home')}}">Accueil</a>
  144.           <span class="breadcrumb-item active" aria-current="page">Paiement</span>
  145.         </nav>
  146.       </div>
  147.     </div>
  148.   </section>
  149.   <section class="shopify-cart checkout-wrap">
  150.     <div class="container py-5 my-5">
  151.       <form class="form-group">
  152.         <div class="row d-flex flex-wrap">
  153.           <div class="col-lg-6">
  154.             <h2 class="text-dark pb-3">Adresse de facturation</h2>
  155.             <div class="billing-details">
  156.               {% if app.user %}
  157.               
  158.                 {% if app.user.isVerified %}
  159.                   <label for="fname">Nom*</label>
  160.                   <input type="text" id="fname" name="firstname" required class="form-control mt-2 mb-4 ps-3" value="{{app.user.firstName}}">
  161.                   <label for="lname">Prénom*</label>
  162.                   <input type="text" id="lname" name="lastname" required class="form-control mt-2 mb-4 ps-3" value="{{app.user.surname}}">
  163.                   {#
  164.                   <label for="cname">Company Name(optional)*</label>
  165.                   <input type="text" id="cname" name="companyname" class="form-control mt-2 mb-4">
  166.                   <label for="cname">Country / Region*</label>
  167.                   
  168.                   <select class="form-select form-control mt-2 mb-4" aria-label="Default select example">
  169.                     <option selected="" hidden="">United States</option>
  170.                     <option value="1">UK</option>
  171.                     <option value="2">Australia</option>
  172.                     <option value="3">Canada</option>
  173.                   </select>
  174.                   #}
  175.                   <label for="address">Adresse*</label>
  176.                   <input type="text" id="adr" name="address" placeholder="Rue"
  177.                     class="form-control mt-3 ps-3 mb-3" value="{{app.user.adress}}">
  178.                   <label for="additional-address-information">Informations supplémentaire</label>
  179.                   <input type="text" id="adri" name="additional-address-information" placeholder="N° d'appartement, code, etc."
  180.                     class="form-control ps-3 mb-4" value="{{app.user.additionalAdressInformation}}">
  181.                   <label for="city">Ville*</label>
  182.                   <input type="text" id="city" name="city" class="form-control mt-3 ps-3 mb-4" value="{{app.user.city}}">
  183.                   {#
  184.                   <label for="state">State *</label>
  185.                   <select class="form-select form-control mt-2 mb-4" aria-label="Default select example">
  186.                     <option selected="" hidden="">Florida</option>
  187.                     <option value="1">New York</option>
  188.                     <option value="2">Chicago</option>
  189.                     <option value="3">Texas</option>
  190.                     <option value="3">San Jose</option>
  191.                     <option value="3">Houston</option>
  192.                   </select>
  193.                   #}
  194.                   <label for="zip">Code postal*</label>
  195.                   <input type="text" id="zip" name="zip" class="form-control mt-2 mb-4 ps-3" value="{{app.user.zipCode}}">
  196.                   <label for="email">Téléphone</label>
  197.                   <input type="text" id="phone" name="phone" class="form-control mt-2 mb-4 ps-3" value="{{app.user.phone}}">
  198.                   <label for="email">Email*</label>
  199.                   <input type="text" id="email" name="email" class="form-control mt-2 mb-4 ps-3" required value="{{app.user.email}}">
  200.                   {% else %}
  201.                     <p><a href="{{path('generate_confirmation_list')}}">Veuillez confirmer votre email via le mail de confirmation qui vous a été envoyé à votre addresse mail.</a></p>
  202.                     
  203.                 {% endif %}
  204.                 
  205.               {% else %}
  206.               <p><a href="{{path('account')}}">Veuillez vous connecter ou créer un compte en cliquant sur ce <strong style="color: lightcoral">lien</strong>.</a></p>
  207.               {% endif %}   
  208.             </div>
  209.           </div>
  210.           <div class="col-lg-6">
  211.             <h2 class="text-dark pb-3">Information Additionnelle</h2>
  212.             <div class="billing-details">
  213.               <label for="additional-delivery-information">Instruction supplémentaire (optionnel)</label>
  214.               <textarea id="additional_information" class="form-control pt-3 pb-3 ps-3 mt-2" style="text-transform: none;"
  215.                 placeholder="Instructions à laisser au livreur"></textarea>
  216.             </div>
  217.             <div class="your-order mt-5">
  218.               
  219.               {% if totalPrice != 0 %}
  220.                 <h2 class="display-7 text-dark pb-3">Total à payer</h2>
  221.                 <div class="total-price">
  222.                   <table cellspacing="0" class="table">
  223.                     <tbody>
  224.                       <tr class="subtotal border-top border-bottom pt-2 pb-2 text-uppercase">
  225.                         <th>Sous total</th>
  226.                         <td data-title="Subtotal">
  227.                           <span class="price-amount amount ps-5">
  228.                             <bdi>
  229.                               {{totalPrice | number_format(2, ',', '')}}
  230.                               <span class="price-currency-symbol">€</span>
  231.                             </bdi>
  232.                           </span>
  233.                         </td>
  234.                       </tr>
  235.                       <tr class="weight border-top border-bottom pt-2 pb-2">
  236.                         <th>Frais de port</th>
  237.                         <td data-title="weight">
  238.                           <span class="weight-amount amount ps-5">
  239.                             <bdi>
  240.                               {{weightPrice | number_format(2, ',', '')}} € ({{totalWeight}})
  241.                             </bdi>
  242.                           </span>
  243.                         </td>
  244.                       </tr>
  245.                       <tr class="order-total border-bottom pt-2 pb-2 text-uppercase">
  246.                         <th>Total</th>
  247.                         <td data-title="Total">
  248.                           <span class="ttc-price-amount amount ps-5">
  249.                             <bdi>
  250.                               <span class="price-currency-symbol"></span>{{ttcPrice | number_format(2, ',', '')}}€</bdi>
  251.                           </span>
  252.                         </td>
  253.                       </tr>
  254.                     </tbody>
  255.                   </table>
  256.                   <div class="list-group mt-5 mb-3">
  257.                     <label class="list-group-item d-flex gap-2 border-0">
  258.                       <input class="form-check-input flex-shrink-0" type="radio" name="listGroupRadios"
  259.                         id="listGroupRadios1" value="" checked="">
  260.                       <span>
  261.                         <strong class="text-uppercase">Livraison postal</strong>
  262.                         <small class="d-block text-body-secondary">Nous vous envoyons vortre commande, emballé par nos soins, via La Poste</small>
  263.                       </span>
  264.                     </label>
  265.                     {#
  266.                     <label class="list-group-item d-flex gap-2 border-0">
  267.                       <input class="form-check-input flex-shrink-0" type="radio" name="listGroupRadios"
  268.                         id="listGroupRadios2" value="">
  269.                       <span>
  270.                         <strong class="text-uppercase">Check payments</strong>
  271.                         <small class="d-block text-body-secondary">Please send a check to Store Name, Store Street, Store
  272.                           Town, Store State / County, Store Postcode.</small>
  273.                       </span>
  274.                     </label>
  275.                     <label class="list-group-item d-flex gap-2 border-0">
  276.                       <input class="form-check-input flex-shrink-0" type="radio" name="listGroupRadios"
  277.                         id="listGroupRadios3" value="">
  278.                       <span>
  279.                         <strong class="text-uppercase">Cash on delivery</strong>
  280.                         <small class="d-block text-body-secondary">Pay with cash upon delivery.</small>
  281.                       </span>
  282.                     </label>
  283.                     <label class="list-group-item d-flex gap-2 border-0">
  284.                       <input class="form-check-input flex-shrink-0" type="radio" name="listGroupRadios"
  285.                         id="listGroupRadios3" value="">
  286.                       <span>
  287.                         <strong class="text-uppercase">Paypal</strong>
  288.                         <small class="d-block text-body-secondary">Pay via PayPal; you can pay with your credit card if
  289.                           you don’t have a PayPal account.</small>
  290.                       </span>
  291.                     </label>
  292.                     #}
  293.                   </div>
  294.                   <div class="form-error-messages hide">Error messages</div>
  295.                   <a id="payment-button" href="{{path('payment')}}" type="submit" name="submit" class="btn btn-dark btn-lg rounded-1 w-100">Payer</a>
  296.                 </div>
  297.                 {% else %}
  298.                 <div class="d-flex justify-content-center" style="background-color: lightgrey;">
  299.                   <h6 class="m-5 fs-5">Le panier est vide !</h6>
  300.                 </div>
  301.               {% endif %}
  302.             </div>
  303.           </div>
  304.         </div>
  305.       </form>
  306.     </div>
  307.   </section>
  308. </body>
  309. </html>
  310. {% endblock body %}