-
-
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
Add documentation that summarizes Solidus's built-in promotion calculators #2524
Add documentation that summarizes Solidus's built-in promotion calculators #2524
Conversation
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.
Looks pretty good overall. Just a couple of small changes.
### Flexi rate | ||
|
||
The [`Spree::Calculator::FlexiRate` calculator][flexi-rate] provides a flexible | ||
rate depending on the items on an order. (Or, a subset of specific line items on |
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.
The flexible rate needs more explanation here.
|
||
- `base_percent`: The base discount for any order where the promotion applies. | ||
- `tiers`: A hash where the key is the minimum order total for the tier and the | ||
value is the tier discount: `{ tier=>discount_percentage }`. |
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.
It's difficult to infer what this needs to be based upon the table above.
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.
Mostly agree with Gregor on his notes and left some other ones, great job!
# Promotion calculators | ||
|
||
Promotion calculators are similar to [shipping | ||
calculators][shipping-calculators]: the calculate against your preferred |
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.
the calculate
-> they calculate
?
### Percent on line item | ||
|
||
The [`Spree::Calculator::PercentOnLineItem` calculator][percent-on-line-item] | ||
provide a percentage-based discount for each applicable line item in an order. |
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.
provide
-> provides
|
||
The [`Spree::Calculator::PercentOnLineItem` calculator][percent-on-line-item] | ||
provide a percentage-based discount for each applicable line item in an order. | ||
In the `solidus_backend` interface, this calculator is labeled "Percent Per |
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.
Do you think we should change the label in the admin UI?
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.
I think that "Percent Per Item" makes sense in the admin UI. I think I just wanted to note this in case someone was looking for "Percent on Line Item" in the admin and weren't finding it.
c857231
to
43f1af4
Compare
43f1af4
to
b19be58
Compare
Thanks to gmacdougall and kennyadsl for their reviews.
This pull request extends my previous pull request for calculators documentation (#2511).
This is part a larger project to improve Solidus's documentation. See this gist with the high-level table of contents. Where and how this documentation will exist is still up for discussion.