-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpage-category.htm
More file actions
61 lines (56 loc) · 1.62 KB
/
page-category.htm
File metadata and controls
61 lines (56 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
action: 'shop:category'
template: main
protocol: all
published: true
name: Category
url: '/category/:urlName@/:page?'
---
<div class="wrapper">
<h1>{{ category.name }}</h1>
{% tree categories %}
<nav style="float: left; width: auto; margin-top: 1em"><ul><li class="categories">
<a href="#">Categories ▾</a>
<ul>
{% for category in tree.items %}
<li>
<h3><a href="/category/{{ category.fullUrlName }}">{{ category.name }}</a></h3>
{% branch category.children %}
</li>
{% endfor %}
</ul>
</li></ul></nav>
{% endtree %}
{% if not category %}
<h2>Category not found</h2>
<p>We are sorry, the requested category was not found.</p>
{% else %}
{% paginate products by 9 %}
<ul style="clear: both;">
{% for product in pagination.items %}
{% set is_on_sale = product.onSale %}
{% set page_url = '/product/' ~ product.url_name %}
<div class="product shop-product">
<li class="{{ is_on_sale ? 'sale' : null }}">
<figure>
<a href="{{ page_url }}">
<img src="{{ product.images.first.thumbnail(365, 365)|default('http://placehold.it/365x365') }}" width="365" height="365" alt="{{ product.images.first.description }}" title="{{ product.images.first.title }}"/>
</a>
<figcaption>
<h3><a href="/product/{{ product.url_name }}" class="btn btn-default">{{ product.name }}</a></h3>
<h2>{{ product.price|currency }}</h2>
{% if is_on_sale %}
<h2 class="oldprice">{{ product.fullPrice|currency }}</h2>
{% endif %}
</figcaption>
</figure>
</li>
</div>
{% endfor %}
</ul>
<div class="nav-wrap">
{% navigation %}
</div>
{% endpaginate %}
{% endif %}
</div>