Modification in Checkout Flow

35 views
Skip to first unread message

Muhammad Aamir

unread,
May 19, 2013, 4:26:28 AM5/19/13
to spree...@googlegroups.com
Hi,

I would like to intercept checkout flow by adding following in order_decorator.rb:

  Spree::Order.state_machine.before_transition :to => :delivery, :do => :test?

 
def test?
    errors
.add(:base, "error 1")
   
return false
 
end


It does work however the only error it shows to the user while moving to that state is this:

Payment could not be processed, please check the details you entered

It remains the same whether I add the errors.add line or note. Also it remains the same even if I change the state from :delivery to any other.

Thanks

Ryan Bigg

unread,
May 21, 2013, 10:52:33 AM5/21/13
to spree...@googlegroups.com
Please file a new issue about this on https://github.com/spree/spree/issues providing the information asked for in the https://github.com/spree/spree/tree/master/CONTRIBUTING.md doc.

I think that you may have found a bug in spree and having this information would be extremely helpful in being able to debug that.
Reply all
Reply to author
Forward
0 new messages