django-oscar / django-oscar

Domain-driven e-commerce for Django

Home Page:http://oscarcommerce.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Best/proper way to install and use

ecumike opened this issue · comments

I'm trying to understand the best way to use and customize Oscar.
For example, I want to be able to show all partners who are selling a product and let the user choose which one (like a selectable multi-vendor marketplace like Amazon's "view buying options":

image

Should we be forking the repo and building from that? Or should we be installing with PIP into an empty project like the "Building your own shop" and extending. (I'm assuming almost anything can be customized/extended?)

Hi!
In Oscar, default Strategy is 'UseFirstStockRecord' (see oscar/apps/partner/strategy.py) which returns only the first StockRecord for a product.

To fulfill your example, you would have to add another Partner and create StockRecords for each Partner with different prices for your products.

I would then create a mixin UseCheapestStockRecord which selects the StockRecord with the least price and use this mixin in your Default Strategy instead of UseFirstStockRecord so that the cheapest price is always shown in the catalogue.

Finally, you would have to create a custom template tag to show the other Partner's StockRecords and a possibility to add the product from another Partner to your basket.