From 9561548a1e4048dff6f136b8f02fd6cbb60dd038 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Tue, 24 Feb 2026 02:22:52 +0000 Subject: [PATCH] Autosave: 20260224-022252 --- assets/js/main.js | 24 +++++++- pos.php | 151 ++++++++++++++++++++++++++++++---------------- 2 files changed, 122 insertions(+), 53 deletions(-) diff --git a/assets/js/main.js b/assets/js/main.js index ead9433..45bb5fc 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -582,6 +582,28 @@ document.addEventListener('DOMContentLoaded', () => { updateCart(); }; + window.clearCart = function() { + if (cart.length === 0) return; + Swal.fire({ + title: 'Clear Cart?', + text: "Are you sure you want to remove all items from the cart?", + icon: 'warning', + showCancelButton: true, + confirmButtonColor: '#dc3545', + cancelButtonColor: '#6c757d', + confirmButtonText: 'Yes, clear it!' + }).then((result) => { + if (result.isConfirmed) { + cart = []; + cartDiscountInput.value = 0; + currentOrderId = null; + isLoyaltyRedemption = false; + updateCart(); + showToast("Cart cleared", "success"); + } + }); + }; + // --- Payment Selection Logic --- function renderPaymentMethods() { if (!paymentMethodsContainer) return; @@ -937,4 +959,4 @@ document.addEventListener('DOMContentLoaded', () => { }); }); } -}); +}); \ No newline at end of file diff --git a/pos.php b/pos.php index 457a407..65a908f 100644 --- a/pos.php +++ b/pos.php @@ -252,65 +252,112 @@ if (!$loyalty_settings) { - -
-
-
Current Order
- 0 items -
- - -
-
- - - - -
-
- - -
-
+ +
+ + +
+ +
+ > + - -
-
- -

Cart is empty

+ > + + + > +
-
- -
-
- Subtotal - $0.00 -
-
- VAT (%) - $0.00 -
-
-
Total
-
$0.00
-
- -
-
- +
-
- +
+ + +
+
+ + + +
+
+
+ Loyalty Points + 0 +
+ +
+
+
+
-
+
+ + +
+
+ +

Cart is empty

+
+
+ + +
+
+ Subtotal + +
+ + +
+ Discount +
+ - + +
+
+ +
+ Total + +
+ + +
+ +
+ + +
+
+ +
+ View Only Mode +
+ + +
+ Powered By Abidarcafe @2026 +
+
+