Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 8 additions and 0 deletions.
  1. +6 −0 core/app/models/order.rb
  2. +2 −0  core/lib/spree_core.rb
View
6 core/app/models/order.rb
@@ -73,6 +73,10 @@ def payment_required?
total.to_f > 0.0
end
+ def delivery_required?
+ false
+ end
+
# Indicates the number of items in the order
def item_count
line_items.map(&:quantity).sum
@@ -83,6 +87,8 @@ def item_count
event :next do
transition :from => 'cart', :to => 'address'
+ transition :from => 'address', :to => 'delivery', :if => :delivery_required?
+ transition :from => 'delivery', :to => 'payment'
transition :from => 'address', :to => 'payment'
transition :from => 'payment', :to => 'complete'
end
View
2  core/lib/spree_core.rb
@@ -40,6 +40,8 @@
require 'find_by_param'
require 'jquery-rails'
+ActiveSupport::Deprecation.silenced = true
+
require 'spree_core/ext/active_record'
require 'spree_core/ext/hash'

No commit comments for this range

Something went wrong with that request. Please try again.