In that case, I suggest that you make a customized Category hierarchy (AbstractCategory) and use a specialized ProductCategory (AbstractProductCategory) to associate specific business logic between particular Products and Categories.
On Thu, Oct 5, 2017 at 5:40 AM, moemen Abd ElKader <moemenol...@gmail.com> wrote: > Hello Ryan, > > Thank you for your response. > But what I understand is that parent/children relationship is for > variants. So, phones for example, variants would be the different colors > and memory size. > But what I have here is different product. > Beside that for example, chargers can be attached to multiple products > (phones), so relation should be many to many, shouldn't it? > > Sincerely, > Moemen > > > On Thursday, October 5, 2017 at 6:33:13 AM UTC+2, Ryan Harrigan wrote: >> >> I apologize. I was mistaken with the syntax of Selector. Use the code >> below and modify the necessary methods in the Structured class. >> Once again, if I am mistaken, please let me know >> >> >> >> class Selector(object): >> >> def strategy(self, request=None, user=None, **kwargs): >> """ >> Return an instanticated strategy instance >> """ >> return Structured(request) >> >> On Wed, Oct 4, 2017 at 5:31 PM, Ryan Harrigan < >> rhar...@findsomewinmore.com> wrote: >> >>> Hello Moemen, >>> >>> I am new to django-oscar as well. I think linked products can be >>> implemented using the 'parent' property in the AbstractProduct class. Every >>> product should have the 'parent' property because it is set >>> in AbstractProduct. http://django-oscar.readthedocs.io/en/ >>> releases-1.5/topics/modelling_your_catalogue.html >>> >>> Taxes are implemented in product.strategy.partner. You need to overload >>> the partner app, particularly the strategy.py file and the Selector class. >>> You may save some time using the Structured class like so: >>> >>> >>> >>> >>> >>> class Selector(Structured): >>> pass >>> >>> >>> >>> You then need to define how you want to implement taxes with >>> pricing_policy(). I think this should help you. >>> >>> >>> If anyone wants to correct me, please do so. >>> >>> Best, >>> >>> Ryan >>> Web Developer, Findsome & Winmore >>> https://findsomewinmore.com/our-team/ryan-harrigan/ >>> >>> On Wed, Oct 4, 2017 at 12:45 PM, moemen Abd ElKader <moeme...@gmail.com> >>> wrote: >>> >>>> Hello, >>>> >>>> I'm a new with django-oscar. And I was trying to implement a feature >>>> for a project I'm working on. I read documentation and explored the source >>>> code a little, but I'm still wondering if django-oscar have a shortcut to >>>> help me with that. >>>> >>>> I want to add link products to a main product, so user has the option >>>> to buy them as part of the main product. >>>> >>>> For example, Mobile phone can be attached to it's headphone, cover, >>>> charger, ... etc. User can select/deselect any of them, and he can >>>> of-course buy them independently. >>>> And is it possible to apply discount or use different taxes in case >>>> that user selected those products? >>>> >>>> >>>> Thank you for your help, >>>> Moemen >>>> >>>> -- >>>> 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...@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/aebeb1c7-8b85 >>>> -48c1-af31-1b1f0439b161%40googlegroups.com >>>> <https://groups.google.com/d/msgid/django-oscar/aebeb1c7-8b85-48c1-af31-1b1f0439b161%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >> -- > 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+unsubscr...@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/eb8310a8-ebed-40c8-9c76-14a065475706%40googlegroups.com > <https://groups.google.com/d/msgid/django-oscar/eb8310a8-ebed-40c8-9c76-14a065475706%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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+unsubscr...@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/CAG1d5P5QU_SZch9Xx9MiGe6LB9-nU9gsUs7Jjx-K9M44Fa6FcQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.