Multi vendor

639 views
Skip to first unread message

Atul Jain

unread,
Nov 9, 2016, 4:12:02 AM11/9/16
to django-oscar
Hi All,

Is there anyone who built up django-oscar for multi vendor ?

cmmwa...@gmail.com

unread,
Dec 21, 2016, 4:16:32 PM12/21/16
to django-oscar
I am actually working on that right now. I think it is possible but to start off you I will do most of the stuff manually. The partnership program becomes the vendor and all you have to do is create a form that the vendor can fill out and generate the other information automatically before saving. So multiple vendors become multiple partners. Now this is just theoretical since i haven't tested it( and checked the errors it may have) but I think it could work.

Another method is having an extra field in the registration portion that is a boolean field asking if the user is a vendor. If yes it fills out the partnership program file automatically as the user registers more info.

Suroor Hussain

unread,
Dec 26, 2016, 7:37:08 AM12/26/16
to django...@googlegroups.com
Hi
I'm also trying to do the same. I'm using oscar 1.2.
Actually I'm modifying an existing project to make it multi vendor. Any ideas?
This link seems to have been removed from the docs for 1.2

On Thu, Dec 22, 2016 at 2:46 AM, <cmmwa...@gmail.com> wrote:
I am actually working on that right now. I think it is possible but to start off you I will do most of the stuff manually. The partnership program becomes the vendor and all you have to do is create a form that the vendor can fill out and generate the other information automatically before saving. So multiple vendors become multiple partners. Now this is just theoretical since i haven't tested it( and checked the errors it may have) but I think it could work.

Another method is having an extra field in the registration portion that is a boolean field asking if the user is a vendor. If yes it fills out the partnership program file automatically as the user registers more info.

--
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/django-oscar.
To view this discussion on the web, visit https://groups.google.com/d/msgid/django-oscar/98e1a92e-f5ab-470f-8473-9f645de09596%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

cmmwa...@gmail.com

unread,
Dec 27, 2016, 12:07:27 PM12/27/16
to django-oscar


I wonder why.. It seems i was on the right thinking about the user and partnership program so it seems that it is actually do able. I still think it would be better if there was a check box that asked if a user wanted to be a vendor at anytime during sign up since that would give you a different set of forms especially since the partner model has an address portion to be filled out.

Suroor Hussain

unread,
Dec 27, 2016, 12:16:53 PM12/27/16
to django...@googlegroups.com
That looks like a good idea. But I'm still confused about what to do with the stock record and dashboard. Going to try some things out in the coming days.

On Tue, Dec 27, 2016 at 10:37 PM, <cmmwa...@gmail.com> wrote:


I wonder why.. It seems i was on the right thinking about the user and partnership program so it seems that it is actually do able. I still think it would be better if there was a check box that asked if a user wanted to be a vendor at anytime during sign up since that would give you a different set of forms especially since the partner model has an address portion to be filled out.

--
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/django-oscar.

For more options, visit https://groups.google.com/d/optout.
Message has been deleted

cmmwa...@gmail.com

unread,
Jan 4, 2017, 9:36:57 PM1/4/17
to django-oscar
Dude so i was really curious about what you said about the dashboard and i started reading the source code more thoroughly and i came across this gem

perms.partner.dashboard_access #templates/partials/nav_accounts.html

so it made me think whether a user had dashboard access and after reading the codebase(dashboard) i found out that they do.

https://github.com/django-oscar/django-oscar/blob/master/src/oscar/apps/dashboard/partners/forms.py (PartnerCreationForm)

So basically Oscar has handled part of the multivendor system and if you look through it, the limited access is pretty nice. So I figured the best way is to create a multi vendor system would be
1) let a user sign up.
2) Once signed up they would get a link (become a partner) and they can submit a form for approval. If I approve it, then i would add them. I will figure out how to automate the process later on if i need to.
3) they can post up their products and sell.

Thats just the big picture portion and of course it may be a little complicated but it's a starting point.

Suroor Hussain

unread,
Jan 5, 2017, 2:52:47 AM1/5/17
to django...@googlegroups.com
yup. Thanks for digging this up. I think i'll have to read more of the source code to figure out the details.
Thanks.

--
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/django-oscar.

For more options, visit https://groups.google.com/d/optout.

Suroor Hussain

unread,
Jan 7, 2017, 7:58:17 AM1/7/17
to django...@googlegroups.com
Thank you again.
I tried something from what you said in your last mail and got things working.
Here is a list of things that I did for anyone who is searching for this.

The work flow
- Let a user sign up normally
- give a button or link which takes them to a page with a form
- submit the form successfully and you will be taken to a limited dashboard that shows only your products

What I did
- Added a 'Become a seller' link to the user's profile page which takes them to a form.(I used oscar.apps.dashboard.partners.PartnerAddressForm' because I wanted the user to provide more information for creating a partner object later on.
- Add the link's url to the urls.py
- Create a view to handle GET ing and POST ing to this url
- The view returns my form when performing a GET and does all the things to make the user a seller on POST ing
   * First give the user limited access to the dashboard
     dashboard_perm = Permission.objects.get(
            codename='dashboard_access', content_type__app_label='partner')
        user.user_permissions.add(dashboard_perm)
   * Then create a partner instance specifically for this user using info from the form. I also created an instance of PartnerAddress.
   * Associate the user with the partner
    partner.users.add(user)
   *  I used the manytomany field already available in the Partner model because I was modifying an existing project and did not want to fumble with their models, but you may choose to replace this field with a onetoone field.
   * Finally redirect the user to their new dashboard.
- Provide means for the user to access the dashboard through their profile.(Navbar, button, link...)


This is simply a description of what I did and may not be the best way to do this but as cmmwa...@gmail.com said, this could be used as a starting point. Happy coding! and thanks again.

cmmwa...@gmail.com

unread,
Feb 14, 2017, 11:19:18 PM2/14/17
to django-oscar


Hi Suroor,

Since we worked the multivendor problem i was wondering, how did you solve the payment problem. More specifically how is cash transferred from your system to vendors using your system and how do they keep track of the cash. I am completely stumped at that problem right now. Any help would be greatly appreciated.

Cris

Suroor Hussain

unread,
Feb 15, 2017, 1:54:07 AM2/15/17
to django...@googlegroups.com
Hi Cris,
As I said, I was modifying a client's project, and they wanted the payment system to be 'as is', and they would take care of it themselves. So I haven't looked into it.

--
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/django-oscar.

For more options, visit https://groups.google.com/d/optout.

manel....@gmail.com

unread,
Mar 27, 2019, 4:10:40 PM3/27/19
to django-oscar
Hello ! I am a beginner in django and i want to do the same thing that you do it here but i still don't know how to do it in code ! Can you help me more please ! I really need it !
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages