032
This commit is contained in:
parent
b5b52e8be0
commit
cb6806ebc6
BIN
db5.sqlite3
BIN
db5.sqlite3
Binary file not shown.
15
src/a3.nim
15
src/a3.nim
@ -261,6 +261,9 @@ import
|
||||
phoneError = ""
|
||||
passwordError = ""
|
||||
ch = ""
|
||||
echo "hi"
|
||||
echo ctx.urlForm
|
||||
echo "bye"
|
||||
|
||||
try:
|
||||
email = ctx.cookies["email"]
|
||||
@ -453,10 +456,18 @@ import
|
||||
password = ""
|
||||
|
||||
if email == "":
|
||||
echo "No cookie found."
|
||||
ctx.redirect("/login")
|
||||
else:
|
||||
products = micsGetProducts(email, password)
|
||||
echo "Cookie found."
|
||||
|
||||
ctx &= initCookie("c_country", "")
|
||||
ctx &= initCookie("c_fname", "")
|
||||
ctx &= initCookie("c_lname", "")
|
||||
ctx &= initCookie("c_address", "")
|
||||
ctx &= initCookie("c_state_country", "")
|
||||
ctx &= initCookie("c_postal_zip", "")
|
||||
ctx &= initCookie("c_email_address", "")
|
||||
ctx &= initCookie("c_phone", "")
|
||||
|
||||
compileTemplateFile(getScriptDir() / "a3a" / "thankyou.nimja")
|
||||
|
||||
|
@ -351,6 +351,23 @@
|
||||
</div>
|
||||
<script>
|
||||
|
||||
document.getElementById("b3").onclick = function() {
|
||||
|
||||
document.cookie = "c_country="+document.getElementById("c_country").value;
|
||||
document.cookie = "c_fname="+document.getElementById("c_fname").value;
|
||||
document.cookie = "c_lname="+document.getElementById("c_lname").value;
|
||||
document.cookie = "c_address="+document.getElementById("c_address").value;
|
||||
document.cookie = "c_state_country="+document.getElementById("c_state_country").value;
|
||||
document.cookie = "c_postal_zip="+document.getElementById("c_postal_zip").value;
|
||||
document.cookie = "c_email_address="+document.getElementById("c_email_address").value;
|
||||
document.cookie = "c_phone="+document.getElementById("c_phone").value;
|
||||
if (document.getElementById("c_create_account").checked) {
|
||||
document.cookie = "c_create_account="+document.getElementById("c_create_account").value;
|
||||
}
|
||||
|
||||
// window.location.href = '/thankyou';
|
||||
}
|
||||
|
||||
function continueShopping() {
|
||||
window.location.href = '/shop';
|
||||
}
|
||||
@ -362,4 +379,4 @@
|
||||
+ quantity;
|
||||
} #}
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user