citrus / spree_wholesale

A wholesale extension for Spree Commerce
http://rubygems.org/gems/spree_wholesale
BSD 3-Clause "New" or "Revised" License
36 stars 36 forks source link

Pay later causes a crash on the confirm step #23

Open jsqu99 opened 12 years ago

jsqu99 commented 12 years ago

We need to override the checkout helper (pull request imminent). It currently looks like:

    def checkout_states
      if @order.payment and @order.payment.payment_method.payment_profiles_supported?
        %w(address delivery payment confirm complete)
      else
        %w(address delivery payment complete)
      end
    end

Which mistakenly enters the else clause when you select 'pay later', but the order is in the 'confirm' state when payment profiles are supported.

This yields an error: comparison of Fixnum with nil failed

...ruby-1.9.3-p0-falcon/bundler/gems/spree-59399e6f5d29/core/app/helpers/spree/checkout_helper.rb:20:in `<'