问题
I tried to create app/models/spree/order_decorator.rb as :
Spree::Order.class_eval do
checkout_flow do
go_to_state :address
go_to_state :payment, :if => lambda { |order| order.payment_required? }
go_to_state :confirm, :if => lambda { |order| order.confirmation_required? }
go_to_state :complete
remove_transition :from => :delivery, :to => :confirm
end
end
but this code only removes delivery process , I think I have to make some changes in order model but that was too complicated for me , anybody pls help me out for what are changes has to be done to achieve this ?
Also I have to remove validation for shipping method..so that i can go next page of check out flow.
thanx in advance.
回答1:
Have you reviewed the docs on the checkout flow API?
http://guides.spreecommerce.com/developer/checkout.html
来源:https://stackoverflow.com/questions/17328221/in-spree-2-0-3-how-would-i-remove-shipping-address-in-spree-checkout-routine