spree_wholesale icon indicating copy to clipboard operation
spree_wholesale copied to clipboard

Pay later causes a crash on the confirm step

Open jsqu99 opened this issue 12 years ago • 0 comments

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 `<'

jsqu99 avatar Jul 07 '12 21:07 jsqu99