File size: 1,962 Bytes
ec260dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Final Order - Biryani Hub</title>
    <style>
        body { font-family: Arial, sans-serif; background-color: #f8f8f8; margin: 0; padding: 0; text-align: center; }
        .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; }
        h1 { color: #333; }
        p { font-size: 1.2rem; color: #666; }
        .order-details { margin-top: 20px; font-size: 1.2rem; color: #333; }
        #confirm-btn { margin-top: 20px; padding: 10px 20px; background-color: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer; }
        #confirm-btn:hover { background-color: #45a049; }
    </style>
</head>
<body>
    <div class="order-container">
        <h1>Final Order Confirmation</h1>
        <p>Your order details are as follows:</p>
        <div class="order-details" id="orderDetails">Loading order details...</div>
        <button id="confirm-btn" onclick="confirmOrder()">Confirm Order</button>
    </div>

    <script>
        // Retrieve order details from URL parameters
        const params = new URLSearchParams(window.location.search);
        const orderItem = params.get('item');
        const orderPrice = params.get('price');

        const orderDetailsDiv = document.getElementById('orderDetails');
        if (orderItem && orderPrice) {
            orderDetailsDiv.innerHTML = `Item: <strong>${orderItem}</strong><br>Price: <strong>$${orderPrice}</strong>`;
        } else {
            orderDetailsDiv.innerHTML = 'No order details available.';
        }

        function confirmOrder() {
            alert(`Your order for ${orderItem} has been confirmed!`);
            window.location.href = '/'; // Redirect to home or dashboard
        }
    </script>
</body>
</html>