Saleor-Multi-Vendor / saleor-multi-vendor

Multi Vendor Plugin for Saleor e-Commerce
GNU General Public License v3.0
121 stars 17 forks source link

Development until now #47

Open shovan777 opened 2 years ago

shovan777 commented 2 years ago

What has been achieved?

The project has been set out to add multivendor feature in saleor as described in #40. Mainly, there are two parts for adding the multivendor feature, backend and frontend. Backend is a modified version of saleor in the django platform. Frontend is the vendor dashboard which is a modified version of saleor-dashboard. Following are the features added till now:

  1. Vendor welcome page vendor

    • vendor can login to the vendor dashboard and will see this page after that
    • vendor only has access to Home, Catalog, Order, Configuration contrary to admin dashboard which has additonal access to cutomers, discounts,apps, translations,etc.
  2. Catalog Page vendorProduct

    • vendor can see only his products
    • vendor can manage those products
  3. Inventory Management MicrosoftTeams-image (5)

    • vendor can maintain the inventory of his products
    • assign product stocks in his different warehouses
  4. Configurations Page MicrosoftTeams-image (3)

    • vendor can only access warehouse and shipping unlike in admin which has access to other things like attribute, types, pages,etc.
    • vendor can manage his warehouse
  5. Orders Page vendorOrder

    • vendor can only view his order
    • vendor can manage his order

      How has been the development until now?

      The approach taken here is as described In the Backend, the main model linking vendor to everything else is the warehouse model as suggested by @2ndmehmet . So everything is accessed based on the warehouse that are owned by a particular vendor. This is done to reduce the impact of the vendor model on the whole saleor db. This also makes the multivendor feature easily integrable in saleor.

  6. Created vendor app in backend #44

    • the vendor app was created
    • two models Vendor and VendorWarehouse. Vendor has a relation to user model and has shopname
    • VendorWarehouse relates vendor to a particular warehouse
  7. Created vendor, vendorwarehouse queries and mutations #43 and #44

    • the queries and mutations are created in reference to other apps in saleor and work fine
  8. Permission to manage vendor related activities

    • Manage_Vendor permission is created
  9. Filter queries for product based on vendor #42

    • using this link variantsstockswarehouse__vendor_warehouse__vendor_id
  10. Filter queries for orders based on vendor

    • using this link linesallocationsstockwarehousevendor_warehouse__vendor_id
    • it is working but requires another filter in subsequent nested lines in the order else all the orders are displayed

In frontend, vendor dashboard is implemented as per #46. Almost all the features in spree vendor dashboard have been also implement for the saleor vendor dashboard. Also, all integrations upto this point have been done in backend and frontend.

What has not been done?

Limitations

The approach to using warehouse as the only link from vendor to everything else (product, order,fullfillment,shipping,etc, ) might be limiting for the vendor. For one it makes long chains of relation as in 4 and 5 and in another it makes it difficult to restrict vendor to access only his products, orders,etc. This can be further discussed in community to anlayze for the optimality of the approach. Also other features related to vendor can also be discussed here.

kainio commented 2 years ago

First, I want to thank you for your effort in studying how you may implement a multi-vendor extension for Saleor.

I was doing the same thing for solidus (a fork of spree) but found too many obstacles because I didn't wanted to fork solidus so I didn't find a good extension point, but I did fork spree multi-vendor and made some changes to it, but it felt like making some ad-hoc changes and didn't feel like something that can resist by being extendable.

The approach to using warehouse as the only link from vendor to everything else (product, order,fullfillment,shipping,etc, ) might be limiting for the vendor. For one it makes long chains of relation as in 4 and 5 and in another it makes it difficult to restrict vendor to access only his products, orders,etc.

What attracted me to Saleor is its approach to implementing "channels", I think if you use channels as an extension point, it could be easier to integrate a marketplace because there's no limitation on the number of channels and the admin can create channels per vendor, so by making one channel by a vendor, channels can be a great extension point for a marketplace plugin.

https://github.com/saleor/saleor/issues/1251#issuecomment-1062607154

mehmetaydogduu commented 2 years ago

@kainio Very good capture. In addition to the warehouse connection, we can also connect a private channel for each seller. You can contribute to the project. Also we need to hire freelance developers for the project.

