Open eigood opened 1 month ago
This branch also fails if purchasing a digital product, that will never have an asset. Basically, you're adding a forced call out to the create#DropShip service, for all orders being placed, and then returning error when the invariants necessary for drop ship to function are not found. That's going to cause a lot of breakage for existing users.
Don't return error in any case, and ideally, don't spam the log with "can't do drop-ship foo because of bar", for existing flows.
Please try this against upstream demo data.
https://github.com/moqui/mantle-usl/blob/3b492bff368aeb633d975a5bba3b2276dc9232b7/service/mantle/order/OrderServices.xml#L2874
If there is no Facility defined for a product, then this line should just return, and not treat it as an error. In this case, drop-ship isn't wanted. This service is called via SECA on all orders, when they transition to Approved status, so needs to handle all cases.
(This actually failed on me, when I attempted to place an order on an existing product that hadn't been matched to a facility yet)