-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct.liquid
82 lines (78 loc) · 2.5 KB
/
product.liquid
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
<!-- Customized product descriptions with injected standard shipping information, return policy, and sizing charts -->
<!-- Tabs -->
{% assign handle_append = "-size-chart" %}
{% assign product_size_chart = product.handle | append: handle_append %}
{% if pages[product_size_chart].content == "" %}
{% assign tab_2_placeholder = true %}
{% else %}
{% assign tab_2_placeholder = false %}
{% endif %}
<style>
#tab-1, #tab-2, #tab-3, #tab-4, {
margin: 0 ;
padding: 0;
font-size: 0.6875em !important;
font-family: 'HelveticaNeue' !important;
color: #000000;
}
div.details li, {
padding: 0 ;
margin: 0;
}
</style>
<script>
$(document).ready(function() {
$('ul.tabs').each(function(){
var active, content, links = $(this).find('a');
active = links.first().addClass('active');
content = $(active.attr('href'));
links.not(':first').each(function () {
$($(this).attr('href')).hide();
});
$(this).find('a').click(function(e){
active.removeClass('active');
content.hide();
active = $(this);
content = $($(this).attr('href'));
active.addClass('active');
content.show();
return false;
});
});
});
</script>
<!-- End Tabs -->
{% if settings.product_description_position == "bottom" %}
{% if product.description != blank %}
<div class="description" itemprop="description">
<!-- Tabs -->
<div>
<div class="tabs">
<ul class="tabs">
<li><a href="#tab-1">Details</a></li>
<li><a href="#tab-2">Sizing</a></li>
<li><a href="#tab-3">Shipping</a></li>
<li><a href="#tab-4">Returns</a></li>
</ul>
</div>
<div id="tab-1" class="details">
{{ product.description }}
</div>
<div id="tab-2">
{% if tab_2_placeholder == false %}
{{ pages[product_size_chart].content }}
{% else %}
<p>Looks like we haven't added a full chart for this product yet, please <button type="button" id="sk-no-sizing">chat</button> with us for any sizing concerns.</p>
{% endif %}
</div>
<div id="tab-3">
{% include 'shipping' %}
</div>
<div id="tab-4">
{{ pages.returns.content }}
</div>
</div>
<!-- End Tabs -->
</div>
{% endif %}
{% endif %}