Spaces:
Sleeping
Sleeping
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Order Summary</title> | |
<!-- Bootstrap CSS --> | |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
background-color: #f8f9fa; | |
} | |
.order-container { | |
max-width: 768px; | |
margin: 20px auto; | |
padding: 15px; | |
background-color: #fff; | |
border-radius: 10px; | |
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); | |
} | |
.cart-item { | |
display: flex; | |
align-items: center; | |
justify-content: space-between; | |
border-bottom: 1px solid #dee2e6; | |
padding: 10px 0; | |
} | |
.cart-item img { | |
width: 70px; | |
height: 70px; | |
object-fit: cover; | |
border-radius: 5px; | |
} | |
.cart-item-details { | |
flex: 1; | |
margin-left: 15px; | |
} | |
.cart-item-title { | |
font-size: 1rem; | |
font-weight: bold; | |
} | |
.cart-item-addons, | |
.cart-item-instructions { | |
font-size: 0.9rem; | |
color: #6c757d; | |
} | |
.cart-item-actions { | |
font-size: 1.2rem; | |
color: #007bff; | |
} | |
.order-summary { | |
text-align: right; | |
margin-top: 15px; | |
} | |
.total-price { | |
font-size: 1.5rem; | |
font-weight: bold; | |
color: #28a745; | |
} | |
.back-to-menu { | |
display: block; | |
margin: 30px auto 10px auto; | |
padding: 10px; | |
background-color: #ff5722; | |
color: #ffffff; | |
border: none; | |
border-radius: 25px; | |
font-size: 1rem; | |
font-weight: bold; | |
text-align: center; | |
text-decoration: none; | |
width: 100%; | |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | |
transition: background-color 0.3s ease; | |
} | |
.back-to-menu:hover { | |
background-color: #e64a19; | |
text-decoration: none; | |
} | |
footer { | |
background-color: #333333; | |
color: #ffffff; | |
text-align: center; | |
padding: 15px 10px; | |
} | |
footer p { | |
margin: 0; | |
font-size: 1rem; | |
} | |
footer p span { | |
color: #ffcc00; | |
font-weight: bold; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="order-container"> | |
<h4 class="mb-4 text-center">Your Order Summary</h4> | |
{% if order %} | |
{% for line in order.Order_Details__c.split('\n') %} | |
{% set item_parts = line.split('|') %} | |
<div class="cart-item"> | |
<!-- Item Image --> | |
<img src="{{ item_parts[4].strip().replace('Image:', '') }}" | |
alt="{{ item_parts[0].strip() }}" | |
onerror="this.src='/static/placeholder.jpg';"> | |
<!-- Item Details --> | |
<div class="cart-item-details"> | |
<div class="cart-item-title">{{ item_parts[0].strip() }}</div> <!-- Item Name & Quantity --> | |
<div class="cart-item-addons"> | |
<small class="text-muted">Add-ons: {{ item_parts[1].strip().replace('Add-Ons:', '') }}</small> | |
</div> | |
<div class="cart-item-instructions"> | |
<small class="text-muted">Instructions: {{ item_parts[2].strip().replace('Instructions:', '') }}</small> | |
</div> | |
</div> | |
<!-- Price --> | |
<div class="cart-item-actions"> | |
<strong>${{ item_parts[3].strip().replace('Price:', '') }}</strong> | |
</div> | |
</div> | |
{% endfor %} | |
<!-- Total Section --> | |
<div class="order-summary mt-4"> | |
<p><strong>Total:</strong> <span class="total-price">${{ order.Total_Amount__c }}</span></p> | |
<p><strong>Discount:</strong> <span class="total-price">${{ order.Discount__c }}</span></p> | |
<p><strong>Total Bill:</strong> <span class="total-price">${{ order.Total_Bill__c }}</span></p> | |
</div> | |
{% else %} | |
<p class="text-center">No order details available.</p> | |
{% endif %} | |
<!-- Back to Menu Button --> | |
<a href="/menu" class="back-to-menu">Back to Menu</a> | |
</div> | |
</div> | |
<!-- Footer --> | |
<footer> | |
<p>Thank you for dining with us! <span>We look forward to serving you again.</span></p> | |
</footer> | |
</body> | |
</html> | |