This commit is contained in:
Aritra Banik 2024-03-03 15:14:55 +05:30
parent 5b351712a4
commit e39e69fb47
3 changed files with 0 additions and 13 deletions

Binary file not shown.

BIN
src/a3

Binary file not shown.

View File

@ -208,8 +208,6 @@ import
productName = form.getOrDefault("prod", "") productName = form.getOrDefault("prod", "")
quantity = parseInt(form.getOrDefault("quantity", "0")) quantity = parseInt(form.getOrDefault("quantity", "0"))
echo productName
var var
country = form["c_country"] country = form["c_country"]
firstName = form["c_fname"] firstName = form["c_fname"]
@ -220,16 +218,12 @@ import
email1 = form["c_email_address"] email1 = form["c_email_address"]
phone = form["c_phone"] phone = form["c_phone"]
password1: string password1: string
echo 3
password1 = form.getOrDefault("password", "") password1 = form.getOrDefault("password", "")
if email != "": if email != "":
productCount = micsCartProductCount(email, password) productCount = micsCartProductCount(email, password)
echo 4
if country != "" and firstName != "" and lastName != "" and address != "" and state != "" and zip != "" and email != "" and phone != "": if country != "" and firstName != "" and lastName != "" and address != "" and state != "" and zip != "" and email != "" and phone != "":
var var
userId = db.getUserId(email, password) userId = db.getUserId(email, password)
@ -263,8 +257,6 @@ import
ctx.send(sendThankYou()) ctx.send(sendThankYou())
else: else:
echo 5
for a, b in form: for a, b in form:
if form[a] == "": if form[a] == "":
@ -278,8 +270,6 @@ import
val.mark = "" val.mark = ""
validity[a] = val validity[a] = val
echo productName
if productName == "": if productName == "":
var var
userId = db.getUserId(email, password) userId = db.getUserId(email, password)
@ -295,11 +285,8 @@ import
ca: Cart ca: Cart
product.id = 1 product.id = 1
echo product
product.name = productName product.name = productName
echo product
product.price = db.getPriceByProductName(productName) product.price = db.getPriceByProductName(productName)
echo product
ca.quantity = quantity ca.quantity = quantity
products.add(product) products.add(product)
cart.add(ca) cart.add(ca)