This commit is contained in:
Aritra Banik 2024-03-03 15:07:45 +05:30
parent 8bf39bcea6
commit 5b351712a4
4 changed files with 9 additions and 6 deletions

BIN
src/a3

Binary file not shown.

View File

@ -200,16 +200,15 @@ import
form = ctx.urlForm
val: Validity
validity = initTable[string, Validity]()
qParams = ctx.queryParams
cookies = ctx.cookies
email = cookies.getOrDefault("email", "")
password = cookies.getOrDefault("password", "")
productName = qParams.getOrDefault("prod", "")
quantity = parseInt(qParams.getOrDefault("quantity", "0"))
productName = form.getOrDefault("prod", "")
quantity = parseInt(form.getOrDefault("quantity", "0"))
echo ctx.queryParams["prod"]
echo productName
var
country = form["c_country"]

View File

@ -83,6 +83,8 @@
hx-target="#change"
class="row"
>
<input type="hidden" name="prod" value="{{productName}}">
<input type="hidden" name="quantity" value="{{quantity}}">
<div class="col-md-6 mb-5 mb-md-0">
<h2 class="h3 mb-3 text-black">Billing Details</h2>
<div class="p-3 p-lg-5 border">

View File

@ -144,7 +144,9 @@ proc sendCheckOut*(val: Table[string, Validity], total: string): string =
hx-post="/checkout"
hx-target="#change"
class="row"
>
>
<input type="hidden" name="prod" value="{val["prod"].name}">
<input type="hidden" name="quantity" value="{val["quantity"].name}">
<div class="col-md-6 mb-5 mb-md-0">
<h2 class="h3 mb-3 text-black">Billing Details</h2>
<div class="p-3 p-lg-5 border">
@ -479,4 +481,4 @@ proc sendThankYou*(): string=
</div>
</div>
</div>
"""
"""