P
P
Peter2014-02-12 16:25:51
Ruby on Rails
Peter, 2014-02-12 16:25:51

How to change checkout page in Spreecommerce?

Who worked with Spreecommerce? Can you please tell me how to change the checkout page?
How to remove steps when ordering? And why at the first step, there is an error?


We are unable to calculate shipping rates for the selected items.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2014-02-12
@SeNaP

Found a solution.
Maybe someone will be interested.

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
  end

  # If true, causes the payment step to happen during the checkout process
  def payment_required?
    return false
  end

  # If true, causes the confirmation step to happen during the checkout process
  def confirmation_required?
    return true
  end

end

Throw in:
/app/models/spree/order_decorator.rb

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question