caboose-cms 0.5.131 → 0.5.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/app/controllers/caboose/cart_controller.rb +2 -2
- 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
|
+
NmIwMjBmY2NmYzVkZGUzYzgwZmZkMzY5NTYzM2FkOTc0ZTYwZWYwZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MmU2ZjNjYjg0MTQ4NjIyMjRmNDlmZWE5ZWNjODYxNDAyNmJlNjJlZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGI5OGU2ZjZlNTJjMmM0YjQwODkzNjI4NDc5OTMzMjgxY2Q4NmQ1MTJkNzcx
|
10
|
+
OGJlZWI0ZDM1MWExMDc3ZGE3NGNmMDVlYWNkMDliOTg5ZTU2Mzg4MTQyYWQy
|
11
|
+
ODkyNjZjNDhjMGU0Mjg0ZDI2MGExMWUxNDQzNDgxMmFiYjM0Yjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjdhOTYyZjI0MDQ0OWNmNDAzMmQzNGFkY2ExYzViYzlmZmNhYTZjNzM2ZmEy
|
14
|
+
YWRhOWQ4ZWZkOTI4OTk1OGJjNTZiYzkyZjYwNTRmZjg0NjM5MzYwNGU5MTQ0
|
15
|
+
ZWUxYmNkNmYwZDc2ODViMjg3NmY2ZDMwMGMxODI5MzQwNWY0NWE=
|
@@ -89,8 +89,8 @@ module Caboose
|
|
89
89
|
|
90
90
|
if gc.nil? then resp.error = "Invalid gift card code."
|
91
91
|
elsif gc.status != GiftCard::STATUS_ACTIVE then resp.error = "That gift card is not active."
|
92
|
-
elsif gc.date_available && DateTime.now.utc <
|
93
|
-
elsif gc.date_expires && DateTime.now.utc >
|
92
|
+
elsif gc.date_available && DateTime.now.utc < gc.date_available then resp.error = "That gift card is not active yet."
|
93
|
+
elsif gc.date_expires && DateTime.now.utc > gc.date_expires then resp.error = "That gift card is expired."
|
94
94
|
elsif gc.card_type == GiftCard::CARD_TYPE_AMOUNT && gc.balance <= 0 then resp.error = "That gift card has a zero balance."
|
95
95
|
elsif gc.min_order_total && @order.total < gc.min_order_total then resp.error = "Your order must be at least $#{sprintf('%.2f',gc.min_order_total)} to use this gift card."
|
96
96
|
elsif Discount.where(:order_id => @order.id, :gift_card_id => gc.id).exists? then resp.error = "That gift card has already been applied to this order."
|
data/lib/caboose/version.rb
CHANGED