Spaces:
Sleeping
Sleeping
Create final_order.html
Browse files- templates/final_order.html +44 -0
templates/final_order.html
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Final Order - Biryani Hub</title>
|
7 |
+
<style>
|
8 |
+
body { font-family: Arial, sans-serif; background-color: #f8f8f8; margin: 0; padding: 0; text-align: center; }
|
9 |
+
.order-container { margin-top: 50px; background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); display: inline-block; }
|
10 |
+
h1 { color: #333; }
|
11 |
+
p { font-size: 1.2rem; color: #666; }
|
12 |
+
.order-details { margin-top: 20px; font-size: 1.2rem; color: #333; }
|
13 |
+
#confirm-btn { margin-top: 20px; padding: 10px 20px; background-color: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer; }
|
14 |
+
#confirm-btn:hover { background-color: #45a049; }
|
15 |
+
</style>
|
16 |
+
</head>
|
17 |
+
<body>
|
18 |
+
<div class="order-container">
|
19 |
+
<h1>Final Order Confirmation</h1>
|
20 |
+
<p>Your order details are as follows:</p>
|
21 |
+
<div class="order-details" id="orderDetails">Loading order details...</div>
|
22 |
+
<button id="confirm-btn" onclick="confirmOrder()">Confirm Order</button>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
<script>
|
26 |
+
// Retrieve order details from URL parameters
|
27 |
+
const params = new URLSearchParams(window.location.search);
|
28 |
+
const orderItem = params.get('item');
|
29 |
+
const orderPrice = params.get('price');
|
30 |
+
|
31 |
+
const orderDetailsDiv = document.getElementById('orderDetails');
|
32 |
+
if (orderItem && orderPrice) {
|
33 |
+
orderDetailsDiv.innerHTML = `Item: <strong>${orderItem}</strong><br>Price: <strong>$${orderPrice}</strong>`;
|
34 |
+
} else {
|
35 |
+
orderDetailsDiv.innerHTML = 'No order details available.';
|
36 |
+
}
|
37 |
+
|
38 |
+
function confirmOrder() {
|
39 |
+
alert(`Your order for ${orderItem} has been confirmed!`);
|
40 |
+
window.location.href = '/'; // Redirect to home or dashboard
|
41 |
+
}
|
42 |
+
</script>
|
43 |
+
</body>
|
44 |
+
</html>
|