-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic discounts -- f.e. to implement discounts for predefined groups of users #19
Comments
How about changing A default price for anonymous user, as well as a different price for specific users if necessary. |
Yes, I think that's probably the way to go. I'll probably have to solve this problem too in an upcoming shop project of ours. |
On second thought you're getting the order model already which as a FK to the user model. You're getting the current user instance by accessing |
Getting the instance from |
Unfortunately that's not easily possible currently. You could simulate this feature by creating an OrderItem yourself and passing it to the You still won't be able to display prices properly for more complicated discount rules. If you have discount rules which span several orderitem (for example by having these two items in the cart you get a 10% discount on each of them). A different thought: I'm working on a shop currently where the shop admin must be able to assign different (lower) prices for specific users. You can easily specify two price models: One for specific users (coming with a foreign key to the Does that help? |
Hum... I'm going to try writing My logic is that if we add an argument Maybe I'm just repeating what you had in mind already, in which case we'd be in agreement, which is good. :D |
Yes, I agree. You'll probably have to write code similar to this:
The reason is that you cannot control all invocations of |
... without them having to enter a discount code.
The text was updated successfully, but these errors were encountered: