Permalink
Browse files

Add delivery step back in

  • Loading branch information...
nateberkopec committed Mar 14, 2013
1 parent e27e22b commit 4c9df89971c76bd4f64121b69e6971ee89d989cb
Showing with 7 additions and 1 deletion.
  1. +7 −1 core/app/models/order.rb
View
@@ -83,8 +83,10 @@ def item_count
event :next do
transition :from => 'cart', :to => 'address'
+ transition :from => 'address', :to => 'delivery', :if => :delivery_required?
transition :from => 'address', :to => 'payment'
- transition :from => 'payment', :to => 'complete'
+ transition :from => 'delivery', :to => 'payment'
+ transition :from => 'payment', :to => 'complete'
end
event :cancel do
@@ -167,6 +169,10 @@ def restore_state
end
+ def delivery_required?
+ false
+ end
+
before_validation :clone_billing_address, :if => "@use_billing"
attr_accessor :use_billing

0 comments on commit 4c9df89

Please sign in to comment.