-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckout_success.php
More file actions
146 lines (128 loc) · 3.23 KB
/
checkout_success.php
File metadata and controls
146 lines (128 loc) · 3.23 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
<?php
session_start();
// Function to calculate total price of items in cart
function calculateTotal() {
$total = 0;
if (!empty($_SESSION['cart'])) {
foreach ($_SESSION['cart'] as $item) {
$total += $item['rent_price'] * $item['quantity'];
}
}
return $total;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Checkout Success</title>
<style>
/* CSS styles for Checkout Success */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: #fff;
padding: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
display: flex;
align-items: center;
}
.logo img {
width: 50px;
height: auto;
margin-right: 1rem;
}
.logo h1 {
font-size: 2rem;
margin: 0;
font-weight: 600;
color: #fff;
}
nav {
display: flex;
align-items: center;
}
nav a {
color: #fff;
text-decoration: none;
margin-left: 1rem;
font-size: 1.2rem;
}
nav a:hover {
text-decoration: underline;
}
.container {
width: 80%;
margin: 20px auto;
text-align: center;
}
.success-message {
border: 1px solid #4CAF50;
background-color: #f2f2f2;
color: #4CAF50;
padding: 20px;
margin-bottom: 20px;
}
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px;
position: fixed;
bottom: 0;
width: 100%;
}
nav {
background-color: #333;
color: #fff;
padding: 10px;
text-align: center;
}
nav ul {
list-style: none;
margin: 0;
padding: 0;
}
nav ul li {
display: inline;
margin-right: 20px;
}
nav ul li a {
color: #fff;
text-decoration: none;
}
</style>
</head>
<body>
<header>
<img src="logo.png" alt="Logo" width="100px">
<h1>Rental rush</h1>
<nav>
<ul>
<li><a href="home.php">Home</a></li>
<li><a href="products.php">Products</a></li>
<!-- Add more navigation links as needed -->
</ul>
</nav>
</header>
<div class="container">
<div class="success-message">
<h2>Thank you for your order!</h2>
<p>Your order has been successfully processed.</p>
<p>Total Amount Paid: ₹<?php echo number_format(calculateTotal(), 2); ?></p>
</div>
</div>
<footer>
<p>© <?php echo date('Y'); ?> Rental-rush. All rights reserved.</p>
</footer>
</body>
</html>