10th Commit

This commit is contained in:
Aritra Banik 2024-02-04 02:09:46 +05:30
parent d9de2eee7c
commit b95b0ef385
4 changed files with 25 additions and 3 deletions

View File

@ -189,6 +189,24 @@ import
compileTemplateFile(getScriptDir() / "a3a" / "shop-single.nimja")
"/thankyou" -> get:
var
email: string
password: string
products: seq[Products]
try:
email = ctx.cookies["email"]
password = ctx.cookies["password"]
except:
email = ""
password = ""
if email == "":
echo "No cookie found."
else:
products = micsGetProducts(email, password)
echo "Cookie found."
compileTemplateFile(getScriptDir() / "a3a" / "thankyou.nimja")
"/login" -> get:

View File

@ -30,7 +30,9 @@
<li>
<a href="/cart" class="site-cart">
<span class="icon icon-shopping_cart"></span>
<span class="count">2</span>
{% if products.len > 0 %}
<span class="count">{{products.len}}</span>
{% endif %}
</a>
</li>
<li class="d-inline-block d-md-none ml-md-0"><a href="#" class="site-menu-toggle js-menu-toggle"><span class="icon-menu"></span></a></li>

View File

@ -30,7 +30,7 @@
<li>
<a href="/cart" class="site-cart">
<span class="icon icon-shopping_cart"></span>
<span class="count">2</span>
{# <span class="count">2</span> #}
</a>
</li>
<li class="d-inline-block d-md-none ml-md-0"><a href="#" class="site-menu-toggle js-menu-toggle"><span class="icon-menu"></span></a></li>

View File

@ -30,7 +30,9 @@
<li>
<a href="/cart" class="site-cart">
<span class="icon icon-shopping_cart"></span>
<span class="count">2</span>
{% if products.len > 0 %}
<span class="count">{{products.len}}</span>
{% endif %}
</a>
</li>
<li class="d-inline-block d-md-none ml-md-0"><a href="#" class="site-menu-toggle js-menu-toggle"><span class="icon-menu"></span></a></li>