1

i wanted to setup cash on delivery and in store pick as my shipping options. So when the user selects the in store pick up the address is set to store location.

these are the changes i made to order_decorator.rb

Spree::Order.class_eval do
 remove_checkout_step :payment
  checkout_flow do
   go_to_state :delivery
   go_to_state :address
   go_to_state :confirm
   go_to_state :complete
 end 
end

when i checkout after adding some items i get unshippable items

do i have to change the code in checkout.rb file

are there any good guides on solidus

Thank you

1 Answers1

0

For cash payments you create a payment of type Check and just name it COD.

For store pickups, just add a button on the Address page of orders stating Store Pickup. Do display store address in a panel below order summary, this address needs to be stored in the spree_address with some set id and fetch it from there. On click of the button just create entries in spree_user_addresses for shipping and billing and point to that same address, then proceed with the code associated with Save and Continue button.

The store address can be saved in spree_address via seed file, do check the address before filling for it. Just make sure that if that address doesn't exists then don't display this extra UI elements and everything else will work as is.

Mink
  • 160
  • 3
  • 12