tangentlabs/django-oscar — pull request #428 by codeinthehole (2012-12-18 11:30:28+00:00)
Title: Add AJAX support to basket

The basket formset can now be submitted via AJAX. The basket view has been adjusted to return a JSON payload for AJAX requests, where the main page HTML is a field of the payload.

![image](https://f.cloud.github.com/assets/80975/19208/3f227a96-4906-11e2-9a9b-7138dcea3749.png)

The flash messages are returned separately.

This work has involved several other refactorings including:

* Reworking the layout templates
* Updating the `checkout.js` file

Note that the saved basket formset does not use AJAX. This is because the current implementation submits the formset to a view which always redirects. This doesn't play well with AJAX where you want the response to re-render the page.