-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Minimum Quantity promotion rule #5452
Minimum Quantity promotion rule #5452
Conversation
I'm not sure why this padding was ever added, but it made the actions not line up next to the rules which was silly.
Original PR: solidusio/solidus#5452 This new rule allows for an easy way of providing "bulk" discounts through the promotion system. It will prevent a promotion from being applied until it meets a quantity threshold. The rule will also account for other rules that limit the applicable line items. (e.g.: Taxons, options values, etc.) Co-authored-by: Benjamin Wil <[email protected]> Co-authored-by: Adam Mueller <[email protected]>
@adammathys thanks. There seems to be related spec failures and the i18n task also complains. Mind to take another look? |
220459a
to
a0d153f
Compare
@tvdeyen Oops! 🤦🏻♂️ Was still using some custom factories, swapped in the default ones so it should be good to go now. |
Codecov Report
@@ Coverage Diff @@
## main #5452 +/- ##
==========================================
+ Coverage 88.91% 88.92% +0.01%
==========================================
Files 614 615 +1
Lines 14830 14844 +14
==========================================
+ Hits 13186 13200 +14
Misses 1644 1644
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very valuable!
Small nit
This new rule allows for an easy way of providing "bulk" discounts through the promotion system. It will prevent a promotion from being applied until it meets a quantity threshold. The rule will also account for other rules that limit the applicable line items. (e.g.: Taxons, options values, etc.) Co-authored-by: Benjamin Wil <[email protected]>
a0d153f
to
cb4692e
Compare
Original PR: solidusio/solidus#5452 This new rule allows for an easy way of providing "bulk" discounts through the promotion system. It will prevent a promotion from being applied until it meets a quantity threshold. The rule will also account for other rules that limit the applicable line items. (e.g.: Taxons, options values, etc.) Co-authored-by: Benjamin Wil <[email protected]> Co-authored-by: Adam Mueller <[email protected]>
Original PR: solidusio#5452 This new rule allows for an easy way of providing "bulk" discounts through the promotion system. It will prevent a promotion from being applied until it meets a quantity threshold. The rule will also account for other rules that limit the applicable line items. (e.g.: Taxons, options values, etc.) Co-authored-by: Benjamin Wil <[email protected]> Co-authored-by: Adam Mueller <[email protected]>
Original PR: solidusio/solidus#5452 This new rule allows for an easy way of providing "bulk" discounts through the promotion system. It will prevent a promotion from being applied until it meets a quantity threshold. The rule will also account for other rules that limit the applicable line items. (e.g.: Taxons, options values, etc.) Co-authored-by: Benjamin Wil <[email protected]> Co-authored-by: Adam Mueller <[email protected]>
Original PR: solidusio#5452 This new rule allows for an easy way of providing "bulk" discounts through the promotion system. It will prevent a promotion from being applied until it meets a quantity threshold. The rule will also account for other rules that limit the applicable line items. (e.g.: Taxons, options values, etc.) Co-authored-by: Benjamin Wil <[email protected]> Co-authored-by: Adam Mueller <[email protected]>
Original PR: solidusio#5452 This new rule allows for an easy way of providing "bulk" discounts through the promotion system. It will prevent a promotion from being applied until it meets a quantity threshold. The rule will also account for other rules that limit the applicable line items. (e.g.: Taxons, options values, etc.) Co-authored-by: Benjamin Wil <[email protected]> Co-authored-by: Adam Mueller <[email protected]>
Original PR: solidusio#5452 This new rule allows for an easy way of providing "bulk" discounts through the promotion system. It will prevent a promotion from being applied until it meets a quantity threshold. The rule will also account for other rules that limit the applicable line items. (e.g.: Taxons, options values, etc.) Co-authored-by: Benjamin Wil <[email protected]> Co-authored-by: Adam Mueller <[email protected]>
Original PR: solidusio#5452 This new rule allows for an easy way of providing "bulk" discounts through the promotion system. It will prevent a promotion from being applied until it meets a quantity threshold. The rule will also account for other rules that limit the applicable line items. (e.g.: Taxons, options values, etc.) Co-authored-by: Benjamin Wil <[email protected]> Co-authored-by: Adam Mueller <[email protected]>
Original PR: solidusio#5452 This new rule allows for an easy way of providing "bulk" discounts through the promotion system. It will prevent a promotion from being applied until it meets a quantity threshold. The rule will also account for other rules that limit the applicable line items. (e.g.: Taxons, options values, etc.) Co-authored-by: Benjamin Wil <[email protected]> Co-authored-by: Adam Mueller <[email protected]>
Summary
Introduces a new promotion rule for minimum quantity. This rule will prevent a promotion from applying until a specified quantity threshold is met. It also hooks into
PromotionRule#actionable?
on other rules to ensure the quantity considered is only for relevant line items.This promotion rule is helpful for creating "bulk discount" type promotions where you want to offer a discount when a customer orders at least a certain amount of items. Such a promotion is not quite possible with the current rules and actions. (You can sort of come close with the
CreateQuantityAdjustments
action, but that promotion won't stack properly.)Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: