Score:-1

Order workflow based on shipping method

cn flag

I need a custom order workflow that is dependent on the customer address.

I know I can define different order types with custom workflows, but this doesnt help as ultimately this is dictated by the products.

Basically I need to have a shipping method with a condition of postcodes, if a customer is placing an order and this shipping method is selected then the order needs to be received as pending for review by the store administrator before the order is accepted.

They key point is that some orders will go thorugh a default workflow and the order is completed on checkout, but other orders must not be completed and must wait to be accepted, and this is based on the postcode of the customer address. I know this would be easy to configure if all orders went through the same workflow, or if it was based on the products.

I think i will need to write some code in an event subscriber, but at what point and where do I hook into the checkout process where I can check the shipping method but also put the order into a "waiting to be accepted" state? I dont think I can just change the order type in an event susbscriber when its already going through a transition?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.