Store products are supplied from different vendors. It is required to create multiple order for every vendor based on its products in the cart during one checkout. Is there any extension to achieve this task or should I start to develop custom checkout module. What about hot points for creating such extension vision of experienced developers of Magento? Can you explain me brief checkout flow architecture Magento friendly (as possible as code level)? Thanks much more!
Magento – Multiple Orders on One Checkout or Order Splitting
checkoutcodeorder-splitting
Best Answer
It is doable quite easily with a rewrite of the
checkout/type_onepage
model.In that class override the
saveOrder()
method as follows:But be aware that in Magento a payment is associated with an invoice, and each invoice is associated with an order.
In consequence this means that as soon as you have multiple orders, you will also have split the payments. So this is only feasible if the payment method doesn't require user interaction during the payment.
UPDATE: The orginal answer delegated to
parent::save()
which had to beparent:saveOrder()
. It is fixed in the example code now.