Functionality to have multiple sub-stores/vendors within one overall store i.e. Etsy
Hi everyone, referring to MarketPlace, Adam mentions
Orders/carts must be split out per vendor for fulfilment
Can I have some clarification on this, please?
From what I understand, every time a customer adds a new product to their cart, I have to create a different cart reference depending on the vendor they are purchasing it from.
If this is the case, I gather I will have to add the vendors ID to each cart instance, so I am able to retrieve cart items and their corresponding vendor later on.
Am I thinking along the right lines here, or am I way off?
Of course the next bit would be handling checkout… if you have any information please let me know…
Any help guys with this issue?
If you’re running multiple vendors from one store but you don’t want to share carts between these vendors (products from multiple vendors in one cart), then yes, you’ll need a way to namespace cart references. Since you can define cart references yourself, this should be pretty simple, you’ll just need some form of identifier for each vendor. If you were to use a moltin store per vendor, then this would be handled for you, there would be no need to segregate the carts yourself.
Checkout should be pretty much the same as checking out on a normal store. If you’re doing multiple vendors on one store, you will need a way to identify which order belongs to which store. You could potentially use a flow field for this. You’ll also need to consider payments, we only support one payment method per gateway per store so you’d need to take all payments with a single account.
Use something like this then for the cart reference? https://github.com/kelektiv/node-uuid
Yes, that would work fine. You might want to prefix with the vendor ID so you can tie a cart back to a vendor easily. Such as
Oooo great idea. Many thanks for your help James