Is it possible to fulfil orders partially? For instance when only two of four products are in stock, would it be possible to ship the two items immediately?


There is nothing stopping you from shipping what you want whenever, but there is no way to mark a line item as shipped. You would need to have custom fields on your order to track partial shipments, and if you wanted, a 'partially shipped' order status to be able to easily see partially shipped orders in the order index page.


To expand on Luke's answer a bit...

We have implemented our own, pretty decent partial order fulfillment system. In essence it is a matrix field (actually might be a SuperTable, but same same really) - on its own tab on the order, and a bunch of code that listens to onOrderSaveHandler.

It's super custom to our own processes so I haven't cleaned it up or made it a released plugin, I'm just presenting it here for info and inspiration (feel free to ask any questions though!).

It looks like this:

enter image description here

There are a bunch of different events that trigger different order statuses and emails, depending on what is chosen.

enter image description here

There is a simple a tick-box system that lets you nominate what specific products are being updated in this update. (Tick-boxes built with lj_dynamicfields plugin - https://github.com/lewisjenkins/craft-lj-dynamicfields).

So, basically each time an order is saved, we check if there are any new events (and each time an event is added we increment a counter in the db to keep track of this). If there are, we then action the event. The processing is pretty complex and unique to us, but it does things like build tracking emails for shipments if needed, or trigger refund stuff, or raise/add to a ticket in our customer helpdesk system (we use Freshdesk) if we need to communicate anything more complex than a basic shipment or whatever.

Each update is saved to the order, so the matrix itself is both the entry mechanism for updates, and forms a log of events on the order (they are time/dated of course).

When the order is finalised, i.e. the last thing is sent or cancelled or whatever, the processor sends the last update and ticks the 'complete' box and the order is marked as complete in commerce.

Here's an example from a real order - in this case it's a one item order, but the system is fine with single or many items orders of course.

enter image description here

It works really well for us.

It could be improved further (and I might do this when I port it to Commerce 2) - by having an individual status field for each item within the order, and separating out back end notes from customer notes (we only have customer notes here, order notes are currently elsewhere).

Also, we have a separate system for just throwing in a tracking number without these events if the order is just fulfilled immediately from stock (as most are of course - on that first Notes & Simple Shipping tab..) - so these 'In Progress Events' are only used for more complex things when really needed, and default order processing is kept as simple as possible.

I will say the integration to a ticketing system is a bit genius and really a whole big thing in and of itself that we use extensively elsewhere - it makes for a really easy to track order communication system...and is tied to the order status (ticket is closed when order is, etc) - but the basic connection is just one field with a ticket ID, if one has been created.

Of course, to make all this really work, you also need all your email templates, and of course templates for your customer to see all this in their account etc., assuming you are going the accounts route. It IS a fair chunk of work, but it has an absolutely massive impact on our efficiency - we spend just seconds on things that used to take minutes, with hand drafted emails etc etc - it's a major time (and thus money) saver. I reckon we save an hour a day with it, on average.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.