shopifydev 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.pryrc +1 -1
- data/NEXTSTEPS.md +75 -1
- data/README.md +31 -0
- data/bin/shopify_console +2 -9
- data/lib/shopifydev/console.rb +15 -0
- data/lib/shopifydev/pry/commands.rb +4 -19
- data/lib/shopifydev/shopify_api/caches.rb +176 -0
- data/lib/shopifydev/version.rb +1 -1
- data/spec/shopifydev/console_spec.rb +5 -0
- data/spec/shopifydev/shopifyapi/caches_spec.rb +5 -0
- metadata +10 -10
- data/templates/customers/order.liquid +0 -109
- data/templates/customers/register.liquid +0 -42
- data/templates/page.support.liquid +0 -78
- data/templates/page.verbose.liquid +0 -18
- data/templates/product.liquid +0 -284
- data/templates/search.liquid +0 -63
data/.pryrc
CHANGED
data/NEXTSTEPS.md
CHANGED
@@ -20,10 +20,66 @@ apps (heroku):
|
|
20
20
|
1. metafieldseditor
|
21
21
|
2. shipping
|
22
22
|
|
23
|
+
_pry_.switch
|
24
|
+
Switch is a class, and every instance of Pry has an instance of Switch. This way we can
|
25
|
+
access _pry_.switch. In the global scope there will be an object called 'switch' that will
|
26
|
+
be an alias to _pry_.switch so that we can call its public methods. There will also be a
|
27
|
+
command 'switch' that will be a wrapper for the _pry_.switch methods for displaying and
|
28
|
+
handling a menu.
|
23
29
|
|
30
|
+
So we can do
|
24
31
|
|
25
|
-
|
32
|
+
`[1] pry(main)> switch`
|
26
33
|
|
34
|
+
to present a menu of options and then
|
35
|
+
|
36
|
+
`[1] pry(main)> switch 3`
|
37
|
+
|
38
|
+
to choose one of them. This command just refers to methods on Pry.Switch in its process definition
|
39
|
+
|
40
|
+
Or we can use tab completion to present the menu by invoking switch as a global object.
|
41
|
+
|
42
|
+
````
|
43
|
+
[1] pry(main)> switch.m[TAB]
|
44
|
+
switch.metafieldseditor switch.morfars-metafields
|
45
|
+
[2] pry(main)> switch.mo[TAB]rfars-metafields
|
46
|
+
````
|
47
|
+
|
48
|
+
to accomplish the same.
|
49
|
+
|
50
|
+
- When you use switch by itself, with no args, then _pry_.switch gets reset to the first menu
|
51
|
+
- each time you make a choice, this advances _pry_.switch to the next menu
|
52
|
+
|
53
|
+
So in a deep menu we might see:
|
54
|
+
|
55
|
+
````
|
56
|
+
[1] pry(main)> switch
|
57
|
+
current shop: none
|
58
|
+
|
59
|
+
Heroku Apps
|
60
|
+
1. right app
|
61
|
+
2. wrong app
|
62
|
+
[1] pry(main)> switch 2
|
63
|
+
current shop: none
|
64
|
+
|
65
|
+
Wrong App
|
66
|
+
1. not ok
|
67
|
+
2. something
|
68
|
+
[1] pry(main)> switch
|
69
|
+
current shop: none
|
70
|
+
|
71
|
+
Heroku Apps
|
72
|
+
1. right app
|
73
|
+
2. wrong app
|
74
|
+
[1] pry(main)> switch 1
|
75
|
+
current shop: none
|
76
|
+
|
77
|
+
Wrong App
|
78
|
+
1. another thing
|
79
|
+
2. the thing you wanted
|
80
|
+
[1] pry(main)> switch 2
|
81
|
+
current shop: none switching to "the thing you wanted"...
|
82
|
+
````
|
27
83
|
|
28
84
|
# To check out
|
29
85
|
|
@@ -31,3 +87,21 @@ https://github.com/pry/pry-coolline
|
|
31
87
|
https://github.com/cldwalker/bond
|
32
88
|
|
33
89
|
|
90
|
+
# Menu of Shops in local apps
|
91
|
+
- [x] run rake shops in chosen local app
|
92
|
+
- [ ] display result of rake shops in a menu
|
93
|
+
- how do we handle this? do we use letters? or does switch command remember state (which menu was displayed last)? ie, what does ```switch 1``` mean?
|
94
|
+
- [ ] memoize results of rake shops in a hash with same keys as the apps have in config (I would put this in config). This is because running rake shops is slow enough to be annoying.
|
95
|
+
- [ ] add -r,--refresh option to switch command to tell it to get fresh data
|
96
|
+
- [ ] deploy apps with shopify_dev gem
|
97
|
+
- [ ] metafieldseditor richard@webifytechnology.com
|
98
|
+
- [ ] morfars-metafields richard@webifytechnology.com
|
99
|
+
- [ ] red-pepper-shipping richard@webifytechnology.com
|
100
|
+
- [ ] shipping-lifemap-bioreagents richard@webifytechnology.com
|
101
|
+
- [ ] shipping-staging richard@webifytechnology.com
|
102
|
+
|
103
|
+
|
104
|
+
# Using pry features
|
105
|
+
https://github.com/ConradIrwin/pry-rescue
|
106
|
+
-- we **really** want to be using this in test/development environments in rails apps.
|
107
|
+
https://github.com/envygeeks/pry-vterm_aliases
|
data/README.md
CHANGED
@@ -69,6 +69,37 @@ you won't upload a file twice unless it gets changed twice in the same commit)
|
|
69
69
|
|
70
70
|
One final tip: `alias upify='shopifydev upload'`
|
71
71
|
|
72
|
+
# Caches
|
73
|
+
|
74
|
+
Caches are defined on ```ShopifyAPI```.
|
75
|
+
Assuming you ```cd ShopifyAPI```:
|
76
|
+
|
77
|
+
products
|
78
|
+
=> lazily fetched cached products
|
79
|
+
|
80
|
+
products.r
|
81
|
+
=> reload products cache
|
82
|
+
|
83
|
+
products(product_type: 'xxxx')
|
84
|
+
=> reload products cache with params {product_type: 'xxxx'}
|
85
|
+
|
86
|
+
products.params
|
87
|
+
=> shows params the caches were fetched with
|
88
|
+
|
89
|
+
products.since
|
90
|
+
=> shows when the products cache was last fetched
|
91
|
+
|
92
|
+
caches
|
93
|
+
=> lists status of all the caches & when they were last
|
94
|
+
reloaded. Will show an ! next to records that were fetched
|
95
|
+
with params.
|
96
|
+
|
97
|
+
caches true
|
98
|
+
=> shows params the caches were loaded with
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
72
103
|
## Contributing
|
73
104
|
|
74
105
|
1. Fork it
|
data/bin/shopify_console
CHANGED
@@ -1,15 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'pry'
|
3
3
|
require 'shopifydev'
|
4
|
-
require 'shopifydev/
|
4
|
+
require 'shopifydev/console'
|
5
5
|
|
6
|
-
|
7
|
-
MY_OBJ = []
|
8
|
-
|
9
|
-
def bob
|
10
|
-
"yo, bob here"
|
11
|
-
end
|
12
|
-
# start a REPL session
|
13
|
-
binding.pry
|
6
|
+
Pry.start
|
14
7
|
|
15
8
|
puts "Thank you for using Shopify Console. Enjoy your day."
|
@@ -1,16 +1,4 @@
|
|
1
|
-
require 'term/ansicolor'
|
2
1
|
require 'oj'
|
3
|
-
class Color
|
4
|
-
if Pry.config.color
|
5
|
-
extend Term::ANSIColor
|
6
|
-
else
|
7
|
-
class << self
|
8
|
-
def method_missing
|
9
|
-
''
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
2
|
|
15
3
|
class LocalShopifyApp
|
16
4
|
attr_accessor :path
|
@@ -19,15 +7,14 @@ class LocalShopifyApp
|
|
19
7
|
end
|
20
8
|
|
21
9
|
def shops
|
22
|
-
json = `/bin/bash -l -c "unset BUNDLE_GEMFILE; cd #{path}; bundle exec rake shops 2>/dev/null"`
|
10
|
+
json = `/bin/bash -l -c "unset BUNDLE_GEMFILE; cd #{path} 2> /dev/null; bundle exec rake shops 2>/dev/null"`
|
23
11
|
json = json.split("----snip----\n").last
|
12
|
+
json = json.split("\n").last
|
24
13
|
Oj.load json
|
25
14
|
end
|
26
|
-
|
27
15
|
end
|
28
16
|
|
29
17
|
class ConfigMenu
|
30
|
-
|
31
18
|
attr_accessor :cfg
|
32
19
|
|
33
20
|
def initialize(cfg)
|
@@ -35,6 +22,7 @@ class ConfigMenu
|
|
35
22
|
@menu_choices = [:do_nothing]
|
36
23
|
@menu_display = []
|
37
24
|
end
|
25
|
+
|
38
26
|
def build
|
39
27
|
header("Test Shops")
|
40
28
|
cfg[:test_shops].keys.each do |k|
|
@@ -103,8 +91,6 @@ shopifydev_command_set = Pry::CommandSet.new do
|
|
103
91
|
|
104
92
|
config_menu = ConfigMenu.new(Shopifydev::Config.config).build
|
105
93
|
|
106
|
-
|
107
|
-
|
108
94
|
case true
|
109
95
|
when args.empty?
|
110
96
|
config_menu.print(output)
|
@@ -137,7 +123,7 @@ shopifydev_command_set = Pry::CommandSet.new do
|
|
137
123
|
output.puts "you picked #{path.join('.')}"
|
138
124
|
output.puts cfg.inspect
|
139
125
|
app = LocalShopifyApp.new(cfg)
|
140
|
-
output.puts Color.yellow{ app.shops.inspect }
|
126
|
+
output.puts Color.yellow{ app.shops.inspect }
|
141
127
|
when :heroku
|
142
128
|
output.puts "you picked #{path.join('.')}"
|
143
129
|
output.puts cfg.inspect
|
@@ -188,7 +174,6 @@ shopifydev_command_set = Pry::CommandSet.new do
|
|
188
174
|
ix += output_menu_choices(cfg[:apps][:heroku].keys.sort, ix)
|
189
175
|
end
|
190
176
|
end
|
191
|
-
|
192
177
|
end
|
193
178
|
|
194
179
|
Pry::Commands.import shopifydev_command_set
|
@@ -0,0 +1,176 @@
|
|
1
|
+
puts "yo, included"
|
2
|
+
|
3
|
+
module Shopifydev
|
4
|
+
module ShopifyAPI
|
5
|
+
module DirtyCache
|
6
|
+
def dirty!
|
7
|
+
ShopifyAPI.dirty!
|
8
|
+
end
|
9
|
+
|
10
|
+
def site=(uri)
|
11
|
+
ShopifyAPI.dirty!
|
12
|
+
super uri
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
module ShopifyAPI
|
19
|
+
class Base
|
20
|
+
include Shopifydev::ShopifyAPI::DirtyCache
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
module ShopifyAPI
|
25
|
+
class << self
|
26
|
+
|
27
|
+
def cache_status(cache, show_opts=false)
|
28
|
+
dirty?
|
29
|
+
subset = ''
|
30
|
+
opts = ''
|
31
|
+
length = Color.black{'unloaded'}
|
32
|
+
since = ''
|
33
|
+
unless cache.nil?
|
34
|
+
if !show_opts && (cache.params.keys.to_set != Set[:limit])
|
35
|
+
subset = Color.red('!')
|
36
|
+
end
|
37
|
+
if show_opts
|
38
|
+
opts = cache.params.map{|k, v| Color.magenta{k.to_s} + Color.black{':'} + Color.green{v.to_s}}.join(Color.black{', '})
|
39
|
+
opts = "\n #{opts}"
|
40
|
+
end
|
41
|
+
length = (cache.length > 0) ? "#{cache.length.to_s}#{subset} #{Color.black{cache.label}}" : 'empty'
|
42
|
+
since = "#{Color.black{'on:'}}#{cache.since.strftime("%a %H:%M:%S")}"
|
43
|
+
end
|
44
|
+
"#{length.ljust(18)} #{since}#{opts}"
|
45
|
+
end
|
46
|
+
|
47
|
+
def caches(show_opts=false)
|
48
|
+
return if warn_site
|
49
|
+
dirty?
|
50
|
+
puts <<-EOF
|
51
|
+
#{Color.blue{'products'}}: #{cache_status(@@products, show_opts)}
|
52
|
+
#{Color.blue{'variants'}}: #{cache_status(@@variants, show_opts)}
|
53
|
+
#{Color.blue{'metafields'}}: #{cache_status(@@metafields, show_opts)}
|
54
|
+
#{Color.blue{'orders'}}: #{cache_status(@@orders, show_opts)}
|
55
|
+
#{Color.blue{'customers'}}: #{cache_status(@@customers, show_opts)}
|
56
|
+
#{Color.blue{'custom_collections'}}: #{cache_status(@@custom_collections, show_opts)}
|
57
|
+
#{Color.blue{'smart_collections'}}: #{cache_status(@@smart_collections, show_opts)}
|
58
|
+
EOF
|
59
|
+
end
|
60
|
+
|
61
|
+
def dirty?
|
62
|
+
@@products ||= nil
|
63
|
+
@@variants ||= nil
|
64
|
+
@@metafields ||= nil
|
65
|
+
@@orders ||= nil
|
66
|
+
@@customers ||= nil
|
67
|
+
@@custom_collections ||= nil
|
68
|
+
@@smart_collections ||= nil
|
69
|
+
end
|
70
|
+
|
71
|
+
def dirty!
|
72
|
+
@@products = nil
|
73
|
+
@@variants = nil
|
74
|
+
@@metafields = nil
|
75
|
+
@@orders = nil
|
76
|
+
@@customers = nil
|
77
|
+
@@custom_collections = nil
|
78
|
+
@@smart_collections = nil
|
79
|
+
end
|
80
|
+
|
81
|
+
def add_cache_methods(obj, opts, entity)
|
82
|
+
obj.singleton_class.class_eval{define_method(:label){entity.collection_name}}
|
83
|
+
obj.singleton_class.class_eval{define_method(:since=){|t| @since = t }}
|
84
|
+
obj.singleton_class.class_eval{define_method(:since){ @since }}
|
85
|
+
obj.singleton_class.class_eval{attr_accessor :params}
|
86
|
+
obj.since = Time.now
|
87
|
+
obj.singleton_class.class_eval{define_method(:r) { |msg = 'reloading'|
|
88
|
+
puts "#{msg}..."
|
89
|
+
self.replace(entity.find(:all, params: self.params))
|
90
|
+
self.since = Time.now
|
91
|
+
puts "#{self.length} records."
|
92
|
+
nil
|
93
|
+
}}
|
94
|
+
end
|
95
|
+
|
96
|
+
def warn_site
|
97
|
+
if ::ShopifyAPI::Base.site.nil? || ::ShopifyAPI::Base.site.blank?
|
98
|
+
puts "No active Shopify session"
|
99
|
+
true
|
100
|
+
else
|
101
|
+
false
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
def fetch_cache(entity, opts, obj)
|
106
|
+
msg = nil
|
107
|
+
refresh = opts.delete(:r)
|
108
|
+
if obj.nil? || refresh
|
109
|
+
obj = []
|
110
|
+
add_cache_methods(obj, opts, entity)
|
111
|
+
obj.params = opts
|
112
|
+
msg = refresh ? "reloading #{entity.collection_name}" : "loading #{entity.collection_name}"
|
113
|
+
obj.r(msg)
|
114
|
+
elsif (obj.params != opts)
|
115
|
+
msg = "reloading #{entity.collection_name} with new params..."
|
116
|
+
obj.params = opts
|
117
|
+
obj.r(msg)
|
118
|
+
end
|
119
|
+
obj
|
120
|
+
end
|
121
|
+
|
122
|
+
def products(opts={limit: 250})
|
123
|
+
return if warn_site
|
124
|
+
@@products ||= nil
|
125
|
+
@@products = fetch_cache(ShopifyAPI::Product, opts, @@products)
|
126
|
+
@@products
|
127
|
+
end
|
128
|
+
|
129
|
+
def variants(opts={limit: 250})
|
130
|
+
return if warn_site
|
131
|
+
@@variants ||= nil
|
132
|
+
@@variants = fetch_cache(ShopifyAPI::Variant, opts, @@variants)
|
133
|
+
@@variants
|
134
|
+
|
135
|
+
end
|
136
|
+
|
137
|
+
def orders(opts={limit: 250})
|
138
|
+
return if warn_site
|
139
|
+
@@orders ||= nil
|
140
|
+
@@orders = fetch_cache(ShopifyAPI::Order, opts, @@orders)
|
141
|
+
@@orders
|
142
|
+
end
|
143
|
+
|
144
|
+
def customers(opts={limit: 250})
|
145
|
+
return if warn_site
|
146
|
+
@@customers ||= nil
|
147
|
+
@@customers = fetch_cache(ShopifyAPI::Customer, opts, @@customers)
|
148
|
+
@@customers
|
149
|
+
end
|
150
|
+
|
151
|
+
def metafields(opts={limit: 250})
|
152
|
+
return if warn_site
|
153
|
+
@@metafields ||= nil
|
154
|
+
@@metafields = fetch_cache(ShopifyAPI::Metafield, opts, @@metafields)
|
155
|
+
@@metafields
|
156
|
+
end
|
157
|
+
|
158
|
+
def custom_collections(opts={limit: 250})
|
159
|
+
return if warn_site
|
160
|
+
@@custom_collections ||= nil
|
161
|
+
@@custom_collections = fetch_cache(ShopifyAPI::CustomCollection, opts, @@custom_collections)
|
162
|
+
@@custom_collections
|
163
|
+
end
|
164
|
+
|
165
|
+
def smart_collections(opts={limit: 250})
|
166
|
+
return if warn_site
|
167
|
+
@@smart_collections ||= nil
|
168
|
+
@@smart_collections = fetch_cache(ShopifyAPI::SmartCollection, opts, @@smart_collections)
|
169
|
+
@@smart_collections
|
170
|
+
end
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
end
|
176
|
+
end
|
data/lib/shopifydev/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopifydev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shopify_api
|
@@ -215,6 +215,7 @@ files:
|
|
215
215
|
- lib/shopifydev/asset.rb
|
216
216
|
- lib/shopifydev/commands.rb
|
217
217
|
- lib/shopifydev/config.rb
|
218
|
+
- lib/shopifydev/console.rb
|
218
219
|
- lib/shopifydev/generators/shop.rb
|
219
220
|
- lib/shopifydev/generators/templates/Gemfile
|
220
221
|
- lib/shopifydev/generators/templates/gitignore
|
@@ -223,19 +224,16 @@ files:
|
|
223
224
|
- lib/shopifydev/pry/commands.rb
|
224
225
|
- lib/shopifydev/railtie.rb
|
225
226
|
- lib/shopifydev/shop.rb
|
227
|
+
- lib/shopifydev/shopify_api/caches.rb
|
226
228
|
- lib/shopifydev/template.rb
|
227
229
|
- lib/shopifydev/version.rb
|
228
230
|
- shopifydev.gemspec
|
229
231
|
- spec/shopifydev/config_spec.rb
|
232
|
+
- spec/shopifydev/console_spec.rb
|
230
233
|
- spec/shopifydev/generators/shopifydev/shopifydev_generator_spec.rb
|
231
234
|
- spec/shopifydev/pry/commands_spec.rb
|
232
235
|
- spec/shopifydev/railtie_spec.rb
|
233
|
-
-
|
234
|
-
- templates/customers/register.liquid
|
235
|
-
- templates/page.support.liquid
|
236
|
-
- templates/page.verbose.liquid
|
237
|
-
- templates/product.liquid
|
238
|
-
- templates/search.liquid
|
236
|
+
- spec/shopifydev/shopifyapi/caches_spec.rb
|
239
237
|
- test_driver.rb
|
240
238
|
homepage: ''
|
241
239
|
licenses: []
|
@@ -251,7 +249,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
251
249
|
version: '0'
|
252
250
|
segments:
|
253
251
|
- 0
|
254
|
-
hash: -
|
252
|
+
hash: -20439056481340104
|
255
253
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
256
254
|
none: false
|
257
255
|
requirements:
|
@@ -260,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
258
|
version: '0'
|
261
259
|
segments:
|
262
260
|
- 0
|
263
|
-
hash: -
|
261
|
+
hash: -20439056481340104
|
264
262
|
requirements: []
|
265
263
|
rubyforge_project:
|
266
264
|
rubygems_version: 1.8.25
|
@@ -270,6 +268,8 @@ summary: Abstract out and port to ruby the functionality of the shopify textmate
|
|
270
268
|
for use in other editors.
|
271
269
|
test_files:
|
272
270
|
- spec/shopifydev/config_spec.rb
|
271
|
+
- spec/shopifydev/console_spec.rb
|
273
272
|
- spec/shopifydev/generators/shopifydev/shopifydev_generator_spec.rb
|
274
273
|
- spec/shopifydev/pry/commands_spec.rb
|
275
274
|
- spec/shopifydev/railtie_spec.rb
|
275
|
+
- spec/shopifydev/shopifyapi/caches_spec.rb
|
@@ -1,109 +0,0 @@
|
|
1
|
-
{% layout settings.customer_layout %}
|
2
|
-
|
3
|
-
<div id="admin_header">
|
4
|
-
<h2 class="title">Order {{ order.name }}</h2>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
{% if order.cancelled %}
|
8
|
-
<div id="order_cancelled" class="flash notice">
|
9
|
-
<h5 id="order_cancelled_title">Order Cancelled <span class="note">on {{ order.cancelled_at | date: "%B %d, %Y %I:%M%p" }}</span></h5>
|
10
|
-
<span class="note">{{ order.cancel_reason }}</span>
|
11
|
-
</div>
|
12
|
-
{% endif %}
|
13
|
-
|
14
|
-
<div class="note order_date">Placed on {{ order.created_at | date: "%B %d, %Y %I:%M%p" }}</div>
|
15
|
-
|
16
|
-
<div id="order_address" class="group">
|
17
|
-
<div id="order_payment">
|
18
|
-
<h3>Billing Address</h3>
|
19
|
-
<p><span class="note">Payment Status:</span> <span class="status_{{ order.financial_status }}">{{ order.financial_status }}</span></p>
|
20
|
-
<div class="address note">
|
21
|
-
<p>{{ order.billing_address.name }}</p>
|
22
|
-
<p>{{ order.billing_address.company }}</p>
|
23
|
-
<p>{{ order.billing_address.street }}</p>
|
24
|
-
<p>{{ order.billing_address.city }}, {{ order.billing_address.province }}</p>
|
25
|
-
<p>{{ order.billing_address.country }} {{ order.billing_address.zip }}</p>
|
26
|
-
<p>{{ order.billing_address.phone }}</p>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
{% if order.shipping_address %}
|
30
|
-
<div id="order_shipping">
|
31
|
-
<h3>Shipping Address</h3>
|
32
|
-
<p><span class="note">Fulfillment Status:</span> <span class="status_{{ order.fulfillment_status }}">{{ order.fulfillment_status }}</span></p>
|
33
|
-
<div class="address note">
|
34
|
-
<p>{{ order.shipping_address.name }}</p>
|
35
|
-
<p>{{ order.shipping_address.company }}</p>
|
36
|
-
<p>{{ order.shipping_address.street }}</p>
|
37
|
-
<p>{{ order.shipping_address.city }}, {{ order.shipping_address.province }}</p>
|
38
|
-
<p>{{ order.shipping_address.country }} {{ order.shipping_address.zip }}</p>
|
39
|
-
<p>{{ order.shipping_address.phone }}</p>
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
{% endif %}
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<table id="order_details">
|
46
|
-
<thead>
|
47
|
-
<tr id="cart-heading">
|
48
|
-
<th class="cart-header first" id="product"><h3>Product</h3></th>
|
49
|
-
<th class="cart-header first" id="sku"><h3>SKU</h3></th>
|
50
|
-
<th class="cart-header first" id="price"><h3>Price</h3></th>
|
51
|
-
<th class="cart-header first" id="quantity"><h3>Quantity</h3></th>
|
52
|
-
<th class="cart-header first" id="total"><h3>Total</h3></th>
|
53
|
-
</tr>
|
54
|
-
</thead>
|
55
|
-
<tbody>
|
56
|
-
{% for line_item in order.line_items %}
|
57
|
-
<tr id="{{ line_item.id }}" class="order cart-item {% cycle 'odd', 'even' %}">
|
58
|
-
<td class="product">
|
59
|
-
{{ line_item.title | link_to: line_item.product.url }}
|
60
|
-
{% if line_item.fulfillment %}
|
61
|
-
<div class="note">
|
62
|
-
Fulfilled {{ line_item.fulfillment.created_at | date: "%b %d" }}
|
63
|
-
{% if line_item.fulfillment.tracking_number %}
|
64
|
-
<a href="{{ line_item.fulfillment.tracking_url }}">{{ line_item.fulfillment.tracking_company }} #{{ line_item.fulfillment.tracking_number}}</a>
|
65
|
-
{% endif %}
|
66
|
-
</div>
|
67
|
-
{% endif %}
|
68
|
-
</td>
|
69
|
-
<td class="sku note">{{ line_item.sku }}</td>
|
70
|
-
<td class="money">{{ line_item.price | money }}</td>
|
71
|
-
<td class="quantity cente">{{ line_item.quantity }}</td>
|
72
|
-
<td class="total money">{{ line_item.quantity | times: line_item.price | money }}</td>
|
73
|
-
</tr>
|
74
|
-
{% endfor %}
|
75
|
-
</tbody>
|
76
|
-
<tfoot>
|
77
|
-
<tr class="order_summary note">
|
78
|
-
<td class="label" colspan="4">Subtotal:</td>
|
79
|
-
<td class="total money">{{ order.subtotal_price | money }}</td>
|
80
|
-
</tr>
|
81
|
-
|
82
|
-
{% for discount in order.discounts %}
|
83
|
-
<tr class="order_summary discount">
|
84
|
-
<td class="label" colspan="4">{{ discount.code }} Discount:</td>
|
85
|
-
<td class="total money">{{ discount.savings | money }}</td>
|
86
|
-
</tr>
|
87
|
-
{% endfor %}
|
88
|
-
|
89
|
-
{% for shipping_method in order.shipping_methods %}
|
90
|
-
<tr class="order_summary note">
|
91
|
-
<td class="label" colspan="4">Shipping ({{ shipping_method.title }}):</td>
|
92
|
-
<td class="total money">{{ shipping_method.price | money }}</td>
|
93
|
-
</tr>
|
94
|
-
{% endfor %}
|
95
|
-
|
96
|
-
{% for tax_line in order.tax_lines %}
|
97
|
-
<tr class="order_summary note">
|
98
|
-
<td class="label" colspan="4">Tax ({{ tax_line.title }} {{ tax_line.rate | times: 100 }}%):</td>
|
99
|
-
<td class="total money">{{ tax_line.price | money }}</td>
|
100
|
-
</tr>
|
101
|
-
{% endfor %}
|
102
|
-
|
103
|
-
<tr class="order_summary order_total">
|
104
|
-
<td class="label" colspan="4">Total:</td>
|
105
|
-
<td class="total money">{{ order.total_price | money }} {{ order.currency }}</td>
|
106
|
-
</tr>
|
107
|
-
</tfoot>
|
108
|
-
</table>
|
109
|
-
|
@@ -1,42 +0,0 @@
|
|
1
|
-
{% layout settings.customer_layout %}
|
2
|
-
|
3
|
-
<div id="template">
|
4
|
-
<div id="customer">
|
5
|
-
<!-- Create Customer -->
|
6
|
-
<div id="create-customer">
|
7
|
-
<div class="template_header">
|
8
|
-
<h2 class="title">Create Account</h2>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
{% form 'create_customer' %}
|
12
|
-
{{ form.errors | default_errors }}
|
13
|
-
|
14
|
-
<div id="first_name" class="clearfix large_form">
|
15
|
-
<label for="first_name" class="login">First Name</label>
|
16
|
-
<input type="text" value="" name="customer[first_name]" id="first_name" class="large" size="30" />
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div id="last_name" class="clearfix large_form">
|
20
|
-
<label for="last_name" class="login">Last Name</label>
|
21
|
-
<input type="text" value="" name="customer[last_name]" id="last_name" class="large" size="30" />
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<div id="email" class="clearfix large_form">
|
25
|
-
<label for="email" class="login">Email Address</label>
|
26
|
-
<input type="email" value="" name="customer[email]" id="email" class="large" size="30" />
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<div id="password" class="clearfix large_form">
|
30
|
-
<label for="password" class="login">Password</label>
|
31
|
-
<input type="password" value="" name="customer[password]" id="password" class="large password" size="30" />
|
32
|
-
</div>
|
33
|
-
|
34
|
-
<div class="action_bottom">
|
35
|
-
<input class="btn" type="submit" value="Create" />
|
36
|
-
<span class="note"> {{ 'Login' | customer_login_link }}</span>
|
37
|
-
<span class="note">or <a href="{{ shop.url }}">Return to Store</a></span>
|
38
|
-
</div>
|
39
|
-
{% endform %}
|
40
|
-
</div><!-- /#create-customer -->
|
41
|
-
</div>
|
42
|
-
</div>
|
@@ -1,78 +0,0 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<div id="page" class="clearfix">
|
6
|
-
|
7
|
-
<div id="header">
|
8
|
-
<div class="wrapper">
|
9
|
-
<p><h1>{{ page.title }}</h1></p>
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
|
13
|
-
<div class="content">
|
14
|
-
<div class="wrapper">
|
15
|
-
|
16
|
-
<div id="contact-menu">
|
17
|
-
{% for link in linklists['footer-support'].links %}
|
18
|
-
{% if link.title == page.title %}
|
19
|
-
<p><a href="{{ link.url }}" id="active"><h4>{{ link.title }}</h4></a></p>
|
20
|
-
{% else %}
|
21
|
-
<p><a href="{{ link.url }}"><h4>{{ link.title }}</h4></a></p>
|
22
|
-
{% endif %}
|
23
|
-
{% endfor %}
|
24
|
-
</div>
|
25
|
-
|
26
|
-
<div id="contact-form">
|
27
|
-
|
28
|
-
{% if page.title == "Contact" %}
|
29
|
-
|
30
|
-
{% form 'contact' %}
|
31
|
-
|
32
|
-
{% if form.posted_successfully? %}
|
33
|
-
Thanks for contacting us! We'll get back to you as soon as possible.
|
34
|
-
{% endif %}
|
35
|
-
|
36
|
-
{% if form.errors %}
|
37
|
-
{% for field in form.errors %}
|
38
|
-
<div>
|
39
|
-
<p id="error_message">{{ field }} - {{ form.errors.messages[field] }}</p>
|
40
|
-
</div>
|
41
|
-
{% endfor %}
|
42
|
-
{% endif %}
|
43
|
-
|
44
|
-
<div id="getintouch" style="float:left">
|
45
|
-
<h3>Get In Touch</h3>
|
46
|
-
<hr>
|
47
|
-
<small>* indicates a required field</small><br>
|
48
|
-
<input type="text" value="Full Name" name="contact[name]"> <br>
|
49
|
-
<input type="text" value="Email Address" name="contact[email]"> <span class="required"> *</span> <br>
|
50
|
-
<textarea cols="38" rows="5" type="text" name="contact[message]">your message</textarea>
|
51
|
-
<input type="image" src="{{ 'getintouch.png' | asset_url }}" class="submit">
|
52
|
-
</div>
|
53
|
-
{% endform %}
|
54
|
-
|
55
|
-
|
56
|
-
<div id="contact-info">
|
57
|
-
<h3>Visit Our Store</h3>
|
58
|
-
<hr>
|
59
|
-
<p>Suite A - 123 Something Street <br>
|
60
|
-
Vancouver, BC Postal Code <br>
|
61
|
-
Canada</p>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
<div id="contact-info">
|
65
|
-
<h3>Customer Support</h3>
|
66
|
-
<hr>
|
67
|
-
<p>(800)123-1234 <br>
|
68
|
-
support@elroy.com</p>
|
69
|
-
</div>
|
70
|
-
{% else %}
|
71
|
-
{{ page.content }}
|
72
|
-
{% endif %}
|
73
|
-
|
74
|
-
</div>
|
75
|
-
|
76
|
-
</div>
|
77
|
-
</div>
|
78
|
-
</div> <!-- /#page -->
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<div id="page" class="clearfix">
|
2
|
-
|
3
|
-
<div id="header">
|
4
|
-
<div class="wrapper">
|
5
|
-
<p><h1>{{ page.title }}</h1></p>
|
6
|
-
</div>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div class="content">
|
10
|
-
<div class="wrapper">
|
11
|
-
|
12
|
-
<div id="contact-form">
|
13
|
-
{{ page.content }}
|
14
|
-
</div>
|
15
|
-
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
</div> <!-- /#page -->
|
data/templates/product.liquid
DELETED
@@ -1,284 +0,0 @@
|
|
1
|
-
{% include 'breadcrumbs' %}
|
2
|
-
|
3
|
-
<div id="product" class="content {{ product.handle }}{% if product.images.size == 1 %} one_image{% endif %} clearfix">
|
4
|
-
|
5
|
-
<div class="wrapper">
|
6
|
-
<div id="product-image">
|
7
|
-
{% if product.images.size > 1 %}
|
8
|
-
<div id="product-image-icons">
|
9
|
-
{% for image in product.images %}
|
10
|
-
<!-- CC attribution
|
11
|
-
magnifying-glass.ico
|
12
|
-
http://www.wpzoom.com
|
13
|
-
Designed by David Ferreira.
|
14
|
-
-->
|
15
|
-
<div class="image">
|
16
|
-
<a href="{{ image.src | product_img_url: 'original' }}" class="cloud-zoom-gallery" rel="useZoom: 'placeholder', smallImage: '{{ image.src | product_img_url: 'grande' }}', tint: '#ffffff'">
|
17
|
-
<img src="{{ image.src | product_img_url: 'small' }}" alt="{{ image.alt | escape }}" />
|
18
|
-
</a>
|
19
|
-
</div>
|
20
|
-
{% endfor %}
|
21
|
-
</div><!-- /.thumbs -->
|
22
|
-
{% endif %}
|
23
|
-
<div id="product-image-large">
|
24
|
-
<div class="image">
|
25
|
-
<a href="{{ product.featured_image.src | product_img_url: 'original' }}" class="cloud-zoom" rel="position: 'inside', showTitle: 'false'" id="placeholder">
|
26
|
-
<img src="{{ product.featured_image.src | product_img_url: 'grande' }}" alt="{{ product.featured_image.alt | escape }}" />
|
27
|
-
</a>
|
28
|
-
</div>
|
29
|
-
|
30
|
-
</div> <!-- /.featured -->
|
31
|
-
<div id="product-image-zoom">Hover over image to zoom</div>
|
32
|
-
</div> <!-- /.images -->
|
33
|
-
|
34
|
-
<div id="product-content">
|
35
|
-
{% if collection %}
|
36
|
-
<div class="more-info clearfix">
|
37
|
-
{% if collection.previous_product %}
|
38
|
-
<div class="fl">
|
39
|
-
<a href="{{ collection.previous_product }}" class="previous_product"><span class="upper">Previous</span> <span class="lower">Product</span></a>
|
40
|
-
</div>
|
41
|
-
{% endif %}
|
42
|
-
{% if collection.next_product %}
|
43
|
-
<div class="fr">
|
44
|
-
<a href="{{ collection.next_product }}" class="next_product"><span class="upper">Next</span> <span class="lower">Product</span></a>
|
45
|
-
</div>
|
46
|
-
{% endif %}
|
47
|
-
</div>
|
48
|
-
{% endif %}
|
49
|
-
|
50
|
-
<div id="product-full-description">
|
51
|
-
<div id="product-category">{{ collection.title | split: ' -- ' | last }}</div>
|
52
|
-
<h2 class="title">{{ product.title }}</h2>
|
53
|
-
{% if product.price_min < product.compare_at_price_min %}
|
54
|
-
<div id="product-price">{{ product.price_min | money }}</div>
|
55
|
-
<div id="product-price-old"><strike>{{ product.compare_at_price_min | money }}</strike></div>
|
56
|
-
{% else %}
|
57
|
-
<div id="product-price">{{ product.price_min | money }}</div>
|
58
|
-
{% endif %}
|
59
|
-
|
60
|
-
{% if settings.product_description_position == "top" %}
|
61
|
-
|
62
|
-
{% include 'shipping-and-return-tabs' %}
|
63
|
-
|
64
|
-
{% endif %}
|
65
|
-
|
66
|
-
<form id="add-item-form" action="/cart/add" method="post" class="variants clearfix">
|
67
|
-
{% if product.options.size > 1 %}
|
68
|
-
<div class="select clearfix">
|
69
|
-
|
70
|
-
<div id="product-color">
|
71
|
-
<div id="variant_details"></div>
|
72
|
-
<h4 style="color:#333">Please choose a color:</h4>
|
73
|
-
{% include 'swatches' %}
|
74
|
-
</div>
|
75
|
-
|
76
|
-
<div id="product-size" class="product-info">
|
77
|
-
<select id="product-select" name='id'>
|
78
|
-
{% for variant in product.variants %}
|
79
|
-
<option value="{{ variant.id }}">{{ variant.title }} - {{ variant.price | money }}</option>
|
80
|
-
{% endfor %}
|
81
|
-
</select>
|
82
|
-
</div>
|
83
|
-
</div>
|
84
|
-
{% elsif product.options.size == 1 and product.variants.size > 1 %}
|
85
|
-
<div class="select clearfix">
|
86
|
-
<label>{{ product.options[0] }}</label>
|
87
|
-
<select id="product-select" name='id'>
|
88
|
-
{% for variant in product.variants %}
|
89
|
-
<option value="{{ variant.id }}">{{ variant.title }} - {{ variant.price | money }}</option>
|
90
|
-
{% endfor %}
|
91
|
-
</select>
|
92
|
-
</div>
|
93
|
-
{% else %}
|
94
|
-
<input type="hidden" name="id" value="{{ product.variants.first.id }}" />
|
95
|
-
{% endif %}
|
96
|
-
|
97
|
-
<div id="product-quantity">
|
98
|
-
<label for="quantity"><h5 style="float:left">Quantity:</h5></label>
|
99
|
-
<input min="1" type="number" id="quantity" name="quantity" value="1" />
|
100
|
-
</div>
|
101
|
-
|
102
|
-
|
103
|
-
{% if product.available %}
|
104
|
-
<div class="purchase clearfix">
|
105
|
-
<span><input type="image" src="{{ 'cart.png' | asset_url }}" name="add" id="add-to-cart" value="Add to Cart" class="cart cufon" /></span>
|
106
|
-
</div>
|
107
|
-
{% else %}
|
108
|
-
<div class="purchase clearfix">
|
109
|
-
<span><input type="submit" name="add" id="add-to-cart" value="Sold Out" class="cart cufon disabled" disabled="disabled" /></span>
|
110
|
-
</div>
|
111
|
-
{% endif %}
|
112
|
-
|
113
|
-
</form>
|
114
|
-
|
115
|
-
<hr />
|
116
|
-
|
117
|
-
{% if settings.product_description_position == "bottom" %}
|
118
|
-
|
119
|
-
{% include 'shipping-and-return-tabs' %}
|
120
|
-
|
121
|
-
<div id="social-media">
|
122
|
-
{% include 'pinterest' %}
|
123
|
-
{% include 'like' %}
|
124
|
-
{% include 'amazon-wish-list' %}
|
125
|
-
</div>
|
126
|
-
{% endif %}
|
127
|
-
|
128
|
-
</div>
|
129
|
-
</div>
|
130
|
-
|
131
|
-
{% comment %} Related Products {% endcomment %}
|
132
|
-
{% include 'related-products' %}
|
133
|
-
|
134
|
-
</div>
|
135
|
-
|
136
|
-
</div> <!-- /#product -->
|
137
|
-
|
138
|
-
<script type="text/javascript">
|
139
|
-
|
140
|
-
// <![CDATA[
|
141
|
-
var selectCallback = function(variant, selector) {
|
142
|
-
|
143
|
-
// #variant_details is in snippets/shipping-and-return-tabs
|
144
|
-
var description = jQuery('#variant_details')
|
145
|
-
|
146
|
-
// if we have product variants with details
|
147
|
-
{% if product.metafields.variants.variant_details %}
|
148
|
-
|
149
|
-
// make an array of the details
|
150
|
-
var metafields = {{ product.metafields.variants.variant_details | json }}.split(':')
|
151
|
-
|
152
|
-
// match the details against the selected variant
|
153
|
-
var match = true
|
154
|
-
for (i = 0; i < variant.options.length; i++) {
|
155
|
-
|
156
|
-
if (variant.options[i].toLowerCase().trim() === metafields[i].trim()) {
|
157
|
-
// NOP
|
158
|
-
} else {
|
159
|
-
match = false;
|
160
|
-
}
|
161
|
-
} // post: if a metafield matched the current variant exactly, match is true
|
162
|
-
|
163
|
-
// if it was a complete match, then post the last detail
|
164
|
-
if (match === true) {
|
165
|
-
description.text(metafields.pop().trim())
|
166
|
-
description.addClass('active')
|
167
|
-
} else {
|
168
|
-
description.text('')
|
169
|
-
description.removeClass('active')
|
170
|
-
}
|
171
|
-
{% endif %}
|
172
|
-
|
173
|
-
if (variant && variant.available == true) {
|
174
|
-
// selected a valid variant
|
175
|
-
jQuery('#add-to-cart').removeClass('disabled').removeAttr('disabled').val('Add to Cart'); // remove unavailable class from add-to-cart button, and re-enable button
|
176
|
-
if(variant.price < variant.compare_at_price){
|
177
|
-
jQuery('#price-preview').html('<span class="money">'
|
178
|
-
+ Shopify.formatMoney(variant.price, "{{ shop.money_format }}")
|
179
|
-
+ '</span>'
|
180
|
-
+ ' was <span class="money">'
|
181
|
-
+ Shopify.formatMoney(variant.compare_at_price, "{{ shop.money_format }}")
|
182
|
-
+ "</span>");
|
183
|
-
} else {
|
184
|
-
jQuery('#price-preview').html('<span class="money">' + Shopify.formatMoney(variant.price, "{{ shop.money_format }}") + '</span>');
|
185
|
-
}
|
186
|
-
|
187
|
-
} else {
|
188
|
-
// variant doesn't exist
|
189
|
-
var message = variant ? "Sold Out" : "Unavailable";
|
190
|
-
jQuery('#add-to-cart').addClass('disabled').attr('disabled', 'disabled').val('Sold Out'); // set add-to-cart button to unavailable class and disable button
|
191
|
-
jQuery('#product .variants .price').text(message); // update price-field message
|
192
|
-
}
|
193
|
-
};
|
194
|
-
|
195
|
-
function remove(s, t) {
|
196
|
-
/*
|
197
|
-
** Remove all occurrences of a token in a string
|
198
|
-
** s string to be processed
|
199
|
-
** t token to be removed
|
200
|
-
** returns new string
|
201
|
-
*/
|
202
|
-
i = s.indexOf(t);
|
203
|
-
r = "";
|
204
|
-
if (i == -1) return s;
|
205
|
-
r += s.substring(0,i) + remove(s.substring(i + t.length), t);
|
206
|
-
return r;
|
207
|
-
}
|
208
|
-
|
209
|
-
// initialize multi selector for product
|
210
|
-
jQuery(function() {
|
211
|
-
/* NOTE we are not using recently-viewed, so I am removing the related code
|
212
|
-
if(jQuery.cookie("viewed-products") != null){ // if cookie exists...
|
213
|
-
var products = jQuery.cookie("viewed-products");
|
214
|
-
var productHandles = products.split(" ");
|
215
|
-
var matches = 0;
|
216
|
-
var limit = 4;
|
217
|
-
for(var i = (productHandles.length - 1); i >= 0; i--) {
|
218
|
-
if(productHandles[i] != "{{ product.handle }}" && productHandles[i] != "" && (matches < limit)){
|
219
|
-
Shopify.getProduct(productHandles[i]);
|
220
|
-
matches++;
|
221
|
-
}
|
222
|
-
}
|
223
|
-
|
224
|
-
if(products.indexOf("{{ product.handle }}") == -1){ // add current product to list if it isn't already there
|
225
|
-
products += " {{ product.handle }}";
|
226
|
-
jQuery.cookie("viewed-products", products, {path: "/"});
|
227
|
-
} else { // if it is already there, push it to the end of the string
|
228
|
-
var newstring = remove(products, '{{ product.handle }}');
|
229
|
-
newstring += " {{ product.handle }}";
|
230
|
-
jQuery.cookie("viewed-products", newstring.replace(/ /g,' '), {path: "/"});
|
231
|
-
}
|
232
|
-
} else { // create cookie if it doesn't already exist
|
233
|
-
jQuery.cookie("viewed-products", "{{ product.handle }}", {path: "/"});
|
234
|
-
} */
|
235
|
-
|
236
|
-
// create the multi-selector
|
237
|
-
{% if product.variants.size > 1 or product.options.size > 1 %}
|
238
|
-
new Shopify.OptionSelectors("product-select", { product: {{ product | json }}, onVariantSelected: selectCallback });
|
239
|
-
|
240
|
-
// wrap the labels for Cufon styling
|
241
|
-
var labels = jQuery('#product-size .selector-wrapper label')
|
242
|
-
labels.wrapInner('<h4 class="selector-label" />')
|
243
|
-
|
244
|
-
// add classes to each option for chaining
|
245
|
-
{% for variant in product.variants %}
|
246
|
-
|
247
|
-
var colour = '{{ variant.option1 }}'
|
248
|
-
var size = '{{ variant.option2 }}'
|
249
|
-
|
250
|
-
jQuery('#product-select-option-1'
|
251
|
-
+ ' option[value="' + size + '"]').addClass(colour)
|
252
|
-
|
253
|
-
{% endfor %}
|
254
|
-
|
255
|
-
// choose a default value for each selector in the cluster
|
256
|
-
{% assign found_one_in_stock = false %}
|
257
|
-
{% for variant in product.variants %}
|
258
|
-
{% if variant.available and found_one_in_stock == false %}
|
259
|
-
|
260
|
-
// for the first variant that is in stock
|
261
|
-
{% assign found_one_in_stock = true %}
|
262
|
-
{% for option in product.options %}
|
263
|
-
jQuery('#product-select-option-' + {{ forloop.index0 }}).val({{ variant.options[forloop.index0] | json }}).trigger('change');
|
264
|
-
|
265
|
-
{% endfor %}
|
266
|
-
{% endif %}
|
267
|
-
{% endfor %}
|
268
|
-
|
269
|
-
{% endif %}
|
270
|
-
|
271
|
-
$("#product-select-option-1").chained("#product-select-option-0"); /* or $("#series").chainedTo("#mark"); */
|
272
|
-
|
273
|
-
});
|
274
|
-
|
275
|
-
/* NOTE we are not using recently-viewed so I am removing the related code
|
276
|
-
Shopify.onProduct = function(product) {
|
277
|
-
jQuery("#recently-viewed").css('display', 'block');
|
278
|
-
jQuery("#recently-viewed .products").append('<div class="product"><div class="image"><a href="' + product.url + '"><img src="' + Shopify.resizeImage(product.featured_image, 'large') + '" alt="' + product.title + '" /></a></div><div class="details clearfix"><a href="' + product.url + '"><span class="title">' + product.title + '</span></a></div></div>');
|
279
|
-
jQuery("#recently-viewed .products .product:nth-child(4)").addClass("last");
|
280
|
-
jQuery("#content-slide .product .details, #content-table .product .details").css({opacity:0.0});
|
281
|
-
}; */
|
282
|
-
// ]]>
|
283
|
-
</script>
|
284
|
-
|
data/templates/search.liquid
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
<div id="search" class="clearfix">
|
2
|
-
{% if search.performed %}
|
3
|
-
<div class="main">
|
4
|
-
{% paginate search.results by settings.pagination_limit %}
|
5
|
-
<div class="more-info clearfix">
|
6
|
-
<div class="fl">
|
7
|
-
<span class="upper">Search Results</span>
|
8
|
-
<span class="lower">{{ search.results_count }} {{ search.results_count | pluralize: 'Match', 'Matches' }} </span>
|
9
|
-
</div>
|
10
|
-
<div class="fr">
|
11
|
-
<span class="upper"> </span>
|
12
|
-
<span class="lower">{% include 'pagination' %}</span>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
{% if search.terms == "" %}
|
16
|
-
<p>Your search query was empty.</p>
|
17
|
-
{% else %}
|
18
|
-
{% if search.results == empty %}
|
19
|
-
<div class="empty">
|
20
|
-
Your search for "{{search.terms | escape}}" did not yield any results
|
21
|
-
</div>
|
22
|
-
{% else %}
|
23
|
-
|
24
|
-
<div class="results">
|
25
|
-
{% for item in search.results %}
|
26
|
-
<div class="item clearfix">
|
27
|
-
<div class="thumbnail">
|
28
|
-
<a href="{{ item.url }}">{{ item.featured_image.src | product_img_url: 'thumb' | img_tag: item.featured_image.alt }}</a>
|
29
|
-
</div>
|
30
|
-
<div class="content">
|
31
|
-
<h4>{{ item.title | link_to: item.url }}</h4>
|
32
|
-
{{ item.content | strip_html | truncatewords: 40 | highlight: search.terms }}
|
33
|
-
</div>
|
34
|
-
</div> <!-- /.item -->
|
35
|
-
{% endfor %}
|
36
|
-
</div> <!-- /.results -->
|
37
|
-
|
38
|
-
{% endif %}
|
39
|
-
{% endif %}
|
40
|
-
|
41
|
-
<div class="more-info clearfix">
|
42
|
-
<div class="fr">
|
43
|
-
<span class="upper"> </span>
|
44
|
-
<span class="lower">{% include 'pagination' %}</span>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
|
48
|
-
{% endpaginate %}
|
49
|
-
</div> <!-- /.main -->
|
50
|
-
{% include "sidebar" %}
|
51
|
-
|
52
|
-
{% else %}
|
53
|
-
|
54
|
-
<div id="not_found">
|
55
|
-
<h2>Search our shop</h2>
|
56
|
-
<form id="search_form" class="searchform" name="search" action="/search">
|
57
|
-
<input type="text" class="replace" name="q" value="Search..." />
|
58
|
-
</form>
|
59
|
-
</div> <!-- /#not_found -->
|
60
|
-
|
61
|
-
{% endif %}
|
62
|
-
</div> <!-- /#search -->
|
63
|
-
{% include 'featured-products' %}
|