Spaces:
Sleeping
Sleeping
Update templates/menu.html
Browse files- templates/menu.html +7 -2
templates/menu.html
CHANGED
@@ -155,6 +155,10 @@
|
|
155 |
<h6>Add-ons</h6>
|
156 |
<div id="addons-list" class="addons-container">Loading add-ons...</div>
|
157 |
</div>
|
|
|
|
|
|
|
|
|
158 |
</div>
|
159 |
<div class="modal-footer">
|
160 |
<button type="button" class="btn btn-primary" onclick="addToCartFromModal()">Add to Cart</button>
|
@@ -209,7 +213,7 @@
|
|
209 |
name: addon.getAttribute('data-name'), // Add-on name
|
210 |
price: parseFloat(addon.getAttribute('data-price')) // Add-on price
|
211 |
}));
|
212 |
-
|
213 |
// Ensure itemName and itemPrice are present
|
214 |
if (!itemName || !itemPrice) {
|
215 |
alert('Failed to add item to cart. Please try again.');
|
@@ -221,7 +225,8 @@
|
|
221 |
itemName: itemName, // Food item name
|
222 |
itemPrice: itemPrice,
|
223 |
itemImage: itemImage, // Image URL
|
224 |
-
addons: selectedAddOns
|
|
|
225 |
};
|
226 |
|
227 |
// Send the payload to the server
|
|
|
155 |
<h6>Add-ons</h6>
|
156 |
<div id="addons-list" class="addons-container">Loading add-ons...</div>
|
157 |
</div>
|
158 |
+
<div class="mt-4">
|
159 |
+
<h6>Special Instructions</h6>
|
160 |
+
<textarea id="modal-instructions" class="form-control" placeholder="Enter any special instructions here..."></textarea>
|
161 |
+
</div>
|
162 |
</div>
|
163 |
<div class="modal-footer">
|
164 |
<button type="button" class="btn btn-primary" onclick="addToCartFromModal()">Add to Cart</button>
|
|
|
213 |
name: addon.getAttribute('data-name'), // Add-on name
|
214 |
price: parseFloat(addon.getAttribute('data-price')) // Add-on price
|
215 |
}));
|
216 |
+
const instructions = document.getElementById('modal-instructions').value;
|
217 |
// Ensure itemName and itemPrice are present
|
218 |
if (!itemName || !itemPrice) {
|
219 |
alert('Failed to add item to cart. Please try again.');
|
|
|
225 |
itemName: itemName, // Food item name
|
226 |
itemPrice: itemPrice,
|
227 |
itemImage: itemImage, // Image URL
|
228 |
+
addons: selectedAddOns,
|
229 |
+
instructions: instructions
|
230 |
};
|
231 |
|
232 |
// Send the payload to the server
|