Oscar 0.5 release notes¶
Welcome to Oscar 0.5!
These release notes cover the new features as well as upgrading advice.
The main aim of this release was to add functionality to offers but scope expanded over time to include many fixes and improvements. Whilst there aren’t that many new features from a customer perspective, a great deal of work has gone into reworking Oscar’s structure to be more extensible.
Thanks to all the contributors who helped with this release.
What’s new in Oscar 0.5?¶
Most of the new features in 0.5 are around offers.
It is now possible to create custom ranges, conditions and benefits that can be used to create flexible offers. These ranges are created as Python classes conforming to a set interface which are registered at compile time to make them available in the dashboard.
Offer benefits can now apply to the shipping charge for an order. Previously, all benefits were applied against the basket lines. There are three shipping benefits ready to use:
Fixed discount off shipping (e.g., get £5 off your shipping costs)
Percentage discount off shipping (e.g., get 25% off your shipping costs)
Fixed price shipping (e.g., your shipping charge will be £5)
Offer benefits can now be deferred. That is, they don’t affect either the basket lines nor the shipping charge. This is useful for creating benefits such as awarding loyalty points.
Several new ways of restricting an offer’s availability have been introduced:
An offer’s lifetime can now be controlled to the second rather to the day (i.e., the relevant model fields used
date). This makes it possibly to run offers for a small amount of time (e.g., for a single lunchtime).
An offer can be restricted to a max number of applications per basket/order. For example, an offer can configured so that it can only be used once in a single order.
An offer can be restricted to a max number of applications per user.
An offer can be restricted to a max number of global applications.
An offer can be restricted to give a maximum total discount. After this amount of discount has been awarded, the offer becomes unavailable.
Offers can now be suspended and reinstated.
The offers dashboard has been rewritten.
There is now an offers homepage that lists all active offers.
New dashboard skin¶
The design of the dashboard has been reworked, offering a better user experience throughout the dashboard. This work is still ongoing, further improvements in how the dashboard pages are laid out will appear in 0.6.
Oscar now uses Transifex to manage its translation files. Since 0.4, a considerable number of new languages are now supported (although many have partial coverage).
Oscar’s default templates also now support a simple language picker.
New settings have been introduced to control how slugs are generated. By default, the Unidecode package is used to gracefully handle non-ASCII chars in slugs.
There are several noteworthy smaller improvements
The basket page now updates using AJAX rather than page reloads.
Oscar’s documentation has been reorganised and improved. This is part of an ongoing effort to improve it. Watch this space.
Oscar’s template now use django-compressor to compress CSS and JS assets.
Products can now be deleted using the catalogue dashboard.
Warnings emails are sent to customers when their password or email address is changed.
Flash messages can now contain HTML.
Several improvements have been made to ease development of Oscar (and Oscar projects):
The sandbox can be configured to compile the LESS files directly. This is useful for developing Oscar’s CSS/LESS files.
A new management command
oscar_fork_staticshas been added to help with setting up static files for a new Oscar project.
Alternative templates can now be used for different product classes in product browsing views.
jQuery upgraded to 1.9.1
Bootstrap upgraded to 2.3.1
The test runner can now be run with tox.
Oscar ships with profiling tools. There is a decorator and middleware available in
oscar.profilingthat can be used to help profile Oscar sites.
Customers are notified if changes to their basket lead to new offers being applied (or if previously applied offers are no longer available).
Some testing utilities have been extracted into a new package, django-oscar-testsupport, so they can be used by Oscar extensions.
A Vagrant manifest is provided for testing Oscar against different database vendors.
Coverage data is now submitted to coveralls.io
This section describes changes in core Oscar that you need to be aware of if you are upgrading from 0.4. See the upgrading guidelines for further details on the steps you need to take.
There are new migrations in the following apps to be aware of.
postcodenullable on the
0009: Add a
ratingfield to the product model
0010: Populate the new
Note, if you are using a customised version of the catalogue app, then you
should create a similar data migration to
0010 in your own project.
Conditionmodel and make
0013: Add unique index on
0014: Empty migration after branch merge
Benefitmodel and make
0005: Populate the new
0006: Add unique index on
0007: Remove unique index from
namefield and make nullable
Note, if you are using a customised version of the partner app, then you
should create a similar data migration to
0005 in your own project.