10th Commit
This commit is contained in:
parent
d9de2eee7c
commit
b95b0ef385
18
src/a3.nim
18
src/a3.nim
@ -189,6 +189,24 @@ import
|
|||||||
compileTemplateFile(getScriptDir() / "a3a" / "shop-single.nimja")
|
compileTemplateFile(getScriptDir() / "a3a" / "shop-single.nimja")
|
||||||
|
|
||||||
"/thankyou" -> get:
|
"/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")
|
compileTemplateFile(getScriptDir() / "a3a" / "thankyou.nimja")
|
||||||
|
|
||||||
"/login" -> get:
|
"/login" -> get:
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="/cart" class="site-cart">
|
<a href="/cart" class="site-cart">
|
||||||
<span class="icon icon-shopping_cart"></span>
|
<span class="icon icon-shopping_cart"></span>
|
||||||
<span class="count">2</span>
|
{% if products.len > 0 %}
|
||||||
|
<span class="count">{{products.len}}</span>
|
||||||
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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>
|
<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>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="/cart" class="site-cart">
|
<a href="/cart" class="site-cart">
|
||||||
<span class="icon icon-shopping_cart"></span>
|
<span class="icon icon-shopping_cart"></span>
|
||||||
<span class="count">2</span>
|
{# <span class="count">2</span> #}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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>
|
<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>
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="/cart" class="site-cart">
|
<a href="/cart" class="site-cart">
|
||||||
<span class="icon icon-shopping_cart"></span>
|
<span class="icon icon-shopping_cart"></span>
|
||||||
<span class="count">2</span>
|
{% if products.len > 0 %}
|
||||||
|
<span class="count">{{products.len}}</span>
|
||||||
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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>
|
<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>
|
||||||
|
Loading…
Reference in New Issue
Block a user