summaryrefslogtreecommitdiff
path: root/pages/shop/cart
diff options
context:
space:
mode:
Diffstat (limited to 'pages/shop/cart')
-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)