-
Notifications
You must be signed in to change notification settings - Fork 1
/
checkout.php
152 lines (138 loc) · 5.54 KB
/
checkout.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php include "header.php"; ?>
<!-- BREADCRUMB -->
<div id="breadcrumb" class="section">
<!-- container -->
<div class="container">
<!-- row -->
<div class="row">
<div class="col-md-12">
<h3 class="breadcrumb-header">Checkout</h3>
<ul class="breadcrumb-tree">
<li><a href="#">Home</a></li>
<li class="active">Checkout</li>
</ul>
</div>
</div>
<!-- /row -->
</div>
<!-- /container -->
</div>
<!-- /BREADCRUMB -->
<!-- SECTION -->
<div class="section">
<!-- container -->
<div class="container">
<!-- row -->
<?php
if (isset($_SESSION['user'])) {
$check = $user->check($_SESSION['user']);
foreach ($check as $values1) {
$total = $cart->countPrice($values1['user_id']);
foreach ($total as $value2) {
$getAllCart = $cart->getAllCart();
foreach ($getAllCart as $value3)
?>
<form action="addbill.php?user_id=<?php echo $values1['user_id'] ?>" method="POST">
<div class="row">
<div class="col-md-7">
<!-- Billing Details -->
<div class="billing-details">
<div class="section-title">
<h3 class="title">Billing address</h3>
</div>
<div class="form-group">
<input class="input" type="text" name="fullname" placeholder="Fullname">
</div>
<div class="form-group">
<input class="input" type="text" name="address" placeholder="Address">
</div>
<div class="form-group">
<input class="input" type="tel" name="tel" placeholder="Telephone">
</div>
<div class="form-group">
<textarea class="input" placeholder="Order Notes" name="note"></textarea>
</div>
</div>
<!-- /Billing Details -->
</div>
<!-- Order Details -->
<div class="col-md-5 order-details">
<div class="section-title text-center">
<h3 class="title">Your Order</h3>
</div>
<div class="order-summary">
<div class="order-col">
<div><strong>PRODUCT</strong></div>
<div><strong>TOTAL</strong></div>
</div>
<div class="order-products">
<?php $checkCart = $cart->checkCart($_SESSION['user']);
foreach ($checkCart as $values) {
?>
<div class="order-col">
<div><?php echo $values['qty'] ?>x <?php echo $values['name'] ?></div>
<div><?php echo number_format($values['qty'] * $values['price']); ?>VND</div>
</div>
<?php
} ?>
</div>
<div class="order-col">
<div>Shiping</div>
<div><strong>FREE</strong></div>
</div>
<div class="order-col">
<div><strong>TOTAL</strong></div>
<div><strong class="order-total"><?php echo number_format($value2['total1']); ?>VND</strong>
</div>
</div>
</div>
<button type="submit" name="submit" class="primary-btn order-submit">Place
order</button>
<?php }
}
} ?>
</div>
<!-- /Order Details -->
</div>
</form>
<!-- /row -->
</div>
<!-- /container -->
</div>
<!-- /SECTION -->
<!-- NEWSLETTER -->
<div id="newsletter" class="section">
<!-- container -->
<div class="container">
<!-- row -->
<div class="row">
<div class="col-md-12">
<div class="newsletter">
<p>Sign Up for the <strong>NEWSLETTER</strong></p>
<form>
<input class="input" type="email" placeholder="Enter Your Email">
<button class="newsletter-btn"><i class="fa fa-envelope"></i> Subscribe</button>
</form>
<ul class="newsletter-follow">
<li>
<a href="#"><i class="fa fa-facebook"></i></a>
</li>
<li>
<a href="#"><i class="fa fa-twitter"></i></a>
</li>
<li>
<a href="#"><i class="fa fa-instagram"></i></a>
</li>
<li>
<a href="#"><i class="fa fa-pinterest"></i></a>
</li>
</ul>
</div>
</div>
</div>
<!-- /row -->
</div>
<!-- /container -->
</div>
<!-- /NEWSLETTER -->
<?php include "footer.html"; ?>