This commit is contained in:
Aritra Banik 2024-03-09 15:57:14 +05:30
parent 61e0dc1c9c
commit 421dbf8500
2 changed files with 0 additions and 13 deletions

View File

@ -4,7 +4,6 @@ import
os, os,
nimja/parser, nimja/parser,
strutils, strutils,
strformat,
./a3pkg/[models, mics, htmx], ./a3pkg/[models, mics, htmx],
./a3c/[products, users, cart, orders] ./a3c/[products, users, cart, orders]
@ -162,13 +161,6 @@ import
if email != "": if email != "":
productCount = micsCartProductCount(email, password) productCount = micsCartProductCount(email, password)
# var
# userId = db.getUserId(email, password)
# if userId != 0: # Check if user ID is valid (not 0)
# cart = db.getUserCart(userId)
# for c, d in cart:
# var product = db.getProductById(d.productId)
# products.add(product)
if productName == "" and email == "": if productName == "" and email == "":
ctx.redirect("/login") ctx.redirect("/login")
@ -187,7 +179,6 @@ import
ch = "d" ch = "d"
else: else:
# ctx.redirect("/login")
var var
userId = db.getUserId(email, password) userId = db.getUserId(email, password)
cart = db.getUserCart(userId) cart = db.getUserCart(userId)

View File

@ -106,9 +106,5 @@
</div> </div>
</div> </div>
</div> </div>
{# <script>
</script> #}
{% endblock %} {% endblock %}