Skip to content
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

Enable 'Per User Limit' and 'total number of uses' on discount engine #1

Closed
lukeholder opened this issue Apr 24, 2015 · 1 comment
Closed

Comments

@lukeholder
Copy link
Member

Decide when a discount is considered used. And then decide how will we count these limits.

Ideas

  • To check "per user limit" we have no way but to be counting each time a user has used discount. It will be a new record "CustomerDiscountUse" with incremental field "uses"
  • to check "total use limit" we can add a field to the discount model
  • each time a discount is used there will be incrementation to total discount uses and to CustomerDiscountUse
  • if there is a per user limit, then require the user to enter an email on the order to retrieve the customer record.
  • Need to define what "discount used" means. Discount should be treated as used when an order is completed only. Otherwise there can be incomplete orders which will catch and block limited discounts.
  • Need a order complete event and increment discounts use counters on that event.
  • One more problem - is there a case when we need to decrement uses counter? I guess not? If some discount reached it's limit and a moderator wants to prolong the action he can just increment the discount use limits somehow?
  • After we get "discount.totalUses" counter and uses counters per each user we can easily check if discount is available or not just in DiscountAdjuster
@lukeholder
Copy link
Member Author

completed in cc4e63

@lukeholder lukeholder removed their assignment May 11, 2016
lukeholder pushed a commit that referenced this issue Mar 26, 2018
Remove Hidden Class Variants Container
brandonkelly pushed a commit that referenced this issue Oct 29, 2018
unlimitedStock => hasUnlimitedStock
andris-sevcenko pushed a commit that referenced this issue Feb 22, 2019
lukeholder pushed a commit that referenced this issue Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant