caboose-cms 0.5.73 → 0.5.74

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
- YzEzZTMxZmQ0NzgyOGVhNjgyZGRiOGE5ZjQ1YzFhZjM3MzA3YmI0OA==
4
+ NjNhNjFkMzlmZjgwYzQ1NWVmNzNkNmUwZGI5OGU0ODNkMjViOGFjZg==
5
5
  data.tar.gz: !binary |-
6
- ZGY2MDNjMmE3YzZkYzExMzI1NTE5NDcxOTU0NTQzMDBlM2JlYjU4OA==
6
+ Zjg4MmMxOWEwMGRkNjRjYzM1NGY3YTQ1N2RjODRkNzU4NzEwODJmYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTg2ZjA4NTFjNzI3MmQ5YjQ0ZTU2ZGViZWQwNTJlMjM5MDgzZGJlNDg2NGY4
10
- ZTM1OTkwN2ZkYWY4MzU4MTcyMWFkNDhjMThlNjQ1MWQyMDhhZTRhZTkyY2I5
11
- ZDEyN2Y3NThmZDQwZjcwMGY4N2NlOGQyNTc5OThjMDQ5YmQ5NzM=
9
+ ZjZhYmQzYjgyNGJlMGQ3ZmE2YzY2ZTMyNjY4YTUyY2YyN2RkNjFlYWUzZGI4
10
+ OWJmZWUwZTBjZjk3ZjVmNmNjODhmMjQyM2VmOTAzZmE4MjEzNTRkYzViNzI5
11
+ ZGZjNTg2ZWVmMGQ0MGY3ZjEzMzhmN2Q5ZWZiNTQyNGViNDgxOTk=
12
12
  data.tar.gz: !binary |-
13
- MmMxN2ZhNjg1MDIwOWZiNTM1NDQxYzBiNTk1MzFlNDJhMzNiOGRiZTRhY2Ix
14
- MjMyZWQ5N2U5ZjA1ZTAyY2QxY2Y0MzczYWQ3NThiY2NmZTkzZjg3OTE4ZGJm
15
- ZmQ2N2Y4OWNlMTczZjUwMjczMzQ5OGQxZDRlODkyZGU5MTUxN2I=
13
+ Y2JkZWJkZTc4NDEwMTVkNjEyODJkM2Q0NzRlN2RlNTZlZDFkMTEzN2RlOTUw
14
+ Mjc0YzFhZDAzODdlMjg1OTk4MmVhZjA5NTkxNTI1NmEzYjRlOGExYzcwNzdi
15
+ NWQ0NmQ3NmRmODlkOWYxOTc2ODVmMzMxZDZhNjY3ZjAyYzZkNDk=
@@ -52,7 +52,7 @@ module Caboose
52
52
  def gift_cards
53
53
  redirect_to '/checkout' and return if !logged_in?
54
54
  redirect_to '/checkout/addresses' and return if @order.shipping_address.nil? || @order.billing_address.nil?
55
- redirect_to '/checkout/shipping' and return if @order.shipping_service_code.nil?
55
+ redirect_to '/checkout/shipping' and return if @order.has_empty_shipping_methods?
56
56
  end
57
57
 
58
58
  # Step 5 - Payment
@@ -60,7 +60,7 @@ module Caboose
60
60
  def payment
61
61
  redirect_to '/checkout' and return if !logged_in?
62
62
  redirect_to '/checkout/addresses' and return if @order.shipping_address.nil? || @order.billing_address.nil?
63
- redirect_to '/checkout/shipping' and return if @order.shipping_service_code.nil?
63
+ redirect_to '/checkout/shipping' and return if @order.has_empty_shipping_methods?
64
64
 
65
65
  # Make sure all the variants still exist
66
66
  @order.line_items.each do |li|
@@ -188,11 +188,6 @@ module Caboose
188
188
  render :json => resp
189
189
  end
190
190
 
191
- ## GET /checkout/shipping
192
- #def shipping
193
- # render :json => { :rates => ShippingCalculator.rates(@order), :selected_rate => ShippingCalculator.rate(@order) }
194
- #end
195
-
196
191
  # PUT /checkout/shipping
197
192
  def update_shipping
198
193
  op = OrderPackage.find(params[:order_package_id])
@@ -227,6 +227,15 @@ module Caboose
227
227
  gc.save
228
228
  end
229
229
  end
230
+
231
+ def has_empty_shipping_methods?
232
+ return true if self.order_packages.nil?
233
+ return true if self.order_packages.count == 0
234
+ self.order_packages.each do |op|
235
+ return true if op.shipping_method_id.nil?
236
+ end
237
+ return false
238
+ end
230
239
  end
231
240
  end
232
241
 
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.73'
2
+ VERSION = '0.5.74'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.73
4
+ version: 0.5.74
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry