--
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 http://groups.google.com/group/django-oscar.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-oscar/74878f0d-dc68-467d-b88e-d8683b17264a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Thoughts? :)ThanksMarkus
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 http://groups.google.com/group/django-oscar.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-oscar/74878f0d-dc68-467d-b88e-d8683b17264a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 7 July 2014 17:26, Markus Bertheau <markus....@machtfit.de> wrote:
Hi,on the product detail and list pages we need to display the price of the product with all applicable offers applied. Currently the components that calculate the discounted price, ConditionalOffer, Applicator and Line/Basket are pretty tightly coupled. A quick way to do what we want to do is to add the product to the basket, re-apply offers, fetch the price and remove the product from the basket again. Of course that's horribly inefficient, given that adding a product to the basket hits the database. So we're looking for an alternative in the medium term.The general idea would be to decouple the above mentioned components. The Applicator would be given 1) a list of offers and 2) a list of product/stockrecords with quantity. It would deliver ApplicableOffers (the terminology is not final). It would do so without relying on Basket or Line functionality (e.g. currently the Line itself tracks whether it had a discount applied already). To replace the current offers calculation for the basket, a new component would 1) extract product/stockrecords with quantity from the basket, 2) extract a list of offers from various sources, 3) hand them to the Applicator and 4) apply the ApplicableOffers to the basket. On the list and detail pages 1) would be done and the current product would be added. 2) and 3) are the same and then instead of 4) just the new product's price would be extracted.That sounds like a good change, decoupling the basket and offers application process (which, as you say, are tightly coupled).
Seems like quite a strange requirement though. I guess it would make more sense for offers that led to a % off. For multibuy offers though, it wouldn't make sense as the effective prices depend on what else is used to meet the offer condition.
You received this message because you are subscribed to a topic in the Google Groups "django-oscar" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-oscar/nr5QFw5tPII/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-oscar...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-oscar.
To view this discussion on the web, visit https://groups.google.com/d/msgid/django-oscar/50b80158-3087-4291-a9b9-ce1e516e5f00%40googlegroups.com.