083
This commit is contained in:
parent
391a47d4eb
commit
5a1ec3c3ee
BIN
db5.sqlite3
BIN
db5.sqlite3
Binary file not shown.
@ -129,13 +129,13 @@ proc sendPhone*(phone: string, input: Validity): string =
|
||||
</div>
|
||||
"""
|
||||
|
||||
proc sendCheckOut*(val: Table[string, Validity], total: string): string =
|
||||
proc sendCheckOut*(val: Table[string, Validity], total: string, productName: string, quantity: int): string =
|
||||
result = fmt"""
|
||||
<div class="container" id="change">
|
||||
<div class="row mb-5">
|
||||
<div class="col-md-12">
|
||||
<div class="border p-4 rounded" role="alert">
|
||||
Returning customer? <a href="/login?prod={{productName}}&quantity={{quantity}}" onclick="login()">Click here</a> to login
|
||||
Returning customer? <a href="/login?prod={productName}&quantity={quantity}" onclick="login()">Click here</a> to login
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,7 +22,6 @@ proc validationCheckOut*(ctx: Context) =
|
||||
productName = form.getOrDefault("prod", "")
|
||||
quantity = parseInt(form.getOrDefault("quantity", "0"))
|
||||
|
||||
var
|
||||
country = form["c_country"]
|
||||
firstName = form["c_fname"]
|
||||
lastName = form["c_lname"]
|
||||
@ -107,7 +106,7 @@ proc validationCheckOut*(ctx: Context) =
|
||||
products.add(product)
|
||||
cart.add(ca)
|
||||
|
||||
ctx.send(sendCheckOut(validity, totalPriceHTML(products, cart)))
|
||||
ctx.send(sendCheckOut(validity, totalPriceHTML(products, cart), productName, quantity))
|
||||
|
||||
proc validationLName*(ctx: Context) =
|
||||
var lname = ctx.urlForm["c_lname"]
|
||||
@ -195,4 +194,4 @@ proc validationCountry*(ctx: Context) =
|
||||
else:
|
||||
val.message = ""
|
||||
val.mark = ""
|
||||
ctx.send sendCountry(country, val)
|
||||
ctx.send sendCountry(country, val)
|
||||
|
Loading…
Reference in New Issue
Block a user