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

limit coupon use as one per profile #280

Open
smirolo opened this issue Oct 16, 2023 · 0 comments
Open

limit coupon use as one per profile #280

smirolo opened this issue Oct 16, 2023 · 0 comments

Comments

@smirolo
Copy link
Contributor

smirolo commented Oct 16, 2023

Right now, it is possible to limit a Coupon in time, plans it applies to and number of times it can be used. Nothing prevents a single profile to use the coupon repetitively, every period for example, until the Coupon is no longer valid.

We would like to restrict the use of a Coupon to "once per subscriber". Based on the code in Transaction.get_event it is possible that per-subscriber coupon use is stored in the Transaction table directly, as much as it is as text in Transaction.descr (see describe_buy_periods). It is not sure though the get_event idea works. Maybe will have to either use a regex on Transaction.descr or use an alternate implementation idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant