nagasurendra commited on
Commit
581cda8
·
verified ·
1 Parent(s): 5b55110

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -1
app.py CHANGED
@@ -256,7 +256,30 @@ def modal_js():
256
  }
257
  function proceedToCheckout() {
258
  const finalOrder = window.open('', '_blank');
259
- finalOrder.document.write('${proceed_to_checkout(cart)}');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  }
261
  </script>
262
  """
 
256
  }
257
  function proceedToCheckout() {
258
  const finalOrder = window.open('', '_blank');
259
+
260
+ const orderSummary = `
261
+ <html>
262
+ <head><title>Order Summary</title></head>
263
+ <body>
264
+ <h2>Your Final Order</h2>
265
+ <ul>
266
+ ${cart.map(item => `
267
+ <li>${item.name} (x${item.quantity}) - $${item.totalCost}</li>
268
+ `).join('')}
269
+ </ul>
270
+ <h3>Total Bill: $${totalCartCost.toFixed(2)}</h3>
271
+ </body>
272
+ </html>
273
+ `;
274
+
275
+ finalOrder.document.write(orderSummary);
276
+ finalOrder.document.close();
277
+ }
278
+
279
+ // Reset all selected add-ons when opening a new item modal
280
+ function resetAddOns() {
281
+ const checkboxes = document.querySelectorAll('input[name="biryani-extra"]');
282
+ checkboxes.forEach(checkbox => checkbox.checked = false); // Uncheck all add-ons
283
  }
284
  </script>
285
  """