Spaces:
Sleeping
Sleeping
Update templates/order.html
Browse files- templates/order.html +78 -105
templates/order.html
CHANGED
@@ -8,111 +8,88 @@
|
|
8 |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
|
9 |
<style>
|
10 |
body {
|
11 |
-
font-family:
|
12 |
-
background-color: #
|
13 |
-
color: #333333; /* Dark gray text */
|
14 |
-
margin: 0;
|
15 |
-
padding: 0;
|
16 |
-
display: flex;
|
17 |
-
flex-direction: column;
|
18 |
-
min-height: 100vh;
|
19 |
}
|
20 |
-
|
21 |
.order-container {
|
22 |
max-width: 768px;
|
23 |
-
margin:
|
24 |
-
padding:
|
25 |
-
background-color: #
|
26 |
-
border-radius:
|
27 |
-
box-shadow: 0
|
28 |
-
border: 1px solid #ffe5b4; /* Light orange border */
|
29 |
-
flex-grow: 1;
|
30 |
}
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
margin-bottom: 20px;
|
38 |
}
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
margin-bottom: 10px;
|
45 |
}
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
font-size: 1rem;
|
52 |
-
|
53 |
-
color: #4a4a4a; /* Medium gray text for readability */
|
54 |
}
|
55 |
-
|
56 |
-
.
|
57 |
-
|
58 |
-
|
59 |
-
background-color: #fffcf5; /* Slightly lighter beige for individual items */
|
60 |
-
border-radius: 8px;
|
61 |
-
border: 1px solid #ffe5b4; /* Light orange border for separation */
|
62 |
-
display: flex;
|
63 |
-
justify-content: space-between;
|
64 |
-
align-items: center;
|
65 |
}
|
66 |
-
|
67 |
-
.order-summary {
|
68 |
-
margin-top: 20px;
|
69 |
font-size: 1.2rem;
|
70 |
-
|
|
|
|
|
71 |
text-align: right;
|
72 |
-
|
73 |
}
|
74 |
-
|
75 |
.total-price {
|
76 |
-
font-size: 1.
|
77 |
-
|
|
|
78 |
}
|
79 |
-
|
80 |
.back-to-menu {
|
81 |
display: block;
|
82 |
margin: 30px auto 10px auto;
|
83 |
-
padding: 10px
|
84 |
-
background-color: #ff5722;
|
85 |
-
color: #ffffff;
|
86 |
border: none;
|
87 |
border-radius: 25px;
|
88 |
font-size: 1rem;
|
89 |
font-weight: bold;
|
90 |
text-align: center;
|
91 |
text-decoration: none;
|
92 |
-
|
|
|
93 |
transition: background-color 0.3s ease;
|
94 |
}
|
95 |
-
|
96 |
.back-to-menu:hover {
|
97 |
-
background-color: #e64a19;
|
98 |
text-decoration: none;
|
99 |
}
|
100 |
-
|
101 |
footer {
|
102 |
-
background-color: #333333;
|
103 |
-
color: #ffffff;
|
104 |
text-align: center;
|
105 |
padding: 15px 10px;
|
106 |
-
margin-top: auto;
|
107 |
}
|
108 |
-
|
109 |
footer p {
|
110 |
margin: 0;
|
111 |
font-size: 1rem;
|
112 |
}
|
113 |
-
|
114 |
footer p span {
|
115 |
-
color: #ffcc00;
|
116 |
font-weight: bold;
|
117 |
}
|
118 |
</style>
|
@@ -120,50 +97,46 @@
|
|
120 |
<body>
|
121 |
<div class="container">
|
122 |
<div class="order-container">
|
123 |
-
<
|
124 |
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
<
|
140 |
-
<p>{{ item_parts[2].strip().replace('Instructions:', '') }}</p> <!-- Instructions -->
|
141 |
-
<p><strong>{{ item_parts[3].strip().replace('Price:', '') }}</strong></p> <!-- Price -->
|
142 |
</div>
|
143 |
-
</div>
|
144 |
-
{% endfor %}
|
145 |
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
-
|
153 |
-
{% if order %}
|
154 |
-
<div class="order-summary mt-4">
|
155 |
-
<span>Total: </span>
|
156 |
-
<span class="total-price">${{ order.Total_Amount__c }}</span>
|
157 |
-
<div class="order-summary mt-4">
|
158 |
-
<span>Discount: </span>
|
159 |
-
<span class="total-price">${{ order.Discount__c }}</span> <!-- Display discount -->
|
160 |
-
</div>
|
161 |
<div class="order-summary mt-4">
|
162 |
-
<
|
163 |
-
|
|
|
164 |
</div>
|
165 |
|
166 |
-
|
|
|
167 |
{% endif %}
|
168 |
|
169 |
<!-- Back to Menu Button -->
|
|
|
8 |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
|
9 |
<style>
|
10 |
body {
|
11 |
+
font-family: Arial, sans-serif;
|
12 |
+
background-color: #f8f9fa;
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
}
|
|
|
14 |
.order-container {
|
15 |
max-width: 768px;
|
16 |
+
margin: 20px auto;
|
17 |
+
padding: 15px;
|
18 |
+
background-color: #fff;
|
19 |
+
border-radius: 10px;
|
20 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
|
|
|
|
21 |
}
|
22 |
+
.cart-item {
|
23 |
+
display: flex;
|
24 |
+
align-items: center;
|
25 |
+
justify-content: space-between;
|
26 |
+
border-bottom: 1px solid #dee2e6;
|
27 |
+
padding: 10px 0;
|
|
|
28 |
}
|
29 |
+
.cart-item img {
|
30 |
+
width: 70px;
|
31 |
+
height: 70px;
|
32 |
+
object-fit: cover;
|
33 |
+
border-radius: 5px;
|
|
|
34 |
}
|
35 |
+
.cart-item-details {
|
36 |
+
flex: 1;
|
37 |
+
margin-left: 15px;
|
38 |
+
}
|
39 |
+
.cart-item-title {
|
40 |
font-size: 1rem;
|
41 |
+
font-weight: bold;
|
|
|
42 |
}
|
43 |
+
.cart-item-addons,
|
44 |
+
.cart-item-instructions {
|
45 |
+
font-size: 0.9rem;
|
46 |
+
color: #6c757d;
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
+
.cart-item-actions {
|
|
|
|
|
49 |
font-size: 1.2rem;
|
50 |
+
color: #007bff;
|
51 |
+
}
|
52 |
+
.order-summary {
|
53 |
text-align: right;
|
54 |
+
margin-top: 15px;
|
55 |
}
|
|
|
56 |
.total-price {
|
57 |
+
font-size: 1.5rem;
|
58 |
+
font-weight: bold;
|
59 |
+
color: #28a745;
|
60 |
}
|
|
|
61 |
.back-to-menu {
|
62 |
display: block;
|
63 |
margin: 30px auto 10px auto;
|
64 |
+
padding: 10px;
|
65 |
+
background-color: #ff5722;
|
66 |
+
color: #ffffff;
|
67 |
border: none;
|
68 |
border-radius: 25px;
|
69 |
font-size: 1rem;
|
70 |
font-weight: bold;
|
71 |
text-align: center;
|
72 |
text-decoration: none;
|
73 |
+
width: 100%;
|
74 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
75 |
transition: background-color 0.3s ease;
|
76 |
}
|
|
|
77 |
.back-to-menu:hover {
|
78 |
+
background-color: #e64a19;
|
79 |
text-decoration: none;
|
80 |
}
|
|
|
81 |
footer {
|
82 |
+
background-color: #333333;
|
83 |
+
color: #ffffff;
|
84 |
text-align: center;
|
85 |
padding: 15px 10px;
|
|
|
86 |
}
|
|
|
87 |
footer p {
|
88 |
margin: 0;
|
89 |
font-size: 1rem;
|
90 |
}
|
|
|
91 |
footer p span {
|
92 |
+
color: #ffcc00;
|
93 |
font-weight: bold;
|
94 |
}
|
95 |
</style>
|
|
|
97 |
<body>
|
98 |
<div class="container">
|
99 |
<div class="order-container">
|
100 |
+
<h4 class="mb-4 text-center">Your Order Summary</h4>
|
101 |
|
102 |
+
{% if order %}
|
103 |
+
{% for line in order.Order_Details__c.split('\n') %}
|
104 |
+
{% set item_parts = line.split('|') %}
|
105 |
+
<div class="cart-item">
|
106 |
+
<!-- Item Image -->
|
107 |
+
<img src="{{ item_parts[4].strip().replace('Image:', '') }}"
|
108 |
+
alt="{{ item_parts[0].strip() }}"
|
109 |
+
onerror="this.src='/static/placeholder.jpg';">
|
110 |
+
|
111 |
+
<!-- Item Details -->
|
112 |
+
<div class="cart-item-details">
|
113 |
+
<div class="cart-item-title">{{ item_parts[0].strip() }}</div> <!-- Item Name & Quantity -->
|
114 |
+
|
115 |
+
<div class="cart-item-addons">
|
116 |
+
<small class="text-muted">Add-ons: {{ item_parts[1].strip().replace('Add-Ons:', '') }}</small>
|
|
|
|
|
117 |
</div>
|
|
|
|
|
118 |
|
119 |
+
<div class="cart-item-instructions">
|
120 |
+
<small class="text-muted">Instructions: {{ item_parts[2].strip().replace('Instructions:', '') }}</small>
|
121 |
+
</div>
|
122 |
+
</div>
|
123 |
+
|
124 |
+
<!-- Price -->
|
125 |
+
<div class="cart-item-actions">
|
126 |
+
<strong>${{ item_parts[3].strip().replace('Price:', '') }}</strong>
|
127 |
+
</div>
|
128 |
+
</div>
|
129 |
+
{% endfor %}
|
130 |
|
131 |
+
<!-- Total Section -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
<div class="order-summary mt-4">
|
133 |
+
<p><strong>Total:</strong> <span class="total-price">${{ order.Total_Amount__c }}</span></p>
|
134 |
+
<p><strong>Discount:</strong> <span class="total-price">${{ order.Discount__c }}</span></p>
|
135 |
+
<p><strong>Total Bill:</strong> <span class="total-price">${{ order.Total_Bill__c }}</span></p>
|
136 |
</div>
|
137 |
|
138 |
+
{% else %}
|
139 |
+
<p class="text-center">No order details available.</p>
|
140 |
{% endif %}
|
141 |
|
142 |
<!-- Back to Menu Button -->
|