-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved Multi-Vendor Marketplace Support #1329
Comments
@michaelbromley We are very interested in this feature, and we are trying to create it right now, with channels. Our current status is, that we are using Vercel Commerce as the storefront and have adjusted it, so "Designers" are channels and it sorts/filters products perfectly with name, price, and categories. This is totally out of context so I understand if it does not make total sense, but: We would like to have a full-blown multi-vendor shop within the next 3 months, so if we can help with brainstorming you are more than welcome to reach out. Just a short description of us: We are a startup in Denmark, trying to help retail stores - especially those highly affected by Covid-19 - showcase what they have in their store, and make it easy for their customers to find them and their products. Our mission is to help them keep their dream of being a store owner alive :) Bottom line: If we can help in any way, brainstorming, testing, development, or something else, don't hesitate to reach out |
Hi @AndersGerner! I'm definitely interested to learn more about your use-case & discuss the potential of collaboration. Reach out to me via contact[at]vendure.io or via Twitter and let's chat. |
Hello I'm looking for similar functionality, though to call it multi-vendor is perhaps too overloaded. Essentially I'm looking for the ability for a product buyer to immediately be able re-list that item for sale. Essentially a marketplace where users have the ability / role of both buyers and sellers. Could this be done as a plugin, or would it need core level changes? |
@magick93 This could already be implemented in v1.x as a plugin - as to the exact implementation there are a number of ways to do it depending on your particular workflows & requirements. I know of several projects already under development that follow a similar model. If you join our Slack group you might be able to connect with someone about this. |
I'm still pretty curious about the restructuring of the channel roles relations. Are there any updates on that? |
@Draykee not started work on this feature yet. |
|
|
|
I would say that if a customer searches for a product they should see all the products that are offered by the different vendors on the marketplace. |
For my usecase this would be bad. I need all channels to be exclusive and only accessable to selected customers. |
Fair point to generalize this, merging some implementation detail. Example 1: |
Hi @michaelbromley, very interesting feature.
Currently, I'm using TypeORM events to update the relations and custom GraphQL to retrieve orders. On the payment side, I'm using a marketplace provider (Mangopay) with a e-wallet model which can be challenging on the payment handler side. |
I wanted to go ahead and describe a multi-tenant use case that we want to make it work with Vendure.
I am not sure if i listed all the points but i would be open for discussions on how to do this with the current Vendure and with this initiative right here. |
One of the necessary functions for marketplaces is the money withdraw for sellers. In more complex systems, this is achieved by using separate payments, such as stripe Connect or PayPal marketplace. The data for withdrawal and the preferred payment system the vendor specifies in their dashboard. In simpler systems, where the marketplace is only one of the system options and is not emphasized, the system works like this: Also, the marketplaces themselves exist on commissions from the sales of vendors. |
@JustDenP Thanks for this insight. The most important thing I want to get in v2 is that we have a correct data model to support marketplace-like apps. It's likely that we will not ship v2 with full support for all the major features of a marketplace, but as long as the underlying data model is correct we'll be able to incrementally increase support for richer marketplace features in subsequent versions (or make it much simpler for you to implement such features as plugins). |
Is there a design picture of the fully fledged version of this feature? Like what happens to facets (will they be shared between channels etc.) |
Is any of the work/discussion here useful to break down some of the unknowns? https://github.com/Saleor-Multi-Vendor/saleor-multi-vendor (also see the issue tracker for more info) |
While this is being considered, I think another use case is Multi-tenant support, within a single schema. Could this be included in the redesign? It's a major request for other open source commerce apps (not supported out of the box, but with cumbersome workarounds such as https://medusajs.com/blog/medusa-extender ), and would be a great differentiator for Vendure. |
@dnk8n thanks for the pointer - I was searching for existing multivendor open source implementations to study and they are hard to find! I'll definitely look into this. @mariusa the multi-tenant story is already fairly well supported - see these docs. There might well still be some improvements we can make, but I already know of multi-tenant projects already in production. |
Thanks Michael, Sorry to say this, but the current multi-tenant support seems a workaround. If you compare with Shopify, a shop can have multiple markets (currencies, countries...) and multiple users, which are managed by the merchant (shop owner). The "Ace Parts" business from the docs example could simply signup at cloud.vendure.io, create channels for themselves (eg online store, Amazon, Etsy...), define markets and so on. They wouldn't need a super admin to create an user & channel for them. |
@mariusa I see. Yes, making Vendure as capable as a multi-tenant solution like Shopify is not a priority right now - the current multi-tenant functionality is more suitable to a project wherein the tenants are controlled by a central admin, who can grant access to owners of individual stores. But if you did want to make it self-serve like Shopify, you can create a custom mutation that does all the needed steps of creating a new channel, creating a role and admin, assigning permissions etc. I believe some projects have implemented such a feature. |
Relates to #1329. This implements the "partial order" concept (renamed to VendorOrder). This commit includes just the bare minimum data model changes and assignment flow.
Update after experimenting for a couple of days of different approaches: Using the Partial Order (VendorOrder) method does allow us to correctly split up OrderLines between the various vendors (channels), but there are numerous complexities that then need to be handled:
There are probably dozens more hidden complexities with this design. Thus I'm proposing a totally different approach which aims to eliminate all of these issues Let's call this "nested orders" Nested OrdersIn this model, there are no new entities needed. Only the existing class Order {
type: 'regular' | 'aggregate' | 'vendor'
vendorOrders: Order[];
parentOrder?: Order;
} A For multivendor apps, the flow would work like this:
|
This commit implements an experiment on getting vendor-specific order data from the `order` query in the Admin API. In exploring this, many complexities with this design became apparent, which I detail here: #1329 (comment) So I'm just committing this for future reference and then I will start on a different design, the "nested orders" idea.
I like the idea of nested order. This would make the way migration easier! I had a few other thoughts as well:
|
@Draykee Thanks for the suggestions!
This sounds like a separate feature request, but may already be covered by existing & planned functionality: vouchers & discounts are handled by Promotions. Service fees can be implemented as Surcharges. Discounts based on quantity is planned as an extension to the OrderItemPriceCalculationStrategy by passing in the quantity.
Possibly - I've not figured out that part quite yet. Part of this depends on the business model of the marketplace: some marketplaces will not hold funds for sellers, but will use something like Stripe Connect so that the seller is paid immediately by the customer. In all cases, it might be possible to just use the existing Payment entity, and have a type of PaymentHandler which represents payouts as in your scenario. Needs further exploration.
I plan to revisit permissions & especially as they relate to Customers vs Admins. For now I'm just concentrating on the Order mechanics. Split orders: prior artUnrelated, but I'm just gonna dump some prior art links here that I've found: |
Hi there, |
Hi @gilesbutler I'm hoping to have a beta version available around the end of February. We publish pre-releases quite regularly on the |
Amazing to hear @michaelbromley and thanks for getting back so quickly! Look forward to giving it a test on the |
Video update on the latest progress (which is now merged into the |
Amazing work @michaelbromley Just watched the video. Interested to know if you were able to study Spree's multivendor functionality. You have made an evidently tricky feature so much more accessible to the open-source community. You should be very proud of those achievements! |
Great work @michaelbromley! From the video, it looks like the aggregate order doesn't have a fullfilment. This could be useful if vendors are shipping to a common distributor which packs the partial orders together and ships them out. |
Cool! Another question about future multi-vendor functionality: |
@ivasilov It will be possible for either the aggregate order or the seller orders to control the fulfillment flow. Part of the work I did on this was to extract all the previously hard-coded logic around automatic Order state transitions etc. into the configurable order process. This means you can completely skip the default behaviour and tailor the flow exactly to your needs. @JustDenP Yes, each seller can create their own products & variants if their role has the required permissions. So this is something you can control depending on the requirements of your marketplace app. |
In my use case I don't need one order to split between multiple vendors, but instead one cart per vendor like instacart, and also have a "global" catalog of products where vendors can just search and choose to list products from the catalog, only needing to change price and inventory information. Is this possible with v1? |
Excellent work @michaelbromley Do you have an ETA on when this functionality will be published to npm under 2.0 next versions? |
@petercn In my dev env, after replacing packages versions with EDIT: according to this Readme file, the |
@mpacary Thank you for confirming the feature in 2.0.0-next.28, I might have still been on 2.0.0-next.27 or failed to do the migration when I tried it out a few weeks ago. I'll give it a shot again |
Hi, is multi-vendor marketplace feature included in v2 core? |
@adamtang79 Yes - though it's not so much as single "features" as a set of APIs that unlock this kind of application. I'm right now working on a guide to these new APIs which will form part of the v2 docs when we release later this week! |
Is your feature request related to a problem? Please describe.
We get a lot of questions about support for multi-vendor marketplaces (MVM). In fact, this is probably the number 1 feature request at the moment. Though it technically is possible to implement this on top of the Channels feature, it is not straightforward and certain scenarios require a bit of hacking to get them working.
With certain changes to the DB schema etc we can 1) make MVM support ready to go "out of the box" and 2) support more advanced features such as multiple active orders for each vendor's products in cart.
Requested Features
I requested suggestions for features on Slack. Here's the responses:
The text was updated successfully, but these errors were encountered: