-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcart.php
113 lines (85 loc) · 2.81 KB
/
cart.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
include('templates/header.php');
include('functions/my-functions.php');
include('functions/my_products.php');
?>
<!--Variables Produit -->
<?php
$id = $_POST ['id'];
$quantity = $_POST ['quantity'];
$name = $id['name'];
$prix = $id['price'] * $quantity;
$PHT = priceExcludingTVA($prix);
$TVA = $prix - $PHT;
$weight = $id['weight'] * $quantity;
?>
<!-- Variables transporteur -->
<?php
//$idtrans = isset($_POST['idtr']) ? $_POST['idtr'] : '1';
//$select_transp = getTransporteur($idtrans);
//$name_trans = $select_transp['name'];
//$prix_livraison = fraisdelivraison($weight, $select_transp);
//$prix_ttc = $PHT + $TVA + $prix_livraison;
?>
<!-- / Variables -->
<table class="panier">
<tr class="en-tete">
<td>Produit</td>
<td>Prix unitaire</td>
<td>Quantité</td>
<td>Total</td>
</tr>
<tr>
<td><?php echo $name ?></td>
<td><?php echo formatPrice($prix_discount) ?> €</td>
<td><?php echo $quantity ?></td>
<td><?php echo formatPrice($prix) ?> €</td>
</tr>
<tr>
<td colspan="2"></td>
<td class="en-tete-opt ">Total HT</td>
<td class="tva"><?php echo formatPrice($PHT) ?> €</td>
</tr>
<tr>
<td colspan="2"></td>
<td class="en-tete-opt ">TVA</td>
<td class="tva"><?php echo formatPrice($TVA) ?> €</td>
</tr>
<tr>
<td COLSPAN="2" class="en-tete">Choix du transporteur</td>
</tr>
<!--Transporteur-->
<tr>
<form action="cart.php" method="POST">
<td colspan="2">
<div class="select">
<label for="transport"></label>
<select type='hidden' name="idtr" id="idtr">
<option value="0" disabled selected hidden>Séléctionnez votre transporteur</option>
<option value="1">Fanny Corp'</option>
<option value="2">Guénaël Corp'</option>
<option value="3">ChouchouBeignet'</option>
</select>
</div>
<input type="hidden" name="id" value="<?php echo $_POST ['id'] ?>">
<input type="hidden" name="quantity" value="<?php echo $_POST ['quantity'] ?>">
</td>
<td colspan="2">
<button class="cta">Commander</button>
</td>
</form>
</tr>
<!-- <tr>-->
<!-- <td colspan="2"></td>-->
<!-- <td>Transport</td>-->
<!-- <td>--><?php //echo $prix_livraison ?><!--</td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td colspan="2"></td>-->
<!-- <td class="en-tete">Total TTC</td>-->
<!-- <td>--><?php //echo formatPrice($prix_ttc) ?><!-- €</td>-->
<!-- </tr>-->
<!--Transporteur-->
</table>
<?php ?>
<?php include('templates/footer.php'); ?>