toppylawz commented 2 years ago

How can I test the frontend (modification of saleor-dashboard)? After the complete installation of this, I only have access to the welcome page. I cannot access any other pages for testing the work done so far.

leandrobortolotto commented 1 year ago

@kainio Very good capture. In addition to the warehouse connection, we can also connect a private channel for each seller. You can contribute to the project. Also, we need to hire freelance developers for the project.

Hey @mehmetaydogduu. I'm interested in contributing to developing the Multivendor feature for Saleor. You can send me an email to leandrobortolotto[at]gmail.com.

ICSGrade commented 1 year ago

@shovan777 Thank you for capturing this. Do we have anyone actively working on this? I can dedicate the next week (60-70 hours) to moving this forward in a real way if I have some support. Seems like this just needs one really big push to get this thing going.

shovan777 commented 1 year ago

@ICSGrade thank you for your interest in the project's development. Currently no one is actively working on it. We started this to create a plugin but found the plugins limiting . We had to create migrations to store vendor related data. So we opted to create a separate version of saleor with vendor support with as few changes to the core saleor as possible. What I was stuck with is about how we can restrict access of vendor to only their own products as product model doesn't have a direct link to the vendor. The only way feasible seems to add links to the product directly. This would require more tinkering to the database and require more changes. I didn't like the fact that we were creating a separate saleor version with many changes to the database and the core code. I don't have the resources to maintain such a project. If you have any ideas to solve the access problem we can work on it.

davidjels commented 1 year ago

Hi guys, my company intends to pick up efforts on making Saleor multi-vendor and we are interested to get your insight. Would love to collaborate with you guys, dedicate some devs and maybe sponsor efforts.

@shovan777 have you worked on it since your comment in March? @ICSGrade @mehmetaydogduu @leandrobortolotto are you guys still interested on working in this?

leandrobortolotto commented 1 year ago

Hey @davidjels

Not directly to this project.

We pursued our tests with Saleor, and our team decided to use Saleor as our online store.

I want to let you know that we're not using the Saleor-Multi-Vendor project as a basis.

As many of the Saleor team members mentioned, you can use Saleor as a marketplace just by changing the Frontend. That's where we were heading at. Now, I'm not sure what you need, exactly.

davidjels commented 1 year ago

@leandrobortolotto Thanks for the quick reply. We are essentially looking for the Shopify model (distinct online stores) but stored in the same database on one deployment. I guess you're referring to this comment but we do need vendors to have more control so I doubt tweaking the frontend would be sufficient.

From @shovan777 's comments we understand the plugin/add-on approach isn't going to be sufficient and we are considering probably forking Saleor core, adding a 'Store' model and FKing the relevant models to that. I know that's a vast oversimplification and there are a myriad of other considerations but that's the summary. We really are just at the outset of assessing approaches and feasibility though. It sounded like he already pursued that route so it would be interesting to hear any findings.

shovan777 commented 1 year ago

Hi guys, my company intends to pick up efforts on making Saleor multi-vendor and we are interested to get your insight. Would love to collaborate with you guys, dedicate some devs and maybe sponsor efforts.

@shovan777 have you worked on it since your comment in March? @ICSGrade @mehmetaydogduu @leandrobortolotto are you guys still interested on working in this?

@davidjels I have not worked on it since. My findings are mostly summarised in #40. The crux of the issue for us was there were too many changes in the saleor's model than we expected initially to accommodate vendor feature. We simply didn't have the resources to develop and maintain a separate saleor fork with vendor feature.

demoh2019 commented 11 months ago

@leandrobortolotto Thanks for the quick reply. We are essentially looking for the Shopify model (distinct online stores) but stored in the same database on one deployment. I guess you're referring to this comment but we do need vendors to have more control so I doubt tweaking the frontend would be sufficient.

From @shovan777 's comments we understand the plugin/add-on approach isn't going to be sufficient and we are considering probably forking Saleor core, adding a 'Store' model and FKing the relevant models to that. I know that's a vast oversimplification and there are a myriad of other considerations but that's the summary. We really are just at the outset of assessing approaches and feasibility though. It sounded like he already pursued that route so it would be interesting to hear any findings.

Our company is also looking to open a marketplace. If you need help, let me know.