Split Order On Checkout:
I'm looking to to split an order automatically into multiple orders based on some product pricing attribute in the cart or the order. The customer will receive different order ids for their ordered cart.
I have 3 items in the order with each item value as Â£10, Â£20, & Â£0 (using voucher code). The logic I want to implement is - whenever there is an item in the order with value Â£0 (using voucher code) I would like to split this item and create a different order separately and give a different order id.
I will treat this order as a different order and do the financing, logistics separately on my backend accounting and logistics system. In the front-end also I would like to show customer as 2 different orders with 2 different invoices and tracking.....etc.
is that possible (incl Add-ons)? if yes, suggest me
You might want to use the pre_place_order hooks to create a new 'cart', move the product from the original cart to the new cart. Then call fn_place_order() and fn_order_placement_routines() with the new cart on the returned $order_id before allowing the hook to return to the original fn_place_order() call without the free product.
You might be able to also do this using a checkout.pre.php controller and then looking at the $mode and acting on it. But the pre_place_order hook is much cleaner to use for this.
If you do not find the solution, please contact us.
There is such a feature in Multi-Vendor which splits main order into "suborders". Possibly you can use it for you needs
There is a setting for this in multivendor or is default?
Can we choose to split or not the orders with products from different vendors in multiple orders?
Yes, this is default feature. Unfortunately, you cannot configure it