summaryrefslogtreecommitdiff
path: root/pages/shop/cart/add.fnl
diff options
context:
space:
mode:
authorunwox <me@unwox.com>2025-10-13 21:04:15 +0600
committerunwox <me@unwox.com>2025-10-13 23:11:20 +0600
commit5cf21fcb8c91896bb2b889dd4a90cc0b2ef3e9e5 (patch)
tree05826ed8beb78c736c94158ebe37d67063e38438 /pages/shop/cart/add.fnl
parenta7c25a5513e32669978b8e07fc9c61bd15cbdb02 (diff)
finishing touches for shop functionality
Diffstat (limited to 'pages/shop/cart/add.fnl')
-rw-r--r--pages/shop/cart/add.fnl3
1 files changed, 2 insertions, 1 deletions
diff --git a/pages/shop/cart/add.fnl b/pages/shop/cart/add.fnl
index 53366b4..b276608 100644
--- a/pages/shop/cart/add.fnl
+++ b/pages/shop/cart/add.fnl
@@ -19,7 +19,8 @@
(let [body-values (lib.parse-values request.body)]
(if (and order-id request.body
- (< 0 (tonumber body-values.quantity)))
+ (< 0 (tonumber body-values.quantity))
+ (not (shop.in-basket? db order-id body-values.name)))
(do
(shop.create-order-line
db order-id body-values.name body-values.quantity)