Subbu1304 commited on
Commit
2e5fcc2
·
verified ·
1 Parent(s): 71fc5fd

Update templates/order.html

Browse files
Files changed (1) hide show
  1. templates/order.html +201 -2
templates/order.html CHANGED
@@ -1,5 +1,5 @@
1
  <!DOCTYPE html>
2
- <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -216,4 +216,203 @@
216
  <p>Thank you for dining with us! <span>We look forward to serving you again.</span></p>
217
  </footer>
218
  </body>
219
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <!DOCTYPE html>
2
+ <!-- <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
216
  <p>Thank you for dining with us! <span>We look forward to serving you again.</span></p>
217
  </footer>
218
  </body>
219
+ </html> -->
220
+ <html lang="en">
221
+ <head>
222
+ <meta charset="UTF-8">
223
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
224
+ <title>Order Summary</title>
225
+ <!-- Bootstrap CSS -->
226
+ <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
227
+ <style>
228
+ body {
229
+ font-family: 'Arial', sans-serif;
230
+ background-color: #fdf4e3; /* Updated background color */
231
+ color: #333333; /* Dark gray text */
232
+ margin: 0;
233
+ padding: 0;
234
+ display: flex;
235
+ flex-direction: column;
236
+ min-height: 100vh;
237
+ }
238
+ .order-container {
239
+ max-width: 768px;
240
+ margin: 40px auto;
241
+ padding: 20px;
242
+ background-color: #ffffff; /* Set the container background to white */
243
+ border-radius: 15px;
244
+ box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
245
+ border: 1px solid #ffffff;
246
+ flex-grow: 1;
247
+ }
248
+ .cart-item {
249
+ display: flex;
250
+ justify-content: space-between;
251
+ background-color: #fffcf5; /* Slightly lighter beige */
252
+ border-radius: 8px;
253
+ border: 1px solid #ffe5b4; /* Light orange border */
254
+ padding: 10px;
255
+ margin-bottom: 10px;
256
+ }
257
+ .cart-item img {
258
+ width: 70px;
259
+ height: 70px;
260
+ object-fit: cover;
261
+ border-radius: 5px;
262
+ border: 1px solid #ffcc80; /* Light orange border around images */
263
+ }
264
+ .cart-item-details {
265
+ flex: 1;
266
+ margin-left: 15px;
267
+ }
268
+ .cart-item-title {
269
+ font-size: 1.2rem;
270
+ font-weight: bold;
271
+ color: #000000; /* Change the color to black */
272
+ }
273
+ .cart-item-addons,
274
+ .cart-item-instructions {
275
+ font-size: 0.9rem;
276
+ color: #000000; /* Change the color to black */
277
+ }
278
+ .cart-item-actions {
279
+ font-size: 1.2rem;
280
+ font-weight: bold;
281
+ color: #2b9348;
282
+ }
283
+ .order-summary {
284
+ text-align: right;
285
+ margin-top: 15px;
286
+ }
287
+ .total-price {
288
+ font-size: 1.5rem;
289
+ font-weight: bold;
290
+ color: #2b9348; /* Green for the total price */
291
+ }
292
+ .back-to-menu {
293
+ display: block;
294
+ margin: 30px auto 10px auto;
295
+ padding: 10px 20px;
296
+ background-color: #ff5722;
297
+ color: #ffffff;
298
+ border: none;
299
+ border-radius: 25px;
300
+ font-size: 1rem;
301
+ font-weight: bold;
302
+ text-align: center;
303
+ text-decoration: none;
304
+ width: 100%;
305
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
306
+ transition: background-color 0.3s ease;
307
+ }
308
+ .back-to-menu:hover {
309
+ background-color: #ff5722;
310
+ text-decoration: none;
311
+ }
312
+ footer {
313
+ background-color: #333333;
314
+ color: #ffffff;
315
+ text-align: center;
316
+ padding: 15px 10px;
317
+ margin-top: auto;
318
+ }
319
+ footer p {
320
+ margin: 0;
321
+ font-size: 1rem;
322
+ }
323
+ footer p span {
324
+ color: #ffcc00;
325
+ font-weight: bold;
326
+ }
327
+ .totsl_bill {
328
+ max-width: 768px;
329
+ }
330
+ .yourorder {
331
+ font-family: Serif;
332
+ color: #ff5722; /* Orange color for "Your Order Summary" */
333
+ font-size: 1.5rem; /* Adjusted for better visibility */
334
+ font-weight: bold;
335
+ }
336
+ /* Remove any gap between Sub-Total and Discount */
337
+ .d-flex {
338
+ margin-bottom: 0px !important; /* Remove margin */
339
+ }
340
+ .d-flex:first-child {
341
+ margin-top: 0px !important; /* Ensure no space above Sub-Total */
342
+ }
343
+ /* Remove padding and margins from the individual fields */
344
+ .d-flex .cart-item-actions {
345
+ margin-bottom: 0px !important; /* Remove margin between fields */
346
+ }
347
+ </style>
348
+ </head>
349
+ <body>
350
+ <div class="container">
351
+ <div class="order-container">
352
+ <h4 class="mb-4 text-center yourorder">Your Order Summary</h4>
353
+
354
+ {% if order %}
355
+ {% for line in order.Order_Details__c.split('\n') %}
356
+ {% set item_parts = line.split('|') %}
357
+ <div class="cart-item">
358
+ <!-- Item Image -->
359
+ <img src="{{ item_parts[4].strip().replace('Image:', '') }}"
360
+ alt="{{ item_parts[0].strip() }}"
361
+ onerror="this.src='/static/placeholder.jpg';">
362
+
363
+ <!-- Item Details -->
364
+ <div class="cart-item-details">
365
+ <div class="cart-item-title">{{ item_parts[0].strip() }}</div> <!-- Item Name & Quantity -->
366
+
367
+
368
+ <div class="cart-item-addons">
369
+ <small class="text-muted">Add-ons: {{ item_parts[1].strip().replace('Add-Ons:', '') }}</small>
370
+ </div>
371
+
372
+ <div class="cart-item-instructions">
373
+ <small class="text-muted">Instructions: {{ item_parts[2].strip().replace('Instructions:', '') }}</small>
374
+ </div>
375
+ </div>
376
+
377
+ <!-- Price -->
378
+ <div class="cart-item-actions m">
379
+ <span style="font-size: 16px; margin-right: 13px">{{ item_parts[3].strip().replace('Price:', '') }}</span>
380
+ </div>
381
+ </div>
382
+ {% endfor %}
383
+
384
+ <!-- Total Section -->
385
+ <div class="container mt-5 cart-item">
386
+ <div class="container">
387
+ <div class="d-flex justify-content-between mb-3">
388
+ <p><strong>Sub-Total:</strong></p>
389
+ <p class="cart-item-actions" style="font-size: 16px;">${{ order.Total_Amount__c }}</p>
390
+ </div>
391
+ <div class="d-flex justify-content-between mb-3">
392
+ <p><strong>Discount:</strong></p>
393
+ <p class="cart-item-actions" style="font-size: 16px;">${{ "%.2f"|format(order.Discount__c) }}</p>
394
+ </div>
395
+ <!-- Add dotted line here -->
396
+ <div style="border-bottom: 2px dotted #000; margin-bottom: 10px;"></div>
397
+ <div class="d-flex justify-content-between mb-3">
398
+ <p><strong>Total Bill:</strong></p>
399
+ <p class="cart-item-actions" style="font-size: 16px;">${{ "%.2f"|format(order.Total_Bill__c) }}</p>
400
+ </div>
401
+ </div>
402
+ </div>
403
+
404
+ {% else %}
405
+ <p class="text-center">No order details available.</p>
406
+ {% endif %}
407
+
408
+ <!-- Back to Menu Button -->
409
+ <a href="/menu" class="back-to-menu">Back to Menu</a>
410
+ </div>
411
+ </div>
412
+
413
+ <!-- Footer -->
414
+ <footer>
415
+ <p>Thank you for dining with us! <span>We look forward to serving you again.</span></p>
416
+ </footer>
417
+ </body>
418
+ </html>