Spaces:
Running
Running
Update templates/final_order.html
Browse files- templates/final_order.html +25 -26
templates/final_order.html
CHANGED
@@ -3,42 +3,41 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>Final Order
|
7 |
<style>
|
8 |
-
body {
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
.order-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
15 |
</style>
|
16 |
</head>
|
17 |
<body>
|
18 |
-
<div class="order-
|
19 |
-
<
|
20 |
-
<
|
21 |
-
<
|
22 |
-
<button id="confirm-btn" onclick="confirmOrder()">Confirm Order</button>
|
23 |
</div>
|
24 |
|
25 |
<script>
|
26 |
-
// Retrieve order
|
27 |
-
const
|
28 |
-
|
29 |
-
|
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 |
-
|
36 |
}
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
window.location.href = '/'; // Redirect to home or dashboard
|
41 |
}
|
|
|
42 |
</script>
|
43 |
</body>
|
44 |
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Final Order</title>
|
7 |
<style>
|
8 |
+
body {
|
9 |
+
font-family: Arial, sans-serif;
|
10 |
+
margin: 20px;
|
11 |
+
}
|
12 |
+
.order-summary {
|
13 |
+
padding: 15px;
|
14 |
+
border: 1px solid #ddd;
|
15 |
+
border-radius: 8px;
|
16 |
+
background-color: #f9f9f9;
|
17 |
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
18 |
+
}
|
19 |
</style>
|
20 |
</head>
|
21 |
<body>
|
22 |
+
<div class="order-summary">
|
23 |
+
<h2>Final Order Summary</h2>
|
24 |
+
<div id="order-details"></div>
|
25 |
+
<button onclick="goBack()">Go Back to Menu</button>
|
|
|
26 |
</div>
|
27 |
|
28 |
<script>
|
29 |
+
// Retrieve the final order summary from session storage
|
30 |
+
const summary = sessionStorage.getItem('finalOrderSummary');
|
31 |
+
if (summary) {
|
32 |
+
document.getElementById('order-details').innerHTML = summary;
|
|
|
|
|
|
|
|
|
33 |
} else {
|
34 |
+
document.getElementById('order-details').innerHTML = "<p>No order found.</p>";
|
35 |
}
|
36 |
+
// Go back to the menu page
|
37 |
+
function goBack() {
|
38 |
+
window.location.href = "/index.html"; // Ensure this is the menu page
|
|
|
39 |
}
|
40 |
+
|
41 |
</script>
|
42 |
</body>
|
43 |
</html>
|