David Winterbottom
32dcca2971
Add ability to track the post-order action message
13 gadus atpakaļ
David Winterbottom
cde35cdf9d
Fix issue with shipping discount not being recorded correctly
13 gadus atpakaļ
David Winterbottom
7130f7c98c
OrderDiscount instance now created correctly for shipping offers
13 gadus atpakaļ
David Winterbottom
27b1980bdd
Alter the way shipping discounts are handled
They aren't treated specially any more. They become part of the
'applications' collection rather than being attached to the basket.
13 gadus atpakaļ
David Winterbottom
7a49678fd3
Add support for showing a custom message on basket page
13 gadus atpakaļ
David Winterbottom
f9c6c052a2
Rework offer benefits to return result object
This paves the way for custom benefits to return successful applications
that don't lead to a discount.
13 gadus atpakaļ
David Winterbottom
aa7f899c51
Move catalogue tests to integration folder...
...as they are all integration tests (they save stuff).
13 gadus atpakaļ
David Winterbottom
aab093deea
Convert non-ASCII char to ASCII for category slugs
This uses the unidecode package to convert non-ASCII words to ASCII
equivalents. We use a new slugify function to wrap this logic as we
will want to use it elsewhere.
See this StackOverflow thread for context:
http://stackoverflow.com/questions/702337/how-to-make-django-slugify-work-properly-with-unicode-strings/
Unidecode becomes a new dependency for Oscar.
https://pypi.python.org/pypi/Unidecode
Hat-tip to @avsazonov for suggesting this fix.
13 gadus atpakaļ
David Winterbottom
fc9999e70b
Rework subtree updating after move
New impl is considerably simpler and lets the save method update each
node's slug and full name.
13 gadus atpakaļ
David Winterbottom
5ba13b2330
Add test scaffolding around Category class
13 gadus atpakaļ
David Winterbottom
8e4d5edd95
Move category tests to integration folder
They use the DB so they are not really unit tests.
13 gadus atpakaļ
David Winterbottom
1573989b53
Add a status field to offers
This makes it more efficient to load offers now that we can't simply use
the date filters to exlucde unavailable offers.
The is_active field has been reworked to depend on the
get_max_applications method.
The save method of ConditionalOffer now auto-sets status.
Fixes #403
13 gadus atpakaļ
David Winterbottom
e5d78436e2
Split offer tests into unit/integration folders
This might be futile.
13 gadus atpakaļ
David Winterbottom
ae13037e48
Turns out there are empty strings being passed to the currency filter
So we add handling to the filter where we check the value can be
converted to a valid decimal. If not, return an empty string.
Fixes #316
13 gadus atpakaļ
David Winterbottom
0badc8849b
Add integration test for currency templatetag
Plus fix a bug when handling None.
13 gadus atpakaļ