1

We have a website with Craft CMS. We sell and export goods to different countries.

Our customers can select multiple shipping method. For example if they had 10 different item on cart, they could choose 4 of 10 with shipping A method, 6 of 10 with shipping B method.

And they pay for all at once. Single order with two different shipping method.

We also need to see the details and total costs of each shipping methods. So we can make two different bill of lading for each carrier. It is necessary for customs.

How can we handle this? We haven’t found a proper solution with coding.

Thanks.

1

What have you tried so far?

Right now, Commerce doesn't support multiple shipping methods per order. Depending on your process for fulfillment, there could be a couple workarounds.

Split a single order into multiple orders

Arguably this might be the best way to handle this. Basically you need to group each group of items into their own order.

Theoretically this could be seamless to the customer since Commerce allows you to juggle more than one cart per customer, but you would need a fair amount of logic to get it working well.

Basically when the customer is checking out, you'd loop through multiple carts. The customer would start with a single cart then when they're splitting their order up, those items would get "moved" to different carts. Then you could programmatically complete each order after the customer pays for the entire first order.

Internally to the customer there would only be one order but behind the scenes, you're essentially breaking it up into multiple.

You'd need to do some workarounds around notifications and develop your own logic as to how to group orders together but Commerce would be able to figure out shipping rates for each order and your shipping methods would more or less act as they would otherwise.

How you might do that is up to you but this isn't uncommon. Amazon does this with items from different sellers or warehouses.

Using Adjusters

A more hacky way would be to use adjusters. Create a new shopping method, call it "Multiple Carriers" and then figure out the shipping rates based on what the customer wants to do.

You'd be essentially sidestepping Commerce's built-in shipping calculations which isn't ideal, however if your shipping method calculation is pretty straightforward, this could work OK.

However, another downside of doing it this way is you need to figure out the fulfillment yourself of each piece of the order when with different carriers, etc. Do you want to send an email notification when each part ships? That gets harder if everything is in one order, versus if you split the orders, Commerce can more or less handle that for you.

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.