How to create multiple orders for multiple sellers on my marketplace app

My app is an online marketplace where sellers can login and sell products through my platform. Users (buyers) can add products to their cart from different sellers but when they checkout and an order is created (one order containing all of the various products they bought), I then need to send multiple orders to the multiple sellers which would contain the products and quantities (line items) they need to produce as well as a date in which they need to be produced by.

I cannot work figure out how to send multiple (unfulfilled orders) out to the various sellers of the products that the buyer has in their basket.

Thank you for your help, any bit of help is welcomed.

@duke.severn @keith

Hey Josh!

How far along are you? Last we spoke I covered a few things about transactional database structure - if you have all of your product as individual data points (or individual “things”), all pointing back to an “order”, I think it should be relatively easy for you to split and then re-merge the order. What part of it do you need help with?

I have SKUs for each of my products such as “UK 9 Air Jordans” & “UK 7 Air Jordans” and those SKUs are under the product: Nike Air Jordans as part of a List of SKUs. When an item (SKU) gets added to a buyer’s shopping cart (which is created for them when they signup) , a line item is created and that Line Item is made up of the selected SKU and quantity. When the buyer checks out, I create an order which contains a list of line items and price etc. My challenge is to then create a ‘sub-order’ which contains the Line Items and Line Items sub-total for that specific vendor and then adding that sub-order to a list of ‘unfulfilled orders’ for that specific vendor/seller.

Let me know if that makes sense.

Thanks again for your help Duke!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.