
<form  id="panierTab" action="/commander" method="post" >
   <br> <h2><strong>Mon panier</strong></h2>
<table class="table">
    <thead>
    <tr id="panierLien">
        <th>Produit</th>
        <th>Prix</th>
        <th>Quantité</th>
        <th></th>
    </tr>

   <!-- <tr> rempli par fonction js modifPanierLien() -->
    <tr>
     <th >Livraison Colissimo :</th>
    </tr>
    <tr>
        <% if(!locals.what){ %>
        <% if(locals.result.adresse.indexOf('77400') !== -1) { %>
            <th><input style="border:none;background-color:white" name="livraison" id="livraison" value="0 €" readonly ></th>
        <% }
        else { %>
            <th><input style="border:none;background-color:white" name="livraison" id="livraison" value="6 €" readonly ></th>
        <% }} else { %>
            <th><input style="border:none;background-color:white" name="livraison" id="livraison" value="6 €" readonly ></th>
        <% } %>
       </tr>
    <tr >
        <th id="totalPanierLien">TOTAL</th>
    </tr>
    <tr>
    <th><input style="border:none;background-color:white" name="prixTotal" id="prixTotal" readonly></th>

    </tr>
    </thead>
    <tbody id="panier">
    </tbody>
</table>
    <br><br>
    <div class="adresse">

        <input type="checkbox" onclick="cacheAdresse();" style="color:blue;" type="checkbox" id="clickCollect" name="clickCollect"></input>
        <h2>Click and Collect </h2><br>
        <div class="messageCommande">
            <h4 style="color:red">Si vous cochez sur "click and collect", vous devrez vous déplacer jusqu'au local de Konix-CBD.</h4>
        </div><br>
        
    <h2>Adresse de livraison :</h2>
        <% if(locals.what){ %>
    <h2><input id="searchInput" name="searchInput" class="searchInput"  value="" type="text" ></h2>
        <% } else { %>
            <h2><input id="searchInput" name="searchInput" class="searchInput"  value="<%= locals.result.adresse %>" type="text" ></h2>
            <% } %>
        <div class="suggestions" id="suggestions">
        </div>
        <div class="messageCommande">
            <h4 style="color:rgb(10, 136, 21)">Les adresses en Marne et Gondoire sont livrées gratuitement !</h4>
        </div><br>
           <br>
          <% if(!locals.panier){  %>
        <input type="submit" value="Commander" class="btn btn-lg btn-circle btn-success">
        <% } %>
        
    </h2>
    </div>

    <br>
<% if(!locals.panier){  %>
</form>
<% } %>
<script src="../js/panier.js">

    
</script>


