drnic-liquid 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +44 -0
- data/History.txt +44 -0
- data/MIT-LICENSE +20 -0
- data/Manifest.txt +34 -0
- data/README.rdoc +44 -0
- data/Rakefile +30 -0
- data/example/server/example_servlet.rb +37 -0
- data/example/server/liquid_servlet.rb +28 -0
- data/example/server/server.rb +12 -0
- data/example/server/templates/index.liquid +6 -0
- data/example/server/templates/products.liquid +45 -0
- data/init.rb +8 -0
- data/lib/extras/liquid_view.rb +51 -0
- data/lib/liquid.rb +70 -0
- data/lib/liquid/block.rb +102 -0
- data/lib/liquid/condition.rb +120 -0
- data/lib/liquid/context.rb +221 -0
- data/lib/liquid/document.rb +17 -0
- data/lib/liquid/drop.rb +51 -0
- data/lib/liquid/errors.rb +11 -0
- data/lib/liquid/extensions.rb +56 -0
- data/lib/liquid/file_system.rb +62 -0
- data/lib/liquid/htmltags.rb +74 -0
- data/lib/liquid/module_ex.rb +62 -0
- data/lib/liquid/standardfilters.rb +209 -0
- data/lib/liquid/strainer.rb +51 -0
- data/lib/liquid/tag.rb +26 -0
- data/lib/liquid/tags/assign.rb +33 -0
- data/lib/liquid/tags/capture.rb +35 -0
- data/lib/liquid/tags/case.rb +83 -0
- data/lib/liquid/tags/comment.rb +9 -0
- data/lib/liquid/tags/cycle.rb +59 -0
- data/lib/liquid/tags/for.rb +136 -0
- data/lib/liquid/tags/if.rb +79 -0
- data/lib/liquid/tags/ifchanged.rb +20 -0
- data/lib/liquid/tags/include.rb +55 -0
- data/lib/liquid/tags/unless.rb +33 -0
- data/lib/liquid/template.rb +147 -0
- data/lib/liquid/variable.rb +49 -0
- data/liquid.gemspec +40 -0
- data/performance/shopify.rb +92 -0
- data/performance/shopify/comment_form.rb +33 -0
- data/performance/shopify/database.rb +45 -0
- data/performance/shopify/json_filter.rb +7 -0
- data/performance/shopify/liquid.rb +18 -0
- data/performance/shopify/money_filter.rb +18 -0
- data/performance/shopify/paginate.rb +93 -0
- data/performance/shopify/shop_filter.rb +98 -0
- data/performance/shopify/tag_filter.rb +25 -0
- data/performance/shopify/vision.database.yml +945 -0
- data/performance/shopify/weight_filter.rb +11 -0
- data/performance/tests/dropify/article.liquid +74 -0
- data/performance/tests/dropify/blog.liquid +33 -0
- data/performance/tests/dropify/cart.liquid +66 -0
- data/performance/tests/dropify/collection.liquid +22 -0
- data/performance/tests/dropify/index.liquid +47 -0
- data/performance/tests/dropify/page.liquid +8 -0
- data/performance/tests/dropify/product.liquid +68 -0
- data/performance/tests/dropify/theme.liquid +105 -0
- data/performance/tests/ripen/article.liquid +74 -0
- data/performance/tests/ripen/blog.liquid +13 -0
- data/performance/tests/ripen/cart.liquid +54 -0
- data/performance/tests/ripen/collection.liquid +29 -0
- data/performance/tests/ripen/index.liquid +32 -0
- data/performance/tests/ripen/page.liquid +4 -0
- data/performance/tests/ripen/product.liquid +75 -0
- data/performance/tests/ripen/theme.liquid +85 -0
- data/performance/tests/tribble/404.liquid +56 -0
- data/performance/tests/tribble/article.liquid +98 -0
- data/performance/tests/tribble/blog.liquid +41 -0
- data/performance/tests/tribble/cart.liquid +134 -0
- data/performance/tests/tribble/collection.liquid +70 -0
- data/performance/tests/tribble/index.liquid +94 -0
- data/performance/tests/tribble/page.liquid +56 -0
- data/performance/tests/tribble/product.liquid +116 -0
- data/performance/tests/tribble/search.liquid +51 -0
- data/performance/tests/tribble/theme.liquid +90 -0
- data/performance/tests/vogue/article.liquid +66 -0
- data/performance/tests/vogue/blog.liquid +32 -0
- data/performance/tests/vogue/cart.liquid +58 -0
- data/performance/tests/vogue/collection.liquid +19 -0
- data/performance/tests/vogue/index.liquid +22 -0
- data/performance/tests/vogue/page.liquid +3 -0
- data/performance/tests/vogue/product.liquid +62 -0
- data/performance/tests/vogue/theme.liquid +122 -0
- data/test/assign_test.rb +11 -0
- data/test/block_test.rb +58 -0
- data/test/condition_test.rb +109 -0
- data/test/context_test.rb +482 -0
- data/test/drop_test.rb +162 -0
- data/test/error_handling_test.rb +89 -0
- data/test/extra/breakpoint.rb +547 -0
- data/test/extra/caller.rb +80 -0
- data/test/file_system_test.rb +30 -0
- data/test/filter_test.rb +95 -0
- data/test/helper.rb +20 -0
- data/test/html_tag_test.rb +31 -0
- data/test/if_else_test.rb +131 -0
- data/test/include_tag_test.rb +115 -0
- data/test/module_ex_test.rb +89 -0
- data/test/output_test.rb +121 -0
- data/test/parsing_quirks_test.rb +41 -0
- data/test/regexp_test.rb +45 -0
- data/test/security_test.rb +41 -0
- data/test/standard_filter_test.rb +161 -0
- data/test/standard_tag_test.rb +400 -0
- data/test/statements_test.rb +137 -0
- data/test/strainer_test.rb +21 -0
- data/test/template_test.rb +26 -0
- data/test/test_helper.rb +20 -0
- data/test/unless_else_test.rb +27 -0
- data/test/variable_test.rb +172 -0
- metadata +187 -0
@@ -0,0 +1,41 @@
|
|
1
|
+
<div id="page" class="innerpage clearfix">
|
2
|
+
<div id="text-page">
|
3
|
+
<h1>Post from our blog...</h1>
|
4
|
+
{% paginate blog.articles by 20 %}
|
5
|
+
{% for article in blog.articles %}
|
6
|
+
|
7
|
+
<div class="entry">
|
8
|
+
<h1><span><a href="{{ article.url }}">{{ article.title }}</a></span></h1>
|
9
|
+
<div class="entry-post">
|
10
|
+
<div class="meta">{{ article.created_at | date: "%b %d" }}</div>
|
11
|
+
{{ article.content }}
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
{% end %}
|
16
|
+
|
17
|
+
<div class="paginate clearfix">
|
18
|
+
{{ paginate | default_pagination }}
|
19
|
+
</div>
|
20
|
+
|
21
|
+
{% end %}
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div id="three-reasons" class="clearfix">
|
25
|
+
<h3>Why Shop With Us?</h3>
|
26
|
+
<ul>
|
27
|
+
<li class="two-a">
|
28
|
+
<h4>24 Hours</h4>
|
29
|
+
<p>We're always here to help.</p>
|
30
|
+
</li>
|
31
|
+
<li class="two-c">
|
32
|
+
<h4>No Spam</h4>
|
33
|
+
<p>We'll never share your info.</p>
|
34
|
+
</li>
|
35
|
+
<li class="two-d">
|
36
|
+
<h4>Secure Servers</h4>
|
37
|
+
<p>Checkout is 256bit encrypted.</p>
|
38
|
+
</li>
|
39
|
+
</ul>
|
40
|
+
</div>
|
41
|
+
</div>
|
@@ -0,0 +1,134 @@
|
|
1
|
+
<script type="text/javascript">
|
2
|
+
function remove_item(id) {
|
3
|
+
document.getElementById('updates_'+id).value = 0;
|
4
|
+
document.getElementById('cart').submit();
|
5
|
+
}
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<div id="page" class="innerpage clearfix">.
|
9
|
+
{% if cart.item_count == 0 %}
|
10
|
+
<h1>Your cart is currently empty.</h1>
|
11
|
+
{% else %}
|
12
|
+
|
13
|
+
<h1>Your Cart <span>({{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }}, {{cart.total_price | money_with_currency }} total)</span></h1>
|
14
|
+
|
15
|
+
<form action="/cart" method="post" id="cart-form">
|
16
|
+
|
17
|
+
<div id="cart-wrap">
|
18
|
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
19
|
+
<tr>
|
20
|
+
<th scope="col" class="td-image"><label>Image</label></th>
|
21
|
+
<th scope="col" class="td-title"><label>Product Title</label></th>
|
22
|
+
<th scope="col" class="td-count"><label>Count</label></th>
|
23
|
+
<th scope="col" class="td-price"><label>Cost</label></th>
|
24
|
+
<th scope="col" class="td-delete"><label>Remove</label></th>
|
25
|
+
</tr>
|
26
|
+
|
27
|
+
{% for item in cart.items %}
|
28
|
+
<tr class="{% cycle 'reg', 'alt' %}">
|
29
|
+
<td colspan="5">
|
30
|
+
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
31
|
+
<tr>
|
32
|
+
<td class="td-image"><a href="{{item.product.url}}">{{ item.product.featured_image | product_img_url: 'thumb' | img_tag }}</a></td>
|
33
|
+
<td class="td-title"><p>{{ item.title }}</p></td>
|
34
|
+
<td class="td-count"><label>Count:</label> <input type="text" class="quantity item-count" name="updates[{{item.variant.id}}]" id="updates_{{item.variant.id}}" value="{{item.quantity}}" onfocus="this.select();"/></td>
|
35
|
+
<td class="td-price">{{item.line_price | money }}</td>
|
36
|
+
<td class="td-delete"><a href="#" onclick="remove_item({{item.variant.id}}); return false;">Remove</a></td>
|
37
|
+
</tr>
|
38
|
+
</table>
|
39
|
+
</td>
|
40
|
+
</tr>
|
41
|
+
{% end %}
|
42
|
+
</table>
|
43
|
+
|
44
|
+
<div id="finish-up">
|
45
|
+
|
46
|
+
<div class="latest-news-box">
|
47
|
+
{{ pages.shopping-cart.content }}
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<p class="order-total">
|
51
|
+
<span><strong>Order Total:</strong> {{cart.total_price | money_with_currency }}</span>
|
52
|
+
</p>
|
53
|
+
|
54
|
+
<p class="update-cart"><input type="submit" value="Refresh Cart" name="update" /></p>
|
55
|
+
|
56
|
+
<p class="go-checkout"><input type="submit" value="Proceed to Checkout" name="checkout" /></p>
|
57
|
+
|
58
|
+
{% if additional_checkout_buttons %}
|
59
|
+
<div class="additional-checkout-buttons">
|
60
|
+
<p>- or -</p>
|
61
|
+
{{ content_for_additional_checkout_buttons }}
|
62
|
+
</div>
|
63
|
+
{% end %}
|
64
|
+
|
65
|
+
</div>
|
66
|
+
|
67
|
+
</div>
|
68
|
+
|
69
|
+
</form>
|
70
|
+
|
71
|
+
{% end %}
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
<h1 class="other-products"><span>Other Products You Might Enjoy</span></h1>
|
76
|
+
<ul class="item-list clearfix">
|
77
|
+
|
78
|
+
{% for product in collections.frontpage.products limit:2 %}
|
79
|
+
<li>
|
80
|
+
<form action="/cart/add" method="post">
|
81
|
+
<div class="item-list-item">
|
82
|
+
<div class="ili-top clearfix">
|
83
|
+
<div class="ili-top-content">
|
84
|
+
<h2><a href="{{product.url}}">{{product.title}}</a></h2>
|
85
|
+
<p>{{ product.description | truncatewords: 15 }}</p>
|
86
|
+
</div>
|
87
|
+
<a href="{{product.url}}" class="ili-top-image"><img src="{{ product.featured_image | product_img_url: 'small' }}" alt="{{ product.title | escape }}"/></a>
|
88
|
+
</div>
|
89
|
+
|
90
|
+
<div class="ili-bottom clearfix">
|
91
|
+
<p class="hiddenvariants" style="display: none">{% for variant in product.variants %}<span><input type="radio" name="id" value="{{variant.id}}" id="radio_{{variant.id}}" style="vertical-align: middle;" {%if forloop.first%} checked="checked" {%end%} /><label for="radio_{{variant.id}}">{{ variant.price | money_with_currency }} - {{ variant.title }}</label></span>{% end %}</p>
|
92
|
+
<input type="submit" class="" value="Add to Basket" />
|
93
|
+
<p>
|
94
|
+
<a href="{{product.url}}">View Details</a>
|
95
|
+
|
96
|
+
<span>
|
97
|
+
{% if product.compare_at_price %}
|
98
|
+
{% if product.price_min != product.compare_at_price %}
|
99
|
+
{{product.compare_at_price | money}} -
|
100
|
+
{% end %}
|
101
|
+
{% end %}
|
102
|
+
<strong>
|
103
|
+
{{product.price_min | money}}
|
104
|
+
</strong>
|
105
|
+
</span>
|
106
|
+
</p>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
</form>
|
110
|
+
</li>
|
111
|
+
{% end %}
|
112
|
+
|
113
|
+
</ul>
|
114
|
+
|
115
|
+
<div id="three-reasons" class="clearfix">
|
116
|
+
<h3>Why Shop With Us?</h3>
|
117
|
+
<ul>
|
118
|
+
<li class="two-a">
|
119
|
+
<h4>24 Hours</h4>
|
120
|
+
<p>We're always here to help.</p>
|
121
|
+
</li>
|
122
|
+
<li class="two-c">
|
123
|
+
<h4>No Spam</h4>
|
124
|
+
<p>We'll never share your info.</p>
|
125
|
+
</li>
|
126
|
+
<li class="two-d">
|
127
|
+
<h4>Secure Servers</h4>
|
128
|
+
<p>Checkout is 256bit encrypted.</p>
|
129
|
+
</li>
|
130
|
+
</ul>
|
131
|
+
</div>
|
132
|
+
|
133
|
+
</div>
|
134
|
+
<!-- end page -->
|
@@ -0,0 +1,70 @@
|
|
1
|
+
<div id="page" class="innerpage clearfix">
|
2
|
+
<h1>{{ collection.title }}</h1>
|
3
|
+
{% if collection.description.size > 0 %}
|
4
|
+
<div class="latest-news">{{ collection.description }}</div>
|
5
|
+
{% end %}
|
6
|
+
|
7
|
+
{% paginate collection.products by 8 %}
|
8
|
+
|
9
|
+
<ul class="item-list clearfix">
|
10
|
+
{% for product in collection.products %}
|
11
|
+
<li>
|
12
|
+
<form action="/cart/add" method="post">
|
13
|
+
<div class="item-list-item">
|
14
|
+
<div class="ili-top clearfix">
|
15
|
+
<div class="ili-top-content">
|
16
|
+
<h2><a href="{{product.url}}">{{product.title}}</a></h2>
|
17
|
+
<p>{{ product.description | truncatewords: 15 }}</p>
|
18
|
+
</div>
|
19
|
+
<a href="{{product.url}}" class="ili-top-image"><img src="{{ product.featured_image | product_img_url: 'small' }}" alt="{{ product.title | escape }}"/></a>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="ili-bottom clearfix">
|
23
|
+
<p class="hiddenvariants" style="display: none">{% for variant in product.variants %}<span><input type="radio" name="id" value="{{variant.id}}" id="radio_{{variant.id}}" style="vertical-align: middle;" {%if forloop.first%} checked="checked" {%end%} /><label for="radio_{{variant.id}}">{{ variant.price | money_with_currency }} - {{ variant.title }}</label></span>{% end %}</p>
|
24
|
+
<input type="submit" class="" value="Add to Basket" />
|
25
|
+
<p>
|
26
|
+
<a href="{{product.url}}">View Details</a>
|
27
|
+
|
28
|
+
<span>
|
29
|
+
{% if product.compare_at_price %}
|
30
|
+
{% if product.price_min != product.compare_at_price %}
|
31
|
+
{{product.compare_at_price | money}} -
|
32
|
+
{% end %}
|
33
|
+
{% end %}
|
34
|
+
<strong>
|
35
|
+
{{product.price_min | money}}
|
36
|
+
</strong>
|
37
|
+
</span>
|
38
|
+
</p>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
</form>
|
42
|
+
</li>
|
43
|
+
{% end %}
|
44
|
+
</ul>
|
45
|
+
|
46
|
+
<div class="paginate clearfix">
|
47
|
+
{{ paginate | default_pagination }}
|
48
|
+
</div>
|
49
|
+
|
50
|
+
|
51
|
+
<div id="three-reasons" class="clearfix">
|
52
|
+
<h3>Why Shop With Us?</h3>
|
53
|
+
<ul>
|
54
|
+
<li class="two-a">
|
55
|
+
<h4>24 Hours</h4>
|
56
|
+
<p>We're always here to help.</p>
|
57
|
+
</li>
|
58
|
+
<li class="two-c">
|
59
|
+
<h4>No Spam</h4>
|
60
|
+
<p>We'll never share your info.</p>
|
61
|
+
</li>
|
62
|
+
<li class="two-d">
|
63
|
+
<h4>Secure Servers</h4>
|
64
|
+
<p>Checkout is 256bit encrypted.</p>
|
65
|
+
</li>
|
66
|
+
</ul>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
|
70
|
+
{% end %}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
<div id="gwrap">
|
2
|
+
<div id="gbox">
|
3
|
+
<h1>Three Great Reasons You Should Shop With Us...</h1>
|
4
|
+
<ul>
|
5
|
+
<li class="gbox1">
|
6
|
+
<h2>Free Shipping</h2>
|
7
|
+
<p>On all orders over $25</p>
|
8
|
+
</li>
|
9
|
+
<li class="gbox2">
|
10
|
+
<h2>Top Quality</h2>
|
11
|
+
<p>Hand made in our shop</p>
|
12
|
+
</li>
|
13
|
+
<li class="gbox3">
|
14
|
+
<h2>100% Guarantee</h2>
|
15
|
+
<p>Any time, any reason</p>
|
16
|
+
</li>
|
17
|
+
</ul>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div id="page" class="clearfix">
|
22
|
+
|
23
|
+
<div class="latest-news">{{pages.alert.content}}</div>
|
24
|
+
|
25
|
+
<ul class="item-list clearfix">
|
26
|
+
|
27
|
+
{% for product in collections.frontpage.products %}
|
28
|
+
<li>
|
29
|
+
<form action="/cart/add" method="post">
|
30
|
+
<div class="item-list-item">
|
31
|
+
<div class="ili-top clearfix">
|
32
|
+
<div class="ili-top-content">
|
33
|
+
<h2><a href="{{product.url}}">{{product.title}}</a></h2>
|
34
|
+
{{ product.description | truncatewords: 15 }}</p> <!-- extra cloding <p> tag for truncation -->
|
35
|
+
</div>
|
36
|
+
<a href="{{product.url}}" class="ili-top-image"><img src="{{ product.featured_image | product_img_url: 'small' }}" alt="{{ product.title | escape }}"/></a>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="ili-bottom clearfix">
|
40
|
+
<p class="hiddenvariants" style="display: none">{% for variant in product.variants %}<span><input type="radio" name="id" value="{{variant.id}}" id="radio_{{variant.id}}" style="vertical-align: middle;" {%if forloop.first%} checked="checked" {%end%} /><label for="radio_{{variant.id}}">{{ variant.price | money_with_currency }} - {{ variant.title }}</label></span>{% end %}</p>
|
41
|
+
<input type="submit" class="" value="Add to Basket" />
|
42
|
+
<p>
|
43
|
+
<a href="{{product.url}}">View Details</a>
|
44
|
+
|
45
|
+
<span>
|
46
|
+
{% if product.compare_at_price %}
|
47
|
+
{% if product.price_min != product.compare_at_price %}
|
48
|
+
{{product.compare_at_price | money}} -
|
49
|
+
{% end %}
|
50
|
+
{% end %}
|
51
|
+
<strong>
|
52
|
+
{{product.price_min | money}}
|
53
|
+
</strong>
|
54
|
+
</span>
|
55
|
+
</p>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
</form>
|
59
|
+
</li>
|
60
|
+
{% end %}
|
61
|
+
|
62
|
+
</ul>
|
63
|
+
|
64
|
+
<div id="one-two">
|
65
|
+
<div id="two">
|
66
|
+
<h3>Why Shop With Us?</h3>
|
67
|
+
<ul>
|
68
|
+
<li class="two-a">
|
69
|
+
<h4>24 Hours</h4>
|
70
|
+
<p>We're always here to help.</p>
|
71
|
+
</li>
|
72
|
+
<li class="two-c">
|
73
|
+
<h4>No Spam</h4>
|
74
|
+
<p>We'll never share your info.</p>
|
75
|
+
</li>
|
76
|
+
<li class="two-b">
|
77
|
+
<h4>Save Energy</h4>
|
78
|
+
<p>We're green, all the way.</p>
|
79
|
+
</li>
|
80
|
+
<li class="two-d">
|
81
|
+
<h4>Secure Servers</h4>
|
82
|
+
<p>Checkout is 256bits encrypted.</p>
|
83
|
+
</li>
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="one">
|
88
|
+
<h3>Our Company</h3>
|
89
|
+
{{pages.about-us.content | truncatewords: 49}} <a href="/pages/about-us">read more</a></p>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
<!-- end page -->
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<div id="page" class="innerpage clearfix">
|
2
|
+
|
3
|
+
<div id="text-page">
|
4
|
+
<div class="entry">
|
5
|
+
<h1>{{page.title}}</h1>
|
6
|
+
<div class="entry-post">
|
7
|
+
{{page.content}}
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
|
13
|
+
<h1>Featured Products</h1>
|
14
|
+
<ul class="item-list clearfix">
|
15
|
+
|
16
|
+
{% for product in collections.frontpage.products %}
|
17
|
+
<li>
|
18
|
+
<form action="/cart/add" method="post">
|
19
|
+
<div class="item-list-item">
|
20
|
+
<div class="ili-top clearfix">
|
21
|
+
<div class="ili-top-content">
|
22
|
+
<h2><a href="{{product.url}}">{{product.title}}</a></h2>
|
23
|
+
<p>{{ product.description | truncatewords: 15 }}</p>
|
24
|
+
</div>
|
25
|
+
<a href="{{product.url}}" class="ili-top-image"><img src="{{ product.featured_image | product_img_url: 'small' }}" alt="{{ product.title | escape }}"/></a>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="ili-bottom clearfix">
|
29
|
+
<p class="hiddenvariants" style="display: none">{% for variant in product.variants %}<span><input type="radio" name="id" value="{{variant.id}}" id="radio_{{variant.id}}" style="vertical-align: middle;" {%if forloop.first%} checked="checked" {%end%} /><label for="radio_{{variant.id}}">{{ variant.price | money_with_currency }} - {{ variant.title }}</label></span>{% end %}</p>
|
30
|
+
<input type="submit" class="" value="Add to Basket" />
|
31
|
+
<p>
|
32
|
+
<a href="{{product.url}}">View Details</a>
|
33
|
+
|
34
|
+
<span>
|
35
|
+
{% if product.compare_at_price %}
|
36
|
+
{% if product.price_min != product.compare_at_price %}
|
37
|
+
{{product.compare_at_price | money}} -
|
38
|
+
{% end %}
|
39
|
+
{% end %}
|
40
|
+
<strong>
|
41
|
+
{{product.price_min | money}}
|
42
|
+
</strong>
|
43
|
+
</span>
|
44
|
+
</p>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</form>
|
48
|
+
</li>
|
49
|
+
{% end %}
|
50
|
+
|
51
|
+
</ul>
|
52
|
+
</div>
|
53
|
+
<!-- end page -->
|
54
|
+
|
55
|
+
|
56
|
+
|
@@ -0,0 +1,116 @@
|
|
1
|
+
<div id="page" class="innerpage clearfix">
|
2
|
+
<h1>{{ collection.title }} {{ product.title }}</h1>
|
3
|
+
|
4
|
+
|
5
|
+
<p class="latest-news"><strong>Product Tags: </strong>
|
6
|
+
{% for tag in product.tags %}
|
7
|
+
<a href="/collections/all/{{ tag }}">{{ tag }}</a> |
|
8
|
+
{% end %}
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<div class="product clearfix">
|
12
|
+
<div class="product-info">
|
13
|
+
<h1>{{ product.title }}</h1>
|
14
|
+
<div class="product-info-description">
|
15
|
+
<p>{{ product.description }} </p>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
{% if product.available %}
|
19
|
+
<form action="/cart/add" method="post">
|
20
|
+
|
21
|
+
<h2>Product Options:</h2>
|
22
|
+
|
23
|
+
<select id="product-info-options" name="id" class="product-info-options">
|
24
|
+
{% for variant in product.variants %}
|
25
|
+
<option value="{{ variant.id }}">{{ variant.title }} - {{ variant.price | money }}</option>
|
26
|
+
{% end %}
|
27
|
+
</select>
|
28
|
+
|
29
|
+
<div id="price-field"></div>
|
30
|
+
|
31
|
+
<div class="product-purchase-btn">
|
32
|
+
<input type="submit" class="add-this-to-cart" id="add-this-to-cart" value="Add to Basket" />
|
33
|
+
</div>
|
34
|
+
|
35
|
+
</form>
|
36
|
+
{% else %}
|
37
|
+
<h2>Sold out!</h2>
|
38
|
+
<p>Sorry, we're all out of this product. Check back often and order when it returns</p>
|
39
|
+
{% end %}
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div class="product-images clearfix">
|
43
|
+
{% for image in product.images %}
|
44
|
+
|
45
|
+
{% if forloop.first %}
|
46
|
+
<div class="product-image-large">
|
47
|
+
<img src="{{ image | product_img_url: 'medium'}}" alt="{{product.title | escape }}" />
|
48
|
+
</div>
|
49
|
+
{% else %}
|
50
|
+
{% end %}
|
51
|
+
{% end %}
|
52
|
+
|
53
|
+
<ul class="product-thumbs clearfix">
|
54
|
+
{% for image in product.images %}
|
55
|
+
{% if forloop.first %}
|
56
|
+
{% else %}
|
57
|
+
|
58
|
+
<li>
|
59
|
+
<a href="{{ image | product_img_url: 'large' }}" class="product-thumbs" rel="lightbox[product]" title="">
|
60
|
+
<img src="{{ image | product_img_url: 'small'}}" alt="{{product.title | escape }}" />
|
61
|
+
</a>
|
62
|
+
</li>
|
63
|
+
{% end %}
|
64
|
+
{% end %}
|
65
|
+
</ul>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
<div id="three-reasons" class="clearfix">
|
72
|
+
<h3>Why Shop With Us?</h3>
|
73
|
+
<ul>
|
74
|
+
<li class="two-a">
|
75
|
+
<h4>24 Hours</h4>
|
76
|
+
<p>We're always here to help.</p>
|
77
|
+
</li>
|
78
|
+
<li class="two-c">
|
79
|
+
<h4>No Spam</h4>
|
80
|
+
<p>We'll never share your info.</p>
|
81
|
+
</li>
|
82
|
+
<li class="two-d">
|
83
|
+
<h4>Secure Servers</h4>
|
84
|
+
<p>Checkout is 256bit encrypted.</p>
|
85
|
+
</li>
|
86
|
+
</ul>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
</div>
|
90
|
+
<!-- end page -->
|
91
|
+
|
92
|
+
<script type="text/javascript">
|
93
|
+
<!--
|
94
|
+
// prototype callback for multi variants dropdown selector
|
95
|
+
var selectCallback = function(variant, selector) {
|
96
|
+
if (variant && variant.available == true) {
|
97
|
+
// selected a valid variant
|
98
|
+
$('add-this-to-cart').removeClassName('disabled'); // remove unavailable class from add-to-cart button
|
99
|
+
$('add-this-to-cart').disabled = false; // reenable add-to-cart button
|
100
|
+
$('price-field').innerHTML = Shopify.formatMoney(variant.price, "{{shop.money_with_currency_format}}"); // update price field
|
101
|
+
} else {
|
102
|
+
// variant doesn't exist
|
103
|
+
$('add-this-to-cart').addClassName('disabled'); // set add-to-cart button to unavailable class
|
104
|
+
$('add-this-to-cart').disabled = true; // disable add-to-cart button
|
105
|
+
$('price-field').innerHTML = (variant) ? "Sold Out" : "Unavailable"; // update price-field message
|
106
|
+
}
|
107
|
+
};
|
108
|
+
|
109
|
+
// initialize multi selector for product
|
110
|
+
Event.observe(document, 'dom:loaded', function() {
|
111
|
+
new Shopify.OptionSelectors("product-info-options", { product: {{ product | json }}, onVariantSelected: selectCallback });
|
112
|
+
});
|
113
|
+
-->
|
114
|
+
</script>
|
115
|
+
|
116
|
+
|