Oscar ships with broad support for vouchers, which are handled by this app.
- class oscar.apps.voucher.abstract_models.AbstractVoucher(*args, **kwargs)¶
A voucher. This is simply a link to a collection of offers.
Note that there are three possible “usage” models: (a) Single use (b) Multi-use (c) Once per customer
Test whether this voucher is currently active.
Test whether this voucher is available to the passed user.
Returns a tuple of a boolean for whether it is successful, and a availability message.
Record a discount that this offer has given
- record_usage(order, user)¶
Records a usage of this voucher in an order.
- class oscar.apps.voucher.abstract_models.AbstractVoucherApplication(*args, **kwargs)¶
For tracking how often a voucher has been used