From 5cf21fcb8c91896bb2b889dd4a90cc0b2ef3e9e5 Mon Sep 17 00:00:00 2001 From: unwox Date: Mon, 13 Oct 2025 21:04:15 +0600 Subject: finishing touches for shop functionality --- pages/shop/cart/add.fnl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pages/shop/cart/add.fnl') 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) -- cgit v1.2.3