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

Discount Types #23

Open
drewroberts opened this issue Feb 13, 2021 · 2 comments
Open

Discount Types #23

drewroberts opened this issue Feb 13, 2021 · 2 comments
Assignees

Comments

@drewroberts
Copy link
Member

I've been thinking we need to add Discount Types that function similar to Voucher Types (TIPOFF/vouchers#23) for restrictions on how discounts can be applied during the checkout process.

@pdbreen
Copy link
Contributor

pdbreen commented Feb 17, 2021

For both vouchers and discounts, going to propose a somewhat minimal common base table (code plus a few other TBD fields) with a morph to the class that knows how to determine if the voucher/discount applies to either a cart item or an entire cart as well as how to apply it. This allows any future voucher or discount logic to be a combination of additional data fields and code logic that knows how to interpret and apply them.

@drewroberts
Copy link
Member Author

I like this approach. I look forward to seeing it in more detail. Thanks!

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

2 participants