Objective: Skip the delivery step in the Checkout state machine and bring back the ability to add a default shipping method and tax calculation
Approach: Add decorators to the Checkout controller and the Order model (see attached files)
Note: This approach might be better managed by overriding the self.define_state_machine!
method of the Checkout model located at app/models/spree/order/checkout.rb
. However, this model is rather unstable in the Spree upgrade path and overriding the above classes seems to be simpler to adjust.
This is not working.
Error shows undefined method rate_hash and first for nil:nil_class.
Will you please a full model and controller code to skip delivery step but adding default shipping.