-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfirmation.php
More file actions
201 lines (156 loc) · 7.56 KB
/
Copy pathconfirmation.php
File metadata and controls
201 lines (156 loc) · 7.56 KB
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<!doctype html>
<html lang="en">
<head>
<title>Confirmation</title>
<!--Bootstrap CDN-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<!--font awesome cdn-->
<script src="https://kit.fontawesome.com/a7d4a476f6.js" crossorigin="anonymous"></script>
<!--Slick Slider-->
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css" />
<!-- Custom Stylesheet-->
<link rel="stylesheet" href="styles/custom-styles.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body>
<?php include("banner.php"); ?>
<?php include("nav.php"); ?>
<div class="container mt-5">
<h3 class="h3">Confirming order (ORDERID?)</h3>
<div class="row py-3 px-4">
<div class="container-fluid" id="cart-holder">
<div class="table-responsive" id="shopping-cart">
<?php
session_start();
if (isset($_SESSION["cart_item"])) {
$total_quantity = 0;
$total_Price = 0;
?>
<div id="cart-header" style="p-10;">
<h5 id="head-text" style="text-align: center;"> <br>Order Summary<br> </h5>
</div>
<table class="table table-sm table-hover" align="center">
<thead class="thead-dark">
<tr>
<th scope="col" style="text-align:center;">Name</th>
<th scope="col" style="text-align:center;">Code</th>
<th scope="col" style="text-align:center;">Amount</th>
<th scope="col" style="text-align:center;">Unit Price</th>
<th scope="col" style="text-align:center;">Price</th>
<th scope="col" style="text-align:center;"></th>
</tr>
</thead>
<?php
foreach ($_SESSION["cart_item"] as $item) {
$item_Price = $item["quantity"] * $item["Price"];
?>
<tr>
<td style="text-align:center;"><a href="item.php?action=item&Code=<?php echo $product_array[$key]["Code"]; ?>"><?php echo $item["Name"]; ?>
</a></td>
<td style="text-align:center;"><a href="item.php?action=item&Code=<?php echo $item["Code"]; ?>"><?php echo $item["Code"]; ?></a></td>
<td style="text-align:center;"><a href="item.php?action=item&Code=<?php echo $item["Code"]; ?>"><?php echo $item["quantity"]; ?></a></td>
<td style="text-align:center;"><a href="item.php?action=item&Code=<?php echo $item["Code"]; ?>"><?php echo "$ " . $item["Price"]; ?></a></td>
<td style="text-align:center;"><a href="item.php?action=item&Code=<?php echo $item["Code"]; ?>"><?php echo "$ " . number_format($item_Price, 2); ?></a></td>
<td style="text-align:center;"><a href="products.php?action=remove&Code=<?php echo $item["Code"]; ?>" class="btnRemoveAction"><i class="fas fa-times" alt="Remove Item"></i></a></td>
</tr>
<?php
$total_quantity += $item["quantity"];
$total_Price += ($item["Price"] * $item["quantity"]);
}
?>
<tr>
<td colspan=2 style="text-align:right;"><b><em>Total: </em></b></td>
<td style="text-align:center;"><b><?php echo $total_quantity; ?></b></td>
<td style="text-align:center;"><strong><?php echo "$ " . number_format($total_Price, 2); ?></strong></td>
<td></td>
</tr>
</table>
</div>
</div>
<?php
} else {
?>
<div class="container" id="no-records">
<div class="no-records-content height: 10%">
<h5 id="head-text" style=" text-align: Center;"> <br><br>Your Cart is Empty! <br> <br><b>(ノಠ益ಠ)ノ彡┻━┻</b></h5>
</div>
</div>
<?php
}
?>
<div class="w-100">
<div class="row">
<div class="col-md">
<h4>Shipping Details</h4>
<form>
<div class="form-group row mt-3">
<div class="col-md">
<div class="border">
<p class="mt-3 mb-3 ml-3 mr-3">
<?php echo $_POST["fName"] . " " . $_POST["lName"]; ?> <br>
<?php echo $_POST["address"] . "<br>";
if ($_POST["address2"] != null)
{
echo $_POST["address2"] . "<br>";
}
echo $_POST["city"] . ", ";
echo $_POST["country"] . "<br>";
echo $_POST["postcode"]; ?>
</p>
</div>
</div>
</div>
</form>
</div>
<div class="col-md">
<h4>Payment</h4>
<form>
<div class="form-group row mt-3">
<div class="col-md">
<div class="border">
<p class="mt-3 mb-3 ml-3 mr-3">
<b>Billing Address</b><br>
<?php echo $_POST["fName"] . " " . $_POST["lName"]; ?> <br>
<?php echo $_POST["address"] . "<br>";
if ($_POST["address2"] != null)
{
echo $_POST["address2"] . "<br>";
}
echo $_POST["city"] . ", ";
echo $_POST["country"] . "<br>";
echo $_POST["postcode"] . "<br><br>"; ?>
<b>Contact</b><br>
<?php echo $_POST["email"];
?>
</p>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="buttonContainer text-center">
<button class="btn btn-primary btn-lg mr-2" type="submit">Confirm Order</button>
<button class="btn btn-secondary btn-lg" type="submit">Cancel Order</button>
</div>
</div>
<!-- Footer starts here -->
<?php
include("footer.php");
?>
<div class="mt-5">
<!-- padding -->
</div>
<!-- Footer ends -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>