lokesh341 commited on
Commit
bddcee1
·
verified ·
1 Parent(s): 10d815c

Update templates/final_order.html

Browse files
Files changed (1) hide show
  1. 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 - 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>
 
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>