openfoodfoundation / openfoodnetwork

Connect suppliers, distributors and consumers to trade local produce.
https://www.openfoodnetwork.org
GNU Affero General Public License v3.0
1.11k stars 723 forks source link

[Spree 2 Upgrade] Remove call to #create_shipment! #2007

Closed sauloperez closed 6 years ago

sauloperez commented 6 years ago

As described in go_to_state :payment in https://community.openfoodnetwork.org/t/order-model-step7/979, Spree now creates shipment objects out of packages in memory, which then presents in a form that are going to be persisted when the user submits the form. Check it out in 283654d4a330924b171441427b26ce89469b4b04.

As a result, we can get rid of https://github.com/openfoodfoundation/openfoodnetwork/blob/master/app/models/spree/order_decorator.rb#L34

EDIT

Turns out that due to https://trello.com/c/jQuW8D5A and https://trello.com/c/prYaoPlB we can get rid of the whole custom checkout_flow

mkllnk commented 6 years ago

Turns out that due to https://trello.com/c/jQuW8D5A and https://trello.com/c/prYaoPlB we can get rid of the whole custom checkout_flow

I'm not sure about this. Yes, we can remove order.create_shipment!. And without creating a shipment, we don't need to check if the shipping method needs a shipment. But what about the Paypal issue? Has there been a survey to ask everyone if we can get rid of it?