https://github.com/awesto/djangoshop-discounts
https://github.com/awesto/djangoshop-discounts
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/awesto/djangoshop-discounts
- Owner: awesto
- License: mit
- Created: 2016-10-12T21:55:43.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-19T14:39:17.000Z (about 9 years ago)
- Last Synced: 2024-12-29T15:45:21.775Z (11 months ago)
- Language: Python
- Size: 13.7 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Customer Rebates for django-SHOP
This integration only works for django-SHOP version 0.9 and above.
## Installation
In ``settings.py`` add ``'shop_discounts'`` to ``INSTALLED_APPS``.
Additionally add to
```
SHOP_CART_MODIFIERS = (
...
'shop_discounts.modifiers.CustomerRebateModifier',
...
)
```
The discount is computed using the *current* subtotal, then withdrawn from thereof.
Therefore the position of this rebate modifier is important. Add it after the ``DefaultCartModifier``,
but before your chosen tax modifier.
## Usage
In Django's admin backend, below section **Home › Shop › Customer Rebates**, add a Customer Rebate
object. The identifier of this rebate will be printed on the invoice in section extra cart rows,
so choose it carefully.
Then choose the rebate percentage and the customers or group of customers to whom this rebate shall
beeing applied.
### Note
> If more than one rebate applies for the purchasing customer, then that one with the highest
> percentage is selected. Rebates are not stacked!
## Internationalization
If in the project's settings ``USE_I18N = True``, then the rebate's "identifier" is configured
as a translatable field. This requires [django-parler](https://github.com/django-parler/django-parler)
as an additional dependency.