caboose-cms 0.5.98 → 0.5.99
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/application_controller.rb +2 -3
- data/app/models/caboose/order.rb +10 -10
- 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
|
+
ZWZiNWY5N2FmMjRmZjJkZjRiYmEwNThhMDgyZjVhYzBiZGY0YjllOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzRmNTI1NzMzNjY1OGRlZDRlZTQ1N2I5NzRjYTkyYWZmNTYyYTM5Nw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmZkOTAzMDhhYzEzZGI3ZGRlMGI0MDc5Zjk4MWY3YWY4ZDg3OTJjMTc2NDIy
|
10
|
+
Mzk3MDI2ZDI2ODdkZTVkZjM0N2FjNzNmYjAxYzBmYTJjNmVmMGZmYjBkOWM2
|
11
|
+
NmQ4OWIxMDk1MjYxNzUwMDllNjY1MDJmZTE1OGFmZDQ3N2U3MTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzZmMTI4NWE4YTc5OGZiNzJmOGMxMTE1ODk3MjQzNTQ1OWRmMzc2MjZmYWNm
|
14
|
+
OGIwMmQ5OGM1NmZhODg0MGMxNWQwOGNmZDhlODk3MjcxODE2NDI2MzA2ZGFl
|
15
|
+
MDc2OTZiYjFiZTY1ZmFjNGJkYzcyYjY1MjRlODk2YzQ1MmE0ZjE=
|
@@ -63,9 +63,8 @@ module Caboose
|
|
63
63
|
create_new_order = true
|
64
64
|
end
|
65
65
|
|
66
|
-
if create_new_order # Create an order to associate with the session
|
67
|
-
Caboose.
|
68
|
-
@order = Caboose::Order.new
|
66
|
+
if create_new_order # Create an order to associate with the session
|
67
|
+
@order = Caboose::Order.new
|
69
68
|
@order.site_id = @site ? @site.id : nil
|
70
69
|
@order.status = Caboose::Order::STATUS_CART
|
71
70
|
@order.financial_status = Caboose::Order::STATUS_PENDING
|
data/app/models/caboose/order.rb
CHANGED
@@ -9,10 +9,10 @@ module Caboose
|
|
9
9
|
|
10
10
|
belongs_to :site
|
11
11
|
belongs_to :customer, :class_name => 'Caboose::User'
|
12
|
-
belongs_to :shipping_address, :class_name => 'Address'
|
13
|
-
belongs_to :billing_address, :class_name => 'Address'
|
12
|
+
belongs_to :shipping_address, :class_name => 'Caboose::Address'
|
13
|
+
belongs_to :billing_address, :class_name => 'Caboose::Address'
|
14
14
|
has_many :discounts
|
15
|
-
has_many :line_items, :
|
15
|
+
has_many :line_items, :order => :id
|
16
16
|
has_many :order_packages, :class_name => 'Caboose::OrderPackage'
|
17
17
|
has_many :order_transactions
|
18
18
|
|
@@ -156,13 +156,13 @@ module Caboose
|
|
156
156
|
PaymentProcessor.void(self)
|
157
157
|
end
|
158
158
|
|
159
|
-
def line_item_added(line_item)
|
160
|
-
|
161
|
-
end
|
162
|
-
|
163
|
-
def line_item_removed(line_item)
|
164
|
-
|
165
|
-
end
|
159
|
+
#def line_item_added(line_item)
|
160
|
+
# self.calculate
|
161
|
+
#end
|
162
|
+
#
|
163
|
+
#def line_item_removed(line_item)
|
164
|
+
# self.calculate
|
165
|
+
#end
|
166
166
|
|
167
167
|
def calculate
|
168
168
|
self.update_column(:subtotal , self.calculate_subtotal )
|
data/lib/caboose/version.rb
CHANGED