-
Notifications
You must be signed in to change notification settings - Fork 0
/
product.html
267 lines (263 loc) · 8.72 KB
/
product.html
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
---
layout: single
title: Product Details
---
<!-- ****** Breadcumb Area Start ****** -->
{% assign product = site.data.products.list[0] %}
<div class="breadcumb_area">
<div class="container">
<div class="row">
<div class="col-12">
<ol class="breadcrumb d-flex align-items-center">
<li class="breadcrumb-item">
<a href="/">Home</a>
</li>
<li class="breadcrumb-item">
{% assign cat = "" %}
{% assign categories = site.data.categories.list | where: "id", product.category %}
{% for category in categories %}
{% assign cat = category %}
<a href="{{category.href}}">
{{category.name}}
</a>
{% endfor %}
</li>
<li class="breadcrumb-item active">
{% assign subcategories = cat.subcategories | where: "id", product.subcategory %}
{% for subcategory in subcategories %}
<a href="{{subcategory.href}}">
{{subcategory.name}}
</a>
{% endfor %}
</li>
</ol>
<!-- btn -->
<a href="{{cat.href}}" class="backToHome d-block">
<i class="fa fa-angle-double-left"></i> Back to Category
</a>
</div>
</div>
</div>
</div>
<!-- ****** Breadcumb Area End ****** -->
<!-- ****** Single Product Details Area Start ****** -->
<section class="single_product_details_area section_padding_0_100">
<div class="container">
<div class="row">
<div class="col-12 col-md-6">
<div class="single_product_thumb">
<div
id="product_details_slider"
class="carousel slide"
data-ride="carousel"
>
<ol class="carousel-indicators">
{% for image in product.gallery %}
{% assign class = "" %}
{% if forloop.index == 1 %}
{% assign class = "active" %}
{% endif %}
<li
class="{{class}}"
data-target="#product_details_slider"
data-slide-to="{{ forloop.index | minus: 1 }}"
style="background-image: url({{ image | relative_url }});"
>
</li>
{% endfor %}
</ol>
<div class="carousel-inner">
{% for image in product.gallery %}
{% assign class = "carousel-item" %}
{% if forloop.index == 1 %}
{% assign class = "carousel-item active" %}
{% endif %}
<div class="{{class}}">
<a class="gallery_img" href="{{ image | relative_url }}">
<img
class="d-block w-100"
src="{{ image | relative_url }}"
alt="First slide"
>
</a>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
<div class="col-12 col-md-6">
<div class="single_product_desc">
<h4 class="title"><a href="#">{{product.name}}</a></h4>
<h4 class="price">{{site.currency}}{{product.price}}</h4>
<p class="available">Available:
{% if product.stock %}
<span class="text-muted">In Stock</span>
{% else %}
<span class="text-muted">Unavailable</span>
{% endif %}
</p>
<div class="single_product_ratings mb-15">
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star-o" aria-hidden="true"></i>
</div>
<div class="widget size mb-50">
<h6 class="widget-title">Size</h6>
<div class="widget-desc">
<ul>
{% for size in product.sizes %}
<li><a href="#">{{size}}</a></li>
{% endfor %}
</ul>
</div>
</div>
<!-- Add to Cart Form -->
<form class="cart clearfix mb-50 d-flex" method="post">
{% if product.availableQuantity > 0 %}
<div class="quantity">
<span
class="qty-minus"
onclick="decrementQuantity()"
>
<i class="fa fa-minus" aria-hidden="true"></i>
</span>
<input
type="number"
class="qty-text"
id="qty"
step="1"
min="1"
max="{{product.availableQuantity}}"
name="quantity"
value="1"
>
<span
class="qty-plus"
onclick="incrementQuantity()"
>
<i class="fa fa-plus" aria-hidden="true"></i>
</span>
</div>
<button
type="submit"
name="addtocart"
value="5"
class="btn cart-submit d-block"
>
Add to cart
</button>
{% endif %}
</form>
<div id="accordion" role="tablist">
<div class="card">
<div class="card-header" role="tab" id="headingOne">
<h6 class="mb-0">
<a
data-toggle="collapse"
href="#collapseOne"
aria-expanded="true"
aria-controls="collapseOne"
>
Information
</a>
</h6>
</div>
<div
id="collapseOne"
class="collapse show"
role="tabpanel"
aria-labelledby="headingOne"
data-parent="#accordion"
>
<div class="card-body">
<p>{{product.description}}</p>
</div>
</div>
</div>
<div class="card">
<div class="card-header" role="tab" id="headingTwo">
<h6 class="mb-0">
<a
class="collapsed"
data-toggle="collapse"
href="#collapseTwo"
aria-expanded="false"
aria-controls="collapseTwo"
>
Cart Details
</a>
</h6>
</div>
<div
id="collapseTwo"
class="collapse"
role="tabpanel"
aria-labelledby="headingTwo"
data-parent="#accordion"
>
<div class="card-body">
<p>{{site.terms.cart}}</p>
</div>
</div>
</div>
<div class="card">
<div class="card-header" role="tab" id="headingThree">
<h6 class="mb-0">
<a
class="collapsed"
data-toggle="collapse"
href="#collapseThree"
aria-expanded="false"
aria-controls="collapseThree"
>
Shipping and Returns
</a>
</h6>
</div>
<div
id="collapseThree"
class="collapse"
role="tabpanel"
aria-labelledby="headingThree"
data-parent="#accordion"
>
<div class="card-body">
<p>{{site.terms.shipping}}</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- ****** Single Product Details Area End ****** -->
{% include quickviewmodal.html product=product %}
<section class="you_may_like_area clearfix">
<div class="container">
<div class="row">
<div class="col-12">
<div class="section_heading text-center">
<h2>Related Products</h2>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="you_make_like_slider owl-carousel">
{% for related in product.related %}
{% assign products = site.data.products.list | where: "id", related %}
{% assign p = products[0] %}
<div class="single_gallery_item">
{% include product.html product=p %}
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</section>