Change Checkout Controller Action

I am looking for the source code for the Checkout controller ( https://github.com/spree/spree/blob/0-60-stable/core/app/controllers/checkout_controller.rb ) and have not found the editing action there. Where is this defined?

+4
source share
3 answers

CheckoutController has an implied edit action. There is no direct logic for editing itself.

However, there is a before_filter: load_order file, which, in turn, runs the before_ [state] callback method, depending on the state of the checkout.

+5
source

Spree uses the resource_controller gem - https://github.com/jamesgolick/resource_controller , so actions that are not defined in the Spree code can be performed in resource_controller.

0
source

There is no edit action in Shree :: CheckoutController, but it displays checkout / edit.html.erb. Link to the superclass. The following recommendation from spree documentation

The edit action renders the checkout/edit.html.erb template, which then renders a partial with the current state, such as app/views/spree/checkout/address.html.erb. This partial shows state-specific fields for the user to fill in. If you choose to customize the checkout flow to add a new state, you will need to create a new partial for this state.

0
source

All Articles