nagasurendra commited on
Commit
e62c014
·
verified ·
1 Parent(s): 3b1a4d2

Update templates/order.html

Browse files
Files changed (1) hide show
  1. 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: 'Arial', sans-serif;
12
- background-color: #fdf4e3; /* Light cream background */
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: 40px auto;
24
- padding: 20px;
25
- background-color: #ffffff; /* White card background */
26
- border-radius: 15px;
27
- box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); /* Subtle shadow for modern look */
28
- border: 1px solid #ffe5b4; /* Light orange border */
29
- flex-grow: 1;
30
  }
31
-
32
- .order-title {
33
- font-size: 2rem;
34
- font-weight: bold;
35
- color: #c04e01; /* Warm orange color for the title */
36
- text-align: center;
37
- margin-bottom: 20px;
38
  }
39
-
40
- .section-title {
41
- font-size: 1.5rem;
42
- font-weight: bold;
43
- color: #555555; /* Slightly lighter dark gray */
44
- margin-bottom: 10px;
45
  }
46
-
47
- .order-details {
48
- background-color: #fff5e1; /* Soft beige for the details section */
49
- border-radius: 10px;
50
- padding: 15px;
51
  font-size: 1rem;
52
- line-height: 1.8;
53
- color: #4a4a4a; /* Medium gray text for readability */
54
  }
55
-
56
- .order-item {
57
- margin-bottom: 10px;
58
- padding: 10px;
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
- font-weight: bold;
 
 
71
  text-align: right;
72
- color: #333333; /* Dark gray */
73
  }
74
-
75
  .total-price {
76
- font-size: 1.8rem;
77
- color: #2b9348; /* Green for the total price */
 
78
  }
79
-
80
  .back-to-menu {
81
  display: block;
82
  margin: 30px auto 10px auto;
83
- padding: 10px 20px;
84
- background-color: #ff5722; /* Bright orange button */
85
- color: #ffffff; /* White text */
86
  border: none;
87
  border-radius: 25px;
88
  font-size: 1rem;
89
  font-weight: bold;
90
  text-align: center;
91
  text-decoration: none;
92
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle button shadow */
 
93
  transition: background-color 0.3s ease;
94
  }
95
-
96
  .back-to-menu:hover {
97
- background-color: #e64a19; /* Darker orange on hover */
98
  text-decoration: none;
99
  }
100
-
101
  footer {
102
- background-color: #333333; /* Dark gray background */
103
- color: #ffffff; /* White text */
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; /* Golden highlight for the message */
116
  font-weight: bold;
117
  }
118
  </style>
@@ -120,50 +97,46 @@
120
  <body>
121
  <div class="container">
122
  <div class="order-container">
123
- <h2 class="order-title">Your Order Summary</h2>
124
 
125
- <!-- Items Section -->
126
- <div>
127
- <h3 class="section-title">Order Details:</h3>
128
- {% if order %}
129
- <div class="order-details">
130
- {% for line in order.Order_Details__c.split('\n') %}
131
- {% set item_parts = line.split('|') %}
132
- <div class="order-item">
133
- <img src="{{ item_parts[4].strip().replace('Image:', '') }}"
134
- alt="{{ item_parts[0].strip() }}"
135
- onerror="this.src='/static/placeholder.jpg';"
136
- width="60" height="60">
137
- <div>
138
- <strong>{{ item_parts[0].strip() }}</strong> <!-- Item Name & Quantity -->
139
- <p>{{ item_parts[1].strip().replace('Add-Ons:', '') }}</p> <!-- Add-Ons -->
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
- </div>
147
- {% else %}
148
- <p>No order details available.</p>
149
- {% endif %}
150
- </div>
 
 
 
 
 
 
151
 
152
- <!-- Total Section -->
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
- <span>Total Bill: </span>
163
- <span class="total-price">${{ order.Total_Bill__c }}</span> <!-- Display total bill -->
 
164
  </div>
165
 
166
- </div>
 
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 -->