caboose-cms 0.5.124 → 0.5.125
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/controllers/caboose/variants_controller.rb +4 -2
- data/app/models/caboose/product.rb +1 -1
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjMxMTI2ZDVkYmZiYjMwOTUwMzM3OTgzM2M4NDIwZjhiNmMyNWM2OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTgyNjNlYzllMDgyOTViNzlkYjcxN2Q0NzNlMGE5ZTQ3Zjk5ZTFhOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzNmYTYyNDVkYzkwZmJkYzVmODhkMmZkZGNlMDM4YjJmNTVkYjY2Y2NiMTVi
|
10
|
+
NzQyMTlhNDU3OTIyNWM5NWUxYmI5NDU2NTgwNWIwMGQxZjc5YjZhNTQzZmJj
|
11
|
+
MTk5NDlkYmZhMTYwYmY2YzAxODcxODFmNDQ0ZDk1ODRkZTI2YTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWY0YmI0YjQzNjI5NmE1NjAxZjg5YWIyYzZlOGM3ZDU4YTNlYzFhOGFkNGZi
|
14
|
+
NmJiN2I4OWZkMTc5OTdjYmI1YWNjMTcwMjY4MzA0YmQ1MTg4NmNjMzY3MmJl
|
15
|
+
MzhjYjE4ZDBhMGY5MjJjNTRmNGNjZGFmOTI0OGQ0NDBlM2QxZjQ=
|
@@ -141,10 +141,12 @@ module Caboose
|
|
141
141
|
v.product.delay(:run_at => 3.seconds.from_now).update_on_sale
|
142
142
|
when 'date_sale_starts'
|
143
143
|
v.date_sale_starts = ModelBinder.local_datetime_to_utc(value, @logged_in_user.timezone)
|
144
|
-
v.product.delay(:run_at => v.date_sale_starts).update_on_sale
|
144
|
+
v.product.delay(:run_at => v.date_sale_starts).update_on_sale
|
145
|
+
v.product.delay(:run_at => 3.seconds.from_now).update_on_sale
|
145
146
|
when 'date_sale_ends'
|
146
147
|
v.date_sale_ends = ModelBinder.local_datetime_to_utc(value, @logged_in_user.timezone)
|
147
|
-
v.product.delay(:run_at => v.date_sale_ends).update_on_sale
|
148
|
+
v.product.delay(:run_at => v.date_sale_ends).update_on_sale
|
149
|
+
v.product.delay(:run_at => 3.seconds.from_now).update_on_sale
|
148
150
|
end
|
149
151
|
end
|
150
152
|
resp.success = save && v.save
|
@@ -107,7 +107,7 @@ module Caboose
|
|
107
107
|
|
108
108
|
self.variants.each do |variant|
|
109
109
|
next if variant.nil? || variant.price.nil? || variant.price <= 0
|
110
|
-
price = variant.on_sale? ?
|
110
|
+
price = variant.on_sale? ? variant.sale_price : variant.price
|
111
111
|
min = price if price < min
|
112
112
|
max = price if price > max
|
113
113
|
end
|
data/lib/caboose/version.rb
CHANGED