Skip Address Collection #6407
-
|
I am trying to skip address collection since it is often not necessary for my use-case (local pickup). However I want to keep the delivery step since I consider "local pickup" a delivery method and in the future plan on adding more delivery methods that do require an address. I noticed in the docs it is said that:
I've been trying to override the Order StateMachine to handle this but can't find where the address is actually required. I want to modify that logic so it's not required and the Shipments are still created. Any help here would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
@cdavaz, When transitioning to the delivery state, Solidus runs three before_transition callbacks ( you can override above method to conditionally skip address validation and other stuff. |
Beta Was this translation helpful? Give feedback.
@cdavaz, When transitioning to the delivery state, Solidus runs three before_transition callbacks (
Spree::Order):ensure_shipping_address- Validates that a shipping address existscreate_proposed_shipments- Creates shipments for the orderensure_available_shipping_rates- Validates that shipping rates are availableyou can override above method to conditionally skip address validation and other stuff.