Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.electricien-77.com
/
htdocs
/
pages
/
db
/
/srv/data/web/vhosts/www.electricien-77.com/htdocs/pages/db/cart.php
<?php //start_block('title','keywords','description') start_block('','',''); ?> <?php include "functions/ShoppingCart/payment.php" ?> <div id="cart"> <h1>Panier</h1> <?php if (sizeof($_SESSION['cart']['id'])>0): ?> <table class='table table-bordered cart'> <thead> <tr> <th class='span6'>Produit(s)</th> <th class='span2'>Prix unitaire</th> <th class='span2'>Quantité</th> <th class='span2'>Prix total</th> <th class='span1'></th> </tr> </thead> <tbody> <?php $totalHT = $totalTTC = $totalTVA = $shipping_cost = 0; $cart_id = $_SESSION['cart']['id']; $cart_name = $_SESSION['cart']['name']; $cart_reference = $_SESSION['cart']['reference']; $cart_price = $_SESSION['cart']['price']; $cart_quantity = $_SESSION['cart']['quantity']; $cart_shipping_cost = $_SESSION['cart']['shipping_cost']; $cart_tax = $_SESSION['cart']['tax']; foreach ($_SESSION['cart']['id'] as $i => $article) { //$poidsTotal+=$_SESSION['cart']['taille2'][$i]*$cart_quantity[$i]; echo" <tr> <td> <a href='Produit-".$cart_id[$i]."'>".$cart_name[$i]."</a><br> <i><small>Réf. ".$cart_reference[$i]."</small></i> </td> <td><small>".number_format($cart_price[$i],2)." €</small></td> <td> <form class='form' method='post' action='functions/ShoppingCart/update-article.php'> <input type='hidden' name='id' value='".$cart_id[$i]."'> <input type='number' name='quantity' value='".$cart_quantity[$i]."'> <button type='submit' class='btn btn-xs btn-success'><i class='fa fa-refresh'></i></button> </form> </td> <td><b>".number_format($cart_price[$i]*$cart_quantity[$i],2)." €</b></td> <td> <form method='post' action='functions/ShoppingCart/remove-article.php'> <input type='hidden' name='id' value='".$cart_id[$i]."'> <button type='submit' class='btn btn-danger btn-xs' title='Supprimer ce produit'><i class='fa fa-times'></i></button> </form> </td> </tr>"; $totalHT+=number_format($cart_price[$i]*$cart_quantity[$i],2); $totalTVA+=number_format($cart_price[$i]*$cart_quantity[$i]*$cart_tax[$i]/100,2); $shipping_cost+=number_format($cart_shipping_cost[$i]*$cart_quantity[$i],2); } $totalTTC+=$totalHT + $totalTVA + $shipping_cost; echo" <tr><td colspan='5'></td></tr> <tr> <td colspan='2'></td> <td>Frais de port</td><td class='price'>$shipping_cost €</td> <td></td> </tr> <tr><td colspan='2'></td><td>Total HT</td><td class='price'>$totalHT €</td><td></td></tr> <tr><td colspan='2'></td><td>TVA</td><td class='price'>$totalTVA €</td><td></td></tr> <tr><td colspan='2'></td><td><b>Total TTC</b></td><td class='price'><b>$totalTTC €</b></td><td></td></tr>" ; ?> </tbody> </table> <hr> <i><small><span>Les frais de livraisons indiqués correspondent à la France Métropolitaine et à la Corse.</span></small></i><br><br> <!--<div class='ta-center'><hr><a href='Livraison' class='btn btn-success btn-largse'>Valider ma commande</a></div>--> Une fois le paiement confirmé, vous receverez votre bon de commande directement sur votre adresse email : <b>email</b> <br><br> <?=$userMessage?> <div class='col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3'> <form role="form" method="post" action="<?=$routes['cart']?>#formU"> <div class="row"> <div class="col-sm-6"> <div class="form-group has-feedback <?=$firstnameClass?>"> <label for="firstnameForm">Prénom</label> <input type="text" class="form-control " id="firstnameForm" name="firstname" value="<?=$firstname?>"> <?php if($formSend)echo"<span class='fa ".( ($firstnameClass=="has-success")?"fa-check":"fa-times" )." form-control-feedback'></span>" ?> </div> </div> <div class="col-sm-6"> <div class="form-group has-feedback <?=$lastnameClass?>"> <label for="lastnameForm">Nom</label> <input type="text" class="form-control" id="lastnameForm" name="lastname" value="<?=$lastname?>"> <?php if($formSend)echo"<span class='fa ".( ($lastnameOk)?"fa-check":"fa-times" )." form-control-feedback'></span>" ?> </div> </div> </div> <?php /* PSEUDO utilisé pour bloquer les robots, ne pas afficher. Si le robot rempli ce champs, il est redirigé sur la page success sans envoyer le mail */ ?> <div class="form-group has-feedback pseudoForm"> <label for="pseudoForm">Pseudo</label> <input type="text" class="form-control " id="pseudoForm" name="pseudo" value=""> </div> <div class="form-group has-feedback <?=$addressClass?>"> <label for="addressForm">Adresse</label> <input type="text" class="form-control" id="addressForm" name="address" value="<?=$address?>"> <?php if($formSend)echo"<span class='fa ".( ($addressOk)?"fa-check":"fa-times" )." form-control-feedback'></span>" ?> </div> <div class="row"> <div class="col-sm-5"> <div class="form-group has-feedback <?=$zipCodeClass?>"> <label for="zipCodeForm">Code postal</label> <input type="text" class="form-control" id="zipCodeForm" name="zipCode" placeholder="75001" value="<?=$zipCode?>"> <?php if($formSend)echo"<span class='fa ".( ($zipCodeOk)?"fa-check":"fa-times" )." form-control-feedback'></span>" ?> </div> </div> <div class="col-sm-7"> <div class="form-group has-feedback <?=$cityClass?>"> <label for="cityForm">Ville</label> <input type="text" class="form-control" id="cityForm" name="city" value="<?=$city?>"> <?php if($formSend)echo"<span class='fa ".( ($cityOk)?"fa-check":"fa-times" )." form-control-feedback'></span>" ?> </div> </div> </div> <div class="form-group has-feedback <?=$emailClass?>"> <label for="emailForm">Email</label> <input type="email" class="form-control" id="emailForm" name="email" placeholder="text@exemple.fr" value="<?=$email?>"> <?php if($formSend)echo"<span class='fa ".( ($emailOk)?"fa-check":"fa-times" )." form-control-feedback'></span>" ?> </div> <div class="form-group has-feedback <?=$phoneClass?>"> <label for="phoneForm">Téléphone</label> <input type="text" class="form-control" id="phoneForm" name="phone" placeholder="06 00 00 00 00" value="<?=$phone?>"> <?php if($formSend)echo"<span class='fa ".( ($phoneOk)?"fa-check":"fa-times" )." form-control-feedback'></span>" ?> </div> <div class="form-group has-feedback <?=$messageClass?>"> <label for="messageForm">Informations complémentaires <i>(facultatif)</i></label> <textarea id="messageForm" name="message" class="form-control" rows="6"><?=$message?></textarea> </div> <br> <div class="text-center"> <input name="payment" type="submit" class="btn btn-success" value="Paiement"> </div> </form> </div> <?php else: ?> <p>Votre panier est vide</p> <?php endif ?> </div> <?php end_block(); ?>