spree_variant_options 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/README.md +54 -40
  2. data/Versionfile +1 -0
  3. data/app/assets/javascripts/store/product_variant_options.js +24 -0
  4. data/app/assets/javascripts/store/variant_options.js +2 -1
  5. data/app/assets/stylesheets/store/{variant_options.css → variant_options.css.erb} +1 -6
  6. data/app/controllers/spree/admin/option_values_controller.rb +18 -0
  7. data/app/models/option_value_decorator.rb +1 -1
  8. data/app/models/product_decorator.rb +1 -1
  9. data/app/overrides/spree_variant_options.rb +26 -5
  10. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +7 -0
  11. data/app/views/spree/admin/option_values/_table_header.html.erb +7 -0
  12. data/app/views/{products → spree/products}/_variant_options.html.erb +2 -7
  13. data/config/routes.rb +4 -6
  14. data/db/migrate/20120213174249_add_image_to_option_values.rb +8 -0
  15. data/features/{admin_option_types.feature → spree/admin/option_types.feature} +0 -0
  16. data/features/{variant_options.feature → spree/variant_options.feature} +0 -0
  17. data/features/step_definitions/option_values.rb +8 -8
  18. data/features/step_definitions/variant_options.rb +6 -5
  19. data/features/step_definitions/web_steps.rb +36 -10
  20. data/features/support/env.rb +4 -6
  21. data/lib/generators/spree_variant_options/install_generator.rb +9 -26
  22. data/lib/spree_variant_options.rb +5 -21
  23. data/lib/spree_variant_options/engine.rb +19 -0
  24. data/lib/spree_variant_options/version.rb +1 -1
  25. data/spree_variant_options.gemspec +3 -3
  26. data/test/dummy_hooks/before_migrate.rb +16 -10
  27. data/test/dummy_hooks/templates/spree_user_error_fix.rb +3 -0
  28. data/test/dummy_hooks/templates/store/screen.css +749 -0
  29. data/test/support/factories.rb +8 -8
  30. data/test/support/user_fix.rb +5 -0
  31. data/test/test_helper.rb +1 -2
  32. data/test/unit/{option_value_test.rb → spree/option_value_test.rb} +4 -4
  33. data/test/unit/{product_test.rb → spree/product_test.rb} +1 -1
  34. metadata +45 -38
  35. data/app/assets/javascripts/store/product.js +0 -38
  36. data/app/controllers/admin/option_values_controller.rb +0 -14
  37. data/app/views/admin/option_types/_option_value_fields.html.erb +0 -8
  38. data/app/views/admin/option_types/edit.html.erb +0 -33
  39. data/lib/generators/templates/db/migrate/add_image_to_option_values.rb +0 -14
@@ -1,20 +1,49 @@
1
1
  require 'uri'
2
2
  require 'cgi'
3
- require File.expand_path("../../support/paths.rb", __FILE__)
4
- require File.expand_path("../../support/selectors.rb", __FILE__)
5
3
 
6
4
  def get_parent(parent)
7
5
  case parent.sub(/^the\s/, '')
8
6
  when "flash notice"; ".flash"
9
- when "first set of options"; "#option_type_#{@product.option_types.first.id}"
10
- when "second set of options"; "#option_type_#{@product.option_types[1].id}"
7
+ when "first set of options"; "#spree_option_type_#{@product.option_types.first.id}"
8
+ when "second set of options"; "#spree_option_type_#{@product.option_types[1].id}"
11
9
  when "variant images label"; "#product-thumbnails"
12
- when "price"; "#product-price .price"
10
+ when "price"; "#product-price .price"
13
11
  else "[set-your-parent] #{parent}"
14
12
  end
15
13
  end
16
14
 
17
15
 
16
+ # WTF OMG HAX!
17
+ # Why aren't these url helpers present from the spree core?
18
+ # I've tried to include them in the env like so:
19
+ #
20
+ # World(Spree::Core::Engine.routes.url_helpers)
21
+ #
22
+ # and like so:
23
+ #
24
+ # World(Rails.application.routes.url_helpers)
25
+ #
26
+ # WTF?!?!?
27
+
28
+ def id_or_param(id)
29
+ id = id.to_param if id.respond_to?(:to_param)
30
+ id
31
+ end
32
+
33
+ def cart_path
34
+ "/cart"
35
+ end
36
+
37
+ def product_path(id)
38
+ "/products/#{id_or_param(id)}"
39
+ end
40
+
41
+ def edit_admin_option_type_path(id)
42
+ "/admin/option_types/#{id_or_param(id)}/edit"
43
+ end
44
+
45
+
46
+
18
47
  #========================================================================
19
48
  # Givens
20
49
 
@@ -30,9 +59,9 @@ end
30
59
  Given /^I'm on the ((?!page).*) page for (.*)$/ do |path, id|
31
60
  id = case id
32
61
  when "the first product"
33
- @product ||= Product.last
62
+ @product ||= Spree::Product.last
34
63
  when 'option type "Size"'
35
- @option_type = OptionType.find_by_presentation!("Size")
64
+ @option_type = Spree::OptionType.find_by_presentation("Size")
36
65
  else id
37
66
  end
38
67
  path = "#{path.downcase.gsub(/\s/, '_')}_path".to_sym
@@ -136,6 +165,3 @@ end
136
165
  When /^(?:|I )select "([^"]*)" from "([^"]*)"$/ do |value, field|
137
166
  select(value, :from => field)
138
167
  end
139
-
140
-
141
-
@@ -4,23 +4,21 @@ ENV["RAILS_ROOT"] = File.expand_path("../../../test/dummy", __FILE__)
4
4
  require "cucumber/rails"
5
5
  require "selenium/webdriver"
6
6
  require "factory_girl"
7
-
8
- # I18n.reload!
9
7
 
10
8
  ActionController::Base.allow_rescue = false
11
9
 
12
10
  Capybara.default_driver = :selenium
13
11
  Capybara.default_selector = :css
14
12
 
15
- Cucumber::Rails::World.use_transactional_fixtures
16
- DatabaseCleaner.strategy = :transaction
13
+ Cucumber::Rails::World.use_transactional_fixtures = false
14
+ DatabaseCleaner.strategy = :truncation
17
15
 
18
16
  Dir["#{File.expand_path("../../../", __FILE__)}/test/support/**/*.rb"].each { |f| require f }
19
17
 
20
18
  World(HelperMethods)
21
19
 
22
- # ensures spree preferencs are initialized before each test
20
+ # ensures spree preferencs are reset before each test
23
21
  Before do
24
22
  Spree::Config.instance_variable_set("@configuration", nil)
25
- Spree::Config.set(:random => rand(1000))
23
+ Spree::Config.set(:allow_backorders => true)
26
24
  end
@@ -2,36 +2,19 @@ module SpreeVariantOptions
2
2
  module Generators
3
3
  class InstallGenerator < Rails::Generators::Base
4
4
 
5
- include Rails::Generators::Migration
6
-
7
- def self.count
8
- @count ||= 0
9
- (@count += 1) * 3
5
+ desc "Installs required migrations for spree_essentials"
6
+
7
+ def copy_migrations
8
+ rake "spree_variant_options:install:migrations"
10
9
  end
11
10
 
12
- def self.new_migration_number
13
- (Time.new.utc + self.count).strftime("%Y%m%d%H%M%S")
11
+ def add_javascripts
12
+ append_file "app/assets/javascripts/store/all.js", "//= require store/product_variant_options\n"
13
+ append_file "app/assets/javascripts/store/all.js", "//= require store/variant_options\n"
14
14
  end
15
15
 
16
- def self.next_migration_number(path)
17
- @time ||= Time.new.utc
18
- if ActiveRecord::Base.timestamped_migrations
19
- files = Dir.entries(Rails.root.join("db/migrate"))
20
- migration = new_migration_number
21
- while files.join.include?(migration)
22
- migration = new_migration_number
23
- end
24
- migration
25
- else
26
- "%.3d" % (current_migration_number(dirname) + 1)
27
- end
28
- end
29
-
30
- desc "Installs required migrations for spree_essentials"
31
- source_root File.expand_path("../../templates", __FILE__)
32
-
33
- def copy_migrations
34
- migration_template "db/migrate/add_image_to_option_values.rb", "db/migrate/add_image_to_option_values.rb"
16
+ def add_stylesheets
17
+ inject_into_file "app/assets/stylesheets/store/all.css", "*= require store/variant_options\n", :before => /\*\//, :verbose => true
35
18
  end
36
19
 
37
20
  end
@@ -1,24 +1,8 @@
1
- require 'spree_core'
2
- require 'spree_sample' unless Rails.env == 'production'
1
+ require "spree_core"
2
+ require "spree_sample" unless Rails.env.production?
3
3
 
4
- module SpreeVariantOptions
5
-
6
- class Engine < Rails::Engine
7
-
8
- config.autoload_paths += %W(#{config.root}/lib)
4
+ require "spree_variant_options/engine"
5
+ require "spree_variant_options/version"
9
6
 
10
- config.to_prepare do
11
- #loads application's model / class decorators
12
- Dir.glob File.expand_path("../../app/**/*_decorator.rb", __FILE__) do |c|
13
- Rails.configuration.cache_classes ? require(c) : load(c)
14
- end
15
-
16
- #loads application's deface view overrides
17
- Dir.glob File.expand_path("../../app/overrides/*.rb", __FILE__) do |c|
18
- Rails.application.config.cache_classes ? require(c) : load(c)
19
- end
20
- end
21
-
22
- end
23
-
7
+ module SpreeVariantOptions
24
8
  end
@@ -0,0 +1,19 @@
1
+ module SpreeVariantOptions
2
+ class Engine < Rails::Engine
3
+
4
+ engine_name "spree_variant_options"
5
+
6
+ config.to_prepare do
7
+ #loads application's model / class decorators
8
+ Dir.glob File.expand_path("../../../app/**/*_decorator.rb", __FILE__) do |c|
9
+ Rails.configuration.cache_classes ? require(c) : load(c)
10
+ end
11
+
12
+ #loads application's deface view overrides
13
+ Dir.glob File.expand_path("../../../app/overrides/*.rb", __FILE__) do |c|
14
+ Rails.application.config.cache_classes ? require(c) : load(c)
15
+ end
16
+ end
17
+
18
+ end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module SpreeVariantOptions
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -20,11 +20,11 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
 
22
22
  # Runtime
23
- s.add_dependency('spree_core', '>= 0.70.0')
23
+ s.add_dependency('spree_core', '>= 1.0.0')
24
24
 
25
25
  # Development
26
- s.add_development_dependency('spree_sample', '>= 0.70.0')
27
- s.add_development_dependency('dummier', '>= 0.2.4')
26
+ s.add_development_dependency('spree_sample', '>= 1.0.0')
27
+ s.add_development_dependency('dummier', '>= 0.3.0')
28
28
  s.add_development_dependency('shoulda', '>= 3.0.0.beta2')
29
29
  s.add_development_dependency('factory_girl', '>= 2.3.2')
30
30
  s.add_development_dependency('cucumber-rails', '>= 1.2.1')
@@ -1,13 +1,19 @@
1
- # install spree & spree_variant_options
2
- run "rails g spree:site"
3
- run "rails g spree_variant_options:install"
1
+ rake "spree:install:migrations"
2
+
3
+ insert_into_file File.join('config', 'routes.rb'), :after => "Application.routes.draw do\n" do
4
+ " # Mount Spree's routes\n mount Spree::Core::Engine, :at => '/'\n"
5
+ end
6
+
7
+ # Fix uninitialized constant Spree::User::DestroyWithOrdersError
8
+ template "spree_user_error_fix.rb", "config/initializers/spree_user_error_fix.rb"
4
9
 
5
- # remove all stylesheets except core
10
+ # remove all stylesheets except core
6
11
  %w(admin store).each do |ns|
7
- js = "app/assets/javascripts/#{ns}/all.js"
8
- css = "app/assets/stylesheets/#{ns}/all.css"
9
- remove_file js
10
- remove_file css
11
- template "#{ns}/all.js", js
12
- template "#{ns}/all.css", css
12
+ template "#{ns}/all.js", "app/assets/javascripts/#{ns}/all.js", :force => true
13
+ template "#{ns}/all.css", "app/assets/stylesheets/#{ns}/all.css", :force => true
13
14
  end
15
+
16
+ # Fix sass load error by using the converted css file
17
+ template "store/screen.css", "app/assets/stylesheets/store/screen.css"
18
+
19
+ run "rails g spree_variant_options:install"
@@ -0,0 +1,3 @@
1
+ unless Spree::User.const_defined?(:DestroyWithOrdersError)
2
+ class Spree::User::DestroyWithOrdersError < StandardError; end
3
+ end
@@ -0,0 +1,749 @@
1
+ @import url(http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic,700italic|&subset=latin,cyrillic,greek,greek-ext,latin-ext,cyrillic-ext);
2
+ /*--------------------------------------*/
3
+ /* Colors
4
+ /*--------------------------------------*/
5
+ /* Dark gray */
6
+ /* Mid light gray */
7
+ /* Light blue */
8
+ /* Lighter blue */
9
+ /* Light gray */
10
+ /* Spree green */
11
+ /* Error red */
12
+ /*--------------------------------------*/
13
+ /* Fonts
14
+ /*--------------------------------------*/
15
+ /*--------------------------------------*/
16
+ /* Basic styles
17
+ /*--------------------------------------*/
18
+ body {
19
+ font-family: 'Ubuntu', sans-serif;
20
+ color: #404042;
21
+ line-height: 18px;
22
+ font-size: 12px; }
23
+
24
+ /* Line style */
25
+ hr {
26
+ border-color: #dedede; }
27
+
28
+ /* Custom text-selection colors (remove any text shadows: twitter.com/miketaylr/status/12228805301) */
29
+ ::-moz-selection {
30
+ background: #00adee;
31
+ color: white;
32
+ text-shadow: none; }
33
+
34
+ ::selection {
35
+ background: #00adee;
36
+ color: white;
37
+ text-shadow: none; }
38
+
39
+ /* j.mp/webkit-tap-highlight-color */
40
+ a:link {
41
+ -webkit-tap-highlight-color: #00adee; }
42
+
43
+ ins {
44
+ background-color: #00adee;
45
+ color: white;
46
+ text-decoration: none; }
47
+
48
+ mark {
49
+ background-color: #00adee;
50
+ color: white;
51
+ font-style: italic;
52
+ font-weight: bold; }
53
+
54
+ /*--------------------------------------*/
55
+ /* Links
56
+ /*--------------------------------------*/
57
+ a {
58
+ text-decoration: none;
59
+ color: #404042; }
60
+ a:hover {
61
+ color: #00adee !important; }
62
+
63
+ /*--------------------------------------*/
64
+ /* Lists
65
+ /*--------------------------------------*/
66
+ ul.inline li, ol.inline li {
67
+ display: inline-block; }
68
+
69
+ dl dt, dl dd {
70
+ display: inline-block;
71
+ width: 50%;
72
+ padding: 5px; }
73
+ dl dt.odd, dl dd.odd {
74
+ background-color: #dedede; }
75
+ dl dt {
76
+ font-weight: bold;
77
+ text-transform: uppercase; }
78
+ dl dd {
79
+ margin-left: -23px; }
80
+
81
+ /*--------------------------------------*/
82
+ /* Headers
83
+ /*--------------------------------------*/
84
+ h1, h2, h3, h4, h5, h6 {
85
+ font-weight: bold; }
86
+
87
+ h1 {
88
+ font-size: 24px;
89
+ line-height: 34px; }
90
+
91
+ h2 {
92
+ font-size: 23px;
93
+ line-height: 32px; }
94
+
95
+ h3 {
96
+ font-size: 20px;
97
+ line-height: 30px; }
98
+
99
+ h4 {
100
+ font-size: 18px;
101
+ line-height: 28px; }
102
+
103
+ h5 {
104
+ font-size: 16px;
105
+ line-height: 26px; }
106
+
107
+ h6 {
108
+ font-size: 14px;
109
+ line-height: 24px; }
110
+
111
+ /*--------------------------------------*/
112
+ /* Forms
113
+ /*--------------------------------------*/
114
+ textarea, input[type="date"],
115
+ input[type="datetime"], input[type="datetime-local"],
116
+ input[type="email"], input[type="month"], input[type="number"],
117
+ input[type="password"], input[type="search"], input[type="tel"],
118
+ input[type="text"], input[type="time"], input[type="url"],
119
+ input[type="week"] {
120
+ border: 1px solid #dedede;
121
+ padding: 2px 5px;
122
+ font-family: "Ubuntu", sans-serif; }
123
+ textarea:active, textarea:focus, input[type="date"]:active, input[type="date"]:focus,
124
+ input[type="datetime"]:active,
125
+ input[type="datetime"]:focus, input[type="datetime-local"]:active, input[type="datetime-local"]:focus,
126
+ input[type="email"]:active,
127
+ input[type="email"]:focus, input[type="month"]:active, input[type="month"]:focus, input[type="number"]:active, input[type="number"]:focus,
128
+ input[type="password"]:active,
129
+ input[type="password"]:focus, input[type="search"]:active, input[type="search"]:focus, input[type="tel"]:active, input[type="tel"]:focus,
130
+ input[type="text"]:active,
131
+ input[type="text"]:focus,
132
+ select:active,
133
+ select:focus, input[type="time"]:active, input[type="time"]:focus, input[type="url"]:active, input[type="url"]:focus,
134
+ input[type="week"]:active,
135
+ input[type="week"]:focus {
136
+ border-color: #00adee;
137
+ outline: none;
138
+ -webkit-box-shadow: none;
139
+ -moz-box-shadow: none;
140
+ -o-box-shadow: none;
141
+ box-shadow: none; }
142
+ textarea.error, input[type="date"].error,
143
+ input[type="datetime"].error, input[type="datetime-local"].error,
144
+ input[type="email"].error, input[type="month"].error, input[type="number"].error,
145
+ input[type="password"].error, input[type="search"].error, input[type="tel"].error,
146
+ input[type="text"].error, input[type="time"].error, input[type="url"].error,
147
+ input[type="week"].error {
148
+ border-color: #e45353; }
149
+
150
+ select {
151
+ border: 1px solid #dedede;
152
+ font-family: "Ubuntu", sans-serif;
153
+ background-image: url("select_arrow.gif");
154
+ background-repeat: no-repeat;
155
+ background-position: right center; }
156
+
157
+ label.error {
158
+ display: block;
159
+ font-size: 11px;
160
+ color: #e45353;
161
+ margin-top: 3px; }
162
+
163
+ input[type="submit"], input[type="button"],
164
+ input[type="reset"], button, a.button {
165
+ background-color: #00adee;
166
+ background-image: none;
167
+ text-shadow: none;
168
+ color: white;
169
+ font-weight: bold;
170
+ font-family: "Ubuntu", sans-serif;
171
+ border: 1px solid rgba(0, 138, 189, 0.75);
172
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
173
+ -khtml-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
174
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
175
+ -o-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
176
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
177
+ -webkit-border-radius: 0px;
178
+ -khtml-border-radius: 0px;
179
+ -moz-border-radius: 0px;
180
+ -ms-border-radius: 0px;
181
+ -o-border-radius: 0px;
182
+ border-radius: 0px;
183
+ vertical-align: text-top; }
184
+ input[type="submit"].large, input[type="button"].large,
185
+ input[type="reset"].large, button.large, a.button.large {
186
+ padding: 7px 10px;
187
+ font-size: 14px; }
188
+ input[type="submit"]:hover, input[type="button"]:hover,
189
+ input[type="reset"]:hover, button:hover, a.button:hover {
190
+ background-image: none;
191
+ background-color: #404042;
192
+ border-color: #404042;
193
+ color: white !important; }
194
+
195
+ .ie8 a.button {
196
+ line-height: 16px; }
197
+
198
+ input[type="checkbox"], input[type="button"],
199
+ input[type="submit"], input[type="reset"],
200
+ button, label {
201
+ vertical-align: middle; }
202
+
203
+ a.button {
204
+ display: inline-block;
205
+ line-height: 15px;
206
+ margin-top: -2px;
207
+ vertical-align: bottom; }
208
+
209
+ /*--------------------------------------*/
210
+ /* Footer
211
+ /*--------------------------------------*/
212
+ footer#footer {
213
+ padding: 10px 0;
214
+ border-top: 1px solid #dedede; }
215
+
216
+ /*--------------------------------------*/
217
+ /* Paragraphs
218
+ /*--------------------------------------*/
219
+ p {
220
+ padding: 10px 0; }
221
+
222
+ /*--------------------------------------*/
223
+ /* Tables
224
+ /*--------------------------------------*/
225
+ table thead {
226
+ background-color: #dedede;
227
+ text-transform: uppercase; }
228
+ table thead tr th {
229
+ padding: 5px 10px; }
230
+ table tbody tr, table tfoot tr {
231
+ border-bottom: 1px solid #dedede; }
232
+ table tbody tr td, table tfoot tr td {
233
+ vertical-align: middle;
234
+ padding: 5px 10px; }
235
+ table tbody tr.alt, table tbody tr.odd, table tfoot tr.alt, table tfoot tr.odd {
236
+ background-color: #f0f8ff; }
237
+
238
+ /*--------------------------------------*/
239
+ /* Navigation
240
+ /*--------------------------------------*/
241
+ nav#top-nav-bar {
242
+ text-align: right;
243
+ margin-top: 20px; }
244
+ nav#top-nav-bar ul li {
245
+ margin-bottom: 5px;
246
+ padding-left: 10px; }
247
+ nav#top-nav-bar ul li a {
248
+ font-weight: bold;
249
+ font-size: 14px;
250
+ text-transform: uppercase; }
251
+
252
+ nav #main-nav-bar {
253
+ text-transform: uppercase;
254
+ font-weight: bold;
255
+ margin-top: 20px;
256
+ border-bottom: 1px solid #dedede;
257
+ padding-bottom: 6px; }
258
+ nav #main-nav-bar li a {
259
+ font-size: 16px;
260
+ padding: 5px; }
261
+ nav #main-nav-bar li#link-to-cart {
262
+ float: right;
263
+ padding-left: 24px;
264
+ background: url("cart.png") no-repeat left center; }
265
+ nav #main-nav-bar li#link-to-cart:hover {
266
+ border-color: #00adee; }
267
+ nav #main-nav-bar li#link-to-cart:hover .amount {
268
+ border-color: #00adee; }
269
+ nav #main-nav-bar li#link-to-cart a {
270
+ font-weight: normal;
271
+ font-size: 16px;
272
+ color: #00adee; }
273
+ nav #main-nav-bar li#link-to-cart a .amount {
274
+ font-size: 18px;
275
+ font-weight: bold;
276
+ border-left: 1px solid #dedede;
277
+ padding-left: 5px;
278
+ padding-bottom: 5px; }
279
+
280
+ nav#taxonomies .taxonomy-root {
281
+ text-transform: uppercase;
282
+ border-bottom: 1px solid #dedede;
283
+ margin-bottom: 5px;
284
+ color: #00adee; }
285
+ nav#taxonomies .taxons-list {
286
+ padding-left: 20px;
287
+ margin-bottom: 20px;
288
+ list-style: disc outside; }
289
+
290
+ #breadcrumbs {
291
+ border-bottom: 1px solid #dedede;
292
+ padding: 3px 0;
293
+ margin-bottom: 15px; }
294
+ #breadcrumbs li a {
295
+ color: #00adee; }
296
+ #breadcrumbs li span {
297
+ text-transform: uppercase;
298
+ font-weight: bold; }
299
+
300
+ /*--------------------------------------*/
301
+ /* Flash notices & errors
302
+ /*--------------------------------------*/
303
+ .flash, .errorExplanation {
304
+ padding: 10px;
305
+ color: white;
306
+ font-weight: bold;
307
+ margin-bottom: 10px; }
308
+ .flash.notice, .notice.errorExplanation {
309
+ background-color: #00adee; }
310
+ .flash.success, .success.errorExplanation {
311
+ background-color: #8dba53; }
312
+ .flash.error, .errorExplanation, .error.errorExplanation {
313
+ background-color: #e45353; }
314
+
315
+ .errorExplanation p {
316
+ font-weight: normal; }
317
+ .errorExplanation ul {
318
+ list-style: disc outside;
319
+ margin-left: 30px; }
320
+ .errorExplanation ul li {
321
+ font-weight: normal; }
322
+
323
+ /*--------------------------------------*/
324
+ /* Main search bar
325
+ /*--------------------------------------*/
326
+ #search-bar {
327
+ display: block; }
328
+
329
+ /*--------------------------------------*/
330
+ /* Products
331
+ /*--------------------------------------*/
332
+ .product-section-title {
333
+ text-transform: uppercase;
334
+ color: #00adee;
335
+ margin-top: 15px; }
336
+
337
+ .add-to-cart {
338
+ margin-top: 15px; }
339
+ .add-to-cart input[type="number"] {
340
+ width: 60px;
341
+ vertical-align: middle;
342
+ padding: 5px;
343
+ height: 35px; }
344
+
345
+ span.price, #checkout-summary table tr[data-hook="item_total"] td:last-child strong, #checkout-summary table #summary-order-total, #order_details td.price span, #order_details td.total span, #order_summary td.price span, #order_summary td.total span, table#cart-detail tbody#line_items tr td[data-hook="cart_item_price"], table#cart-detail tbody#line_items tr td[data-hook="cart_item_total"], div[data-hook="inside_cart_form"] #subtotal span.order-total {
346
+ font-weight: bold;
347
+ color: #00adee; }
348
+ span.price.selling, #checkout-summary table tr[data-hook="item_total"] td:last-child strong.selling, #checkout-summary table .selling#summary-order-total, #order_details td.price span.selling, #order_details td.total span.selling, #order_summary td.price span.selling, #order_summary td.total span.selling, table#cart-detail tbody#line_items tr td.selling[data-hook="cart_item_price"], table#cart-detail tbody#line_items tr td.selling[data-hook="cart_item_total"], table#cart-detail tbody#line_items tr td[data-hook="cart_item_price"], table#cart-detail tbody#line_items tr td[data-hook="cart_item_total"], div[data-hook="inside_cart_form"] #subtotal span.selling.order-total {
349
+ font-size: 20px; }
350
+ span.price.diff, #checkout-summary table tr[data-hook="item_total"] td:last-child strong.diff, #checkout-summary table .diff#summary-order-total, #order_details td.price span.diff, #order_details td.total span.diff, #order_summary td.price span.diff, #order_summary td.total span.diff, table#cart-detail tbody#line_items tr td.diff[data-hook="cart_item_price"], table#cart-detail tbody#line_items tr td.diff[data-hook="cart_item_total"], div[data-hook="inside_cart_form"] #subtotal span.diff.order-total {
351
+ font-weight: bold; }
352
+
353
+ ul#products {
354
+ margin-left: -10px;
355
+ margin-right: -10px; }
356
+ ul#products li {
357
+ text-align: center;
358
+ font-weight: bold;
359
+ margin-bottom: 20px; }
360
+ ul#products li a {
361
+ display: block; }
362
+ ul#products li a.info {
363
+ height: 35px;
364
+ margin-top: 5px;
365
+ color: #bbbbbb;
366
+ border-bottom: 1px solid #dedede; }
367
+ ul#products li .product-image {
368
+ border: 1px solid #dedede;
369
+ padding: 5px;
370
+ min-height: 110px; }
371
+ ul#products li .product-image:hover {
372
+ border-color: #00adee; }
373
+ ul#products li .price {
374
+ color: #00adee;
375
+ font-size: 16px;
376
+ padding-top: 5px;
377
+ display: block; }
378
+
379
+ .subtaxon-title {
380
+ text-transform: uppercase; }
381
+ .subtaxon-title a {
382
+ color: #00adee; }
383
+
384
+ .search-results-title {
385
+ text-transform: uppercase;
386
+ border-bottom: 1px solid #dedede;
387
+ margin-bottom: 10px; }
388
+
389
+ #sidebar_products_search .navigation {
390
+ margin-bottom: 15px; }
391
+ #sidebar_products_search span.category {
392
+ display: block;
393
+ font-weight: bold;
394
+ text-transform: uppercase;
395
+ border-bottom: 1px solid #ededed;
396
+ margin-bottom: 5px;
397
+ color: #00adee;
398
+ font-size: 14px;
399
+ line-height: 24px; }
400
+
401
+ .taxon {
402
+ overflow: hidden; }
403
+
404
+ #product-images #main-image {
405
+ text-align: center;
406
+ border: 1px solid #dedede; }
407
+
408
+ #product-description .product-title {
409
+ border-bottom: 1px solid #dedede;
410
+ margin-bottom: 15px; }
411
+
412
+ #product-thumbnails {
413
+ margin-top: 10px; }
414
+ #product-thumbnails li {
415
+ margin-right: 6px;
416
+ border: 1px solid #dedede; }
417
+ #product-thumbnails li img {
418
+ padding: 5px; }
419
+ #product-thumbnails li:hover, #product-thumbnails li.selected {
420
+ border-color: #00adee; }
421
+
422
+ #product-properties {
423
+ border: 1px solid #dedede;
424
+ padding: 10px; }
425
+
426
+ #product-variants ul li {
427
+ padding: 5px; }
428
+
429
+ /*--------------------------------------*/
430
+ /* Checkout
431
+ /*--------------------------------------*/
432
+ .progress-steps {
433
+ list-style: decimal inside;
434
+ overflow: auto; }
435
+ .progress-steps li {
436
+ float: left;
437
+ margin-right: 20px;
438
+ font-weight: bold;
439
+ text-transform: uppercase;
440
+ padding: 5px 20px;
441
+ color: #bbbbbb; }
442
+ .progress-steps li.current-first, .progress-steps li.current {
443
+ background-color: #00adee;
444
+ color: white; }
445
+ .progress-steps li.completed-first, .progress-steps li.completed {
446
+ background-color: #dedede;
447
+ color: white; }
448
+ .progress-steps li.completed-first a, .progress-steps li.completed a {
449
+ color: white; }
450
+ .progress-steps li.completed-first:hover, .progress-steps li.completed:hover {
451
+ background-color: #00adee;
452
+ color: white; }
453
+ .progress-steps li.completed-first:hover a, .progress-steps li.completed:hover a {
454
+ color: white; }
455
+ .progress-steps li.completed-first:hover a:hover, .progress-steps li.completed:hover a:hover {
456
+ color: white !important; }
457
+
458
+ #checkout-summary {
459
+ text-align: center;
460
+ border: 1px solid #dedede;
461
+ margin-top: 23px;
462
+ margin-left: 0; }
463
+ #checkout-summary h3 {
464
+ text-transform: uppercase;
465
+ font-size: 14px;
466
+ color: #00adee;
467
+ border-bottom: 1px solid #dedede; }
468
+ #checkout-summary table {
469
+ width: 100%; }
470
+ #checkout-summary table tr[data-hook="order_total"] {
471
+ border-bottom: none; }
472
+ #checkout-summary table #summary-order-total {
473
+ font-size: 14px; }
474
+
475
+ #billing, #shipping, #shipping_method,
476
+ #payment, #order_details, #order_summary {
477
+ margin-top: 10px;
478
+ border: 1px solid #dedede;
479
+ padding: 10px; }
480
+ #billing legend, #shipping legend, #shipping_method legend,
481
+ #payment legend, #order_details legend, #order_summary legend {
482
+ text-transform: uppercase;
483
+ font-weight: bold;
484
+ font-size: 14px;
485
+ color: #00adee;
486
+ padding: 5px;
487
+ margin-left: 15px; }
488
+
489
+ #order_details, #order_summary {
490
+ padding: 0; }
491
+ #order_details div:last-child, #order_summary div:last-child {
492
+ margin-left: -1px; }
493
+ #order_details .payment-info .cc-type img, #order_summary .payment-info .cc-type img {
494
+ vertical-align: middle; }
495
+ #order_details table tfoot, #order_summary table tfoot {
496
+ text-align: right;
497
+ color: #bbbbbb; }
498
+ #order_details table tfoot tr, #order_summary table tfoot tr {
499
+ border: none; }
500
+ #order_details table tfoot#order-total, #order_summary table tfoot#order-total {
501
+ text-transform: uppercase;
502
+ font-size: 16px;
503
+ color: #404042; }
504
+ #order_details table tfoot#order-total tr, #order_summary table tfoot#order-total tr {
505
+ border-top: 1px solid #dedede; }
506
+ #order_details table tfoot#order-total tr td, #order_summary table tfoot#order-total tr td {
507
+ padding: 10px; }
508
+ #order_details .steps-data, #order_summary .steps-data {
509
+ padding: 10px; }
510
+ #order_details .steps-data h6, #order_summary .steps-data h6 {
511
+ border-bottom: 1px solid #dedede;
512
+ margin-bottom: 5px; }
513
+
514
+ #shipping_method p label {
515
+ float: left;
516
+ font-weight: bold;
517
+ font-size: 14px;
518
+ margin-right: 40px;
519
+ padding: 5px; }
520
+
521
+ p[data-hook="use_billing"] {
522
+ float: right;
523
+ margin-top: -38px;
524
+ background-color: white;
525
+ padding: 5px; }
526
+
527
+ /*--------------------------------------*/
528
+ /* Cart
529
+ /*--------------------------------------*/
530
+ table#cart-detail {
531
+ width: 100%; }
532
+ table#cart-detail tbody#line_items tr td[data-hook="cart_item_quantity"] .line_item_quantity {
533
+ width: 40px; }
534
+ table#cart-detail tbody#line_items tr td[data-hook="cart_item_delete"] .delete {
535
+ display: block;
536
+ width: 20px; }
537
+
538
+ div[data-hook="inside_cart_form"] .links {
539
+ margin-top: 15px; }
540
+ div[data-hook="inside_cart_form"] #subtotal {
541
+ text-align: right;
542
+ text-transform: uppercase;
543
+ margin-top: 15px; }
544
+
545
+ #empty-cart {
546
+ margin-top: 15px;
547
+ float: right; }
548
+
549
+ /*--------------------------------------*/
550
+ /* Account
551
+ /*--------------------------------------*/
552
+ #existing-customer h6, #new-customer h6, #forgot-password h6 {
553
+ text-transform: uppercase;
554
+ color: #00adee; }
555
+
556
+ #registration h6 {
557
+ text-transform: uppercase;
558
+ color: #00adee; }
559
+ #registration #existing-customer {
560
+ width: auto;
561
+ text-align: left; }
562
+
563
+ #user-info {
564
+ margin-bottom: 15px;
565
+ border: 1px solid #dedede;
566
+ padding: 10px; }
567
+
568
+ /*--------------------------------------*/
569
+ /* Order
570
+ /*--------------------------------------*/
571
+ #order_summary {
572
+ margin-top: 0; }
573
+
574
+ #order p[data-hook="links"] {
575
+ margin-left: 10px;
576
+ overflow: auto; }
577
+
578
+ table.order-summary tbody tr td {
579
+ width: 10%;
580
+ text-align: center; }
581
+ table.order-summary tbody tr td:first-child a {
582
+ text-transform: uppercase;
583
+ font-weight: bold;
584
+ color: #00adee; }
585
+
586
+ /* #Media Queries
587
+ ================================================== */
588
+ /* Smaller than standard 960 (devices and browsers) */
589
+ /* Tablet Portrait size to standard 960 (devices and browsers) */
590
+ @media only screen and (min-width: 768px) and (max-width: 959px) {
591
+ .container {
592
+ padding-left: 10px;
593
+ width: 758px; }
594
+
595
+ footer#footer {
596
+ width: 748px; }
597
+
598
+ p[data-hook="use_billing"] {
599
+ margin-top: -15px; } }
600
+ /* All Mobile Sizes (devices and browser) */
601
+ @media only screen and (max-width: 767px) {
602
+ html {
603
+ -webkit-text-size-adjust: none; }
604
+
605
+ nav#taxonomies {
606
+ text-align: center; }
607
+ nav#taxonomies ul {
608
+ padding-left: 0 !important;
609
+ list-style: none !important; }
610
+
611
+ ul#nav-bar {
612
+ text-align: center; }
613
+
614
+ .steps-data div.columns {
615
+ margin-bottom: 15px;
616
+ text-align: center; }
617
+
618
+ #order_details table[data-hook="order_details"], #order table[data-hook="order_details"] {
619
+ width: 100%; }
620
+
621
+ #update-cart #subtotal, #update-cart .links {
622
+ width: 50%;
623
+ float: left;
624
+ text-align: left; }
625
+ #update-cart #subtotal {
626
+ text-align: right; } }
627
+ /* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
628
+ @media only screen and (min-width: 480px) and (max-width: 767px) {
629
+ footer#footer {
630
+ width: auto !important; }
631
+
632
+ input, select {
633
+ vertical-align: baseline !important; }
634
+
635
+ figure#logo {
636
+ text-align: center; }
637
+
638
+ #link-to-login {
639
+ display: block;
640
+ text-align: center; }
641
+
642
+ #search-bar {
643
+ display: block;
644
+ text-align: center; }
645
+ #search-bar select {
646
+ margin-bottom: 10px; }
647
+
648
+ ul#products {
649
+ margin-left: 0;
650
+ margin-right: -20px; }
651
+ ul#products li {
652
+ width: 133px;
653
+ margin-right: 10px; }
654
+
655
+ table#cart-detail tbody tr td[data-hook="cart_item_description"], table#cart-detail tbody tr td[data-hook="order_item_description"], table[data-hook="order_details"] tbody tr td[data-hook="cart_item_description"], table[data-hook="order_details"] tbody tr td[data-hook="order_item_description"] {
656
+ font-size: 11px;
657
+ line-height: 15px;
658
+ width: 100px; }
659
+ table#cart-detail tbody tr td[data-hook="cart_item_description"] h4, table#cart-detail tbody tr td[data-hook="order_item_description"] h4, table[data-hook="order_details"] tbody tr td[data-hook="cart_item_description"] h4, table[data-hook="order_details"] tbody tr td[data-hook="order_item_description"] h4 {
660
+ font-size: 14px;
661
+ line-height: 17px;
662
+ margin-bottom: 10px; }
663
+ table#cart-detail tbody tr td[data-hook="cart_item_price"], table#cart-detail tbody tr td[data-hook="cart_item_total"],
664
+ table#cart-detail tbody tr td[data-hook="order_item_price"], table#cart-detail tbody tr td[data-hook="order_item_total"], table[data-hook="order_details"] tbody tr td[data-hook="cart_item_price"], table[data-hook="order_details"] tbody tr td[data-hook="cart_item_total"], table[data-hook="order_details"] tbody tr td[data-hook="order_item_price"], table[data-hook="order_details"] tbody tr td[data-hook="order_item_total"] {
665
+ font-size: 12px !important; }
666
+ table#cart-detail tbody tr td[data-hook="cart_item_image"] img, table#cart-detail tbody tr td[data-hook="order_item_image"] img, table[data-hook="order_details"] tbody tr td[data-hook="cart_item_image"] img, table[data-hook="order_details"] tbody tr td[data-hook="order_item_image"] img {
667
+ width: 70px; } }
668
+ /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
669
+ @media only screen and (max-width: 479px) {
670
+ .progress-steps li {
671
+ padding: 0;
672
+ margin: 0;
673
+ width: 50%; }
674
+ .progress-steps li span {
675
+ display: block;
676
+ padding: 10px 20px; }
677
+
678
+ #shipping_method p label {
679
+ float: none;
680
+ display: block;
681
+ text-align: center;
682
+ margin-right: 0; }
683
+
684
+ p[data-hook="use_billing"] {
685
+ float: none;
686
+ margin-top: 0; }
687
+
688
+ table#cart-detail tbody tr td[data-hook="cart_item_description"], table#cart-detail tbody tr td[data-hook="order_item_description"], table[data-hook="order_details"] tbody tr td[data-hook="cart_item_description"], table[data-hook="order_details"] tbody tr td[data-hook="order_item_description"] {
689
+ padding: 0 !important;
690
+ text-indent: -9999px; }
691
+ table#cart-detail tbody tr td[data-hook="cart_item_description"] h4, table#cart-detail tbody tr td[data-hook="order_item_description"] h4, table[data-hook="order_details"] tbody tr td[data-hook="cart_item_description"] h4, table[data-hook="order_details"] tbody tr td[data-hook="order_item_description"] h4 {
692
+ display: none; }
693
+ table#cart-detail tbody tr td[data-hook="cart_item_image"] img, table#cart-detail tbody tr td[data-hook="order_item_image"] img, table[data-hook="order_details"] tbody tr td[data-hook="cart_item_image"] img, table[data-hook="order_details"] tbody tr td[data-hook="order_item_image"] img {
694
+ width: 70px; }
695
+ table#cart-detail tbody tr td[data-hook="cart_item_price"], table#cart-detail tbody tr td[data-hook="cart_item_total"], table[data-hook="order_details"] tbody tr td[data-hook="cart_item_price"], table[data-hook="order_details"] tbody tr td[data-hook="cart_item_total"] {
696
+ font-size: 14px !important; }
697
+
698
+ table.order-summary {
699
+ display: block;
700
+ position: relative;
701
+ width: 100%; }
702
+ table.order-summary thead {
703
+ display: block;
704
+ float: left; }
705
+ table.order-summary tbody {
706
+ display: block;
707
+ width: auto;
708
+ position: relative;
709
+ overflow-x: auto;
710
+ white-space: nowrap; }
711
+ table.order-summary thead tr {
712
+ display: block; }
713
+ table.order-summary th {
714
+ display: block; }
715
+ table.order-summary tbody tr {
716
+ display: inline-block;
717
+ vertical-align: top; }
718
+ table.order-summary td {
719
+ display: block;
720
+ min-height: 1.25em; }
721
+
722
+ figure#logo {
723
+ text-align: center; }
724
+
725
+ #link-to-login {
726
+ display: block;
727
+ text-align: center; }
728
+
729
+ #search-bar {
730
+ display: block;
731
+ text-align: center; }
732
+ #search-bar select {
733
+ margin-bottom: 10px; }
734
+
735
+ aside#sidebar {
736
+ text-align: center; }
737
+ aside#sidebar ul {
738
+ padding-left: 0 !important; }
739
+ aside#sidebar ul li {
740
+ list-style-type: none; }
741
+
742
+ ul#products {
743
+ margin-left: 0; }
744
+ ul#products li {
745
+ width: 140px;
746
+ margin-right: 15px; }
747
+
748
+ #content {
749
+ text-align: center; } }