caboose-store 0.0.32 → 0.0.33

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Zjg2OGY0ZTNmM2VlZjc3OGIzOTNkYmM5YjgwYzcyZDg5NjhkM2UwNw==
4
+ YWY1ZTY0ZDg0YTNlNjEzYjExMGE3OWFlZWUyYjkwYjA5N2ZlZmM4NA==
5
5
  data.tar.gz: !binary |-
6
- YmY3MzliNmJlOWQzMTA3OTlmMGE3ZDE0YmY4ZTBmN2NmMTdjNjNmZg==
6
+ MjNmYjg1MGIxNTFiZDFkMDZlYmQ1MTYzOTZjOGE0Nzg4M2I4ZjJkMw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NDJhZDkxNDhkYWU0ZTNiOWE1MDU3NTU1OTYyYTEwYzEyOGFkNmFjZTJmZjgz
10
- ODdmY2I3NThlYTgwNjUzY2E4NTI2MTBmODYxMjc4ZmQ0MDM1YzQ0OTIwNDg3
11
- NzlhM2FmZWZmNzBjZWE1MzE5OTg3N2QzNzY4MWM4MDM0ZTJkMzc=
9
+ N2UzMDM3NDNlM2ZhZDQwYjUzNTFkM2VhNTVjOTE5YmYzZGE1ZjlhNDQ1OTFh
10
+ NGM2ZDA1MGQ0MmQwNmJlYjUyNGU3OTUzMTI1YjBkZjBmNjI5NGExZjkxNzcw
11
+ YTA1NjQ0MmNlYmE0MTU5ZDZjMDlkMmU2ZWZjNDJiZTU0N2IwYjE=
12
12
  data.tar.gz: !binary |-
13
- OWYyOWFiM2FhYTZiN2I5ZGM2MTVkZDdiZTY1ZTZmNjFhZjlmOWM3NTk3ODc1
14
- MjM3ZjRmM2Y2NDQ5MDZhN2VmNjIxMGY3Y2RkYzY0OTAxNjRhNmY4ZmQyMzUx
15
- Mzc4OWQ5ZTNlNzUyNmU3Mjc4ZjM4NTU2YWNmODc3OGNiODIwN2Y=
13
+ MTg5NmNmZTg3OTk5OTRkYjFlOTE3NDJkNTc4MTI1YWRhM2Q2MzUzZDNmMmQ1
14
+ MDUzMzVjNzg3NjcxMTMwZjcyMDFjOWI5NzdjNTRjMmRhOWI5NDJkMGMzYmEy
15
+ NDk1MGM4OWYxODBiYmFjYmZlZGY5MjUwOTRjYTg1YjgyYzI2OTA=
@@ -166,7 +166,7 @@ module CabooseStore
166
166
 
167
167
  def calculate_tax
168
168
  return 0 if !self.shipping_address
169
- TaxCalculator.tax_rate(self.shipping_address)
169
+ self.subtotal * TaxCalculator.tax_rate(self.shipping_address)
170
170
  end
171
171
 
172
172
  def calculate_shipping
@@ -8,12 +8,12 @@ module CabooseStore
8
8
  has_many :customization_memberships, :class_name => 'CabooseStore::CustomizationMembership'
9
9
  has_many :categories, :class_name => 'CabooseStore::Category', :through => :category_memberships
10
10
  has_many :category_memberships, :class_name => 'CabooseStore::CategoryMembership'
11
- has_many :variants, :class_name => 'CabooseStore::Variant', :order => 'sort_order'
11
+ has_many :variants, :class_name => 'CabooseStore::Variant', :order => 'option1_sort_order, option2_sort_order, option3_sort_order'
12
12
  has_many :product_images, :class_name => 'CabooseStore::ProductImage'
13
13
  has_many :proudct_inputs, :class_name => 'CabooseStore::ProductInput'
14
14
  has_many :reviews, :class_name => 'CabooseStore::Review'
15
15
 
16
- default_scope order('store_products.sort_order')
16
+ #default_scope order('store_products.sort_order')
17
17
 
18
18
  attr_accessible :id,
19
19
  :alternate_id,
@@ -32,8 +32,7 @@ module CabooseStore
32
32
  :default3,
33
33
  :status,
34
34
  :custom_input,
35
- :featured,
36
- :sort_order
35
+ :featured
37
36
 
38
37
 
39
38
  #
@@ -152,7 +152,7 @@ class CabooseStore::Schema < Caboose::Utilities::Schema
152
152
  [ :date_available , :datetime ],
153
153
  [ :custom_input , :text ],
154
154
  [ :sort_order , :integer ],
155
- [ :featured , :boolean , :default => false ]
155
+ [ :featured , :boolean , :default => false ]
156
156
  ],
157
157
 
158
158
  CabooseStore::Review => [
@@ -200,7 +200,8 @@ class CabooseStore::Schema < Caboose::Utilities::Schema
200
200
  [ :status , :string ],
201
201
  [ :option1_sort_order , :integer , { :defult => 0 }],
202
202
  [ :option2_sort_order , :integer , { :defult => 0 }],
203
- [ :option3_sort_order , :integer , { :defult => 0 }]
203
+ [ :option3_sort_order , :integer , { :defult => 0 }],
204
+ [ :sort_order , :integer , { :defult => 0 }]
204
205
  ],
205
206
 
206
207
  CabooseStore::Vendor => [
@@ -1,6 +1,7 @@
1
1
  module CabooseStore
2
2
  class TaxCalculator
3
3
  def self.tax_rate(address)
4
+ ap '--HOOK calculate tax'
4
5
  return 0 if address.state.downcase != 'al'
5
6
  city = address.city.downcase
6
7
  rate = 0.00
@@ -1,3 +1,3 @@
1
1
  module CabooseStore
2
- VERSION = '0.0.32'
2
+ VERSION = '0.0.33'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.32
4
+ version: 0.0.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-28 00:00:00.000000000 Z
11
+ date: 2014-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caboose-cms