Issue: https://github.com/django-oscar/django-oscar/issues/3162
* Checking of `offer.benefit.max_affected_items` removed from the
`available` method of `LineOfferConsumer` class - available items should
not be limited by related benefit (it should be considered when applying
the offer).
* Improved `apply` method of `PercentageDiscountBenefit` - affected
items must include "quantities with discount applied".
* `is_satisfied` method of `CountCondition` updated to pass `offer`
instead of `None` to `line.quantity_without_offer_discount` - this
change is required to fix the initial issue.
* Updated `test_available_with_offer` test - initially this test was
added to check the lines that we removed from the `available` method of
`LineOfferConsumer` class (See fda27a183d/).
* Added tests to confirm that the initial issue is fixed.
Fix rendering of upsell messages for exclusive offers (#3548)
* Improve `available` method of `LineOfferConsumer` class
* Add `quantity_available_for_offer` method to `AbstractLine` class
* Improve conditions: "Get num matches" methods updated to use `quantity_available_for_offer`
method of `Line` model.
* Improve conditions: `get_upsell_message` methods updated to show upsell message only in
the cases where `delta` > 0.
* Ensure basket upsell messages are not `None`
When looking up a URL for a forked app, the previous mechanism fetched the top level AppConfig which allows every user.
The new mechanism creates a dict of dashboard URLs/configs and does a lookup to find a DashboardConfig.
This will also raise NoReverseMatch if the URL does not exist or is not a dashboard URL.
fix https://github.com/django-oscar/django-oscar/issues/3080
Retrieving product options now performs only 1 query. (#3037)
* Retrieving product options now performs only 1 query.
Also it returns all the product options combined. This makes more sense because
as the existing tests prove, there is already a way to retrieve the product_class
options and the product options separately.
* Implement basic abstract thumbnails generator backend
* Create `oscar_thumbnail` template tag in `image_tags`
* Add `easy_thumbnails` to `INSTALLED_APPS` in sandbox settings
* Modify `primary_image` method of `Product` model
* Override in templates Sorl's `thumbnail` tag with `oscar_thumbnail` tag
* Check that related module is installed during thumbnail class initialization
* Add params to `original` field of `ProductImageFactory`
* Add media related URLs to test settings
* Add unit tests for thumbnailer backend
* Create test helpers in `test/utils`
These helpers will be used in tests related to thumbnails
* Add tests to check `oscar_thumbnail` template tag
* Add test to check images/thumbnails deleted for deleted product
* Move `sorl-thumbnail` and `easy-thumbnails` to `extras_require`
With this change these packages can be installed as
* `pip install django-oscar[sorl-thumbnail]`
* `pip install django-oscar[easy-thumbnails]`
* Updated "Template tags" section in docs with info about `oscar_thumbnail`
* Describe `OSCAR_THUMBNAILER` setting in "Settings" section of the docs
* Add information about created thumbnail backend to the release notes