Transform Oscar into a marketplace

108 views
Skip to first unread message

looped forever

unread,
Oct 17, 2022, 4:17:00 AM10/17/22
to django-oscar
  Hello :
I'm looking to transform django-oscar into a marketplace. I came across this page in documentation : http://docs.oscarcommerce.com/en/latest/ref/apps/dashboard.html 
and couldn't find anything else on how to transform it into a marketplace like amazon etc.

Features typical of a marketplace (normally not necessarily) like:
  1. Seller should only see his orders in dashboard and allowed to select fulfilment partner(himself) or us(marketplace).
  2. Multiple sellers for the same product needs to be configured
  3. Payment settlement to Seller @16th and 30th day - Settlement through Oscar Dashboard
With regards to point 1 as described in the link :
I did the following for a partner to see only his orders in dashboard. I need help to figure whether this is correct.

dashboard/views.py
 def get_order_lines(self,user):
        partner_code= Partner.objects.get(AbstractPartner.code)
        partners = Partner._default_manager.filter(users=user)
        partner = Partner._default_manager.filter(users=user,partner_code=partner_code)

        # Get all products displayed in order lines by all partners accessed by staff
        if user.is_staff:
         return self.object.lines.all()

        # Get all products displayed in order lines by all partners accessed by a partner in dashboard
        if user.are_partners:
         return self.object(lines__partner__in=partners).lines.distinct()
       
        # Get partner product only displayed in order lines accessed by a partner in dashboard
        elif user.is_partner:
         return self.object(lines__partner__in=partner).lines.distinct()

i defined two fields is_partner and are_partners in customers/models.py specially for the above get_order_lines modification.

With regards to point 2 and 3 , are there any documentation on how to do it ? 

Thanks in advance !



Reply all
Reply to author
Forward
0 new messages