Comments

gcb created an issue. See original summary.

gcb’s picture

StatusFileSize
new6.31 KB

An initial version with a single suggestion "style".

gcb’s picture

StatusFileSize
new6.83 KB

Improved version: cleaned up code, lower bound on donation amounts to match.

gcb’s picture

StatusFileSize
new6.42 KB

Cleaned up version.

gcb’s picture

StatusFileSize
new7.21 KB

Updated patch that fixes the lower-bound behavior on the query, and makes it configurable.

Note that this patch also restructures the config, so if you were using the old version and apply this version you need to re-configure each donation page that uses the settings.

gcb’s picture

StatusFileSize
new7.23 KB

Minor tweak to fix form UX logic.

wxactly’s picture

Makes historical donation amounts array more flexible, and adds a hook for site builders to include other amounts for consideration by the donation suggestion algorithm.

wxactly’s picture

StatusFileSize
new7.68 KB

Added some safety checks for historical donation amounts array, and the actual contact object - in practice either of these could be empty.

josephr5000@yahoo.com’s picture

StatusFileSize
new8.49 KB

Changes:

  • Adds an "Selection sort order" option to donation settings, to ensure that suggested amounts are sorted in a particular order. Default is unsorted, ie: in whatever order the suggestion method produces. This is useful if, for example, a client believes that sorting suggestions in *DECREASING* order might yield higher donations.
  • Removes applicability of suggestions to RECURRING donations, so they are only offered for one-off donations. The recurring case had a small but easily noticeable bug, and the fact it hasn't been noticed suggests there isn't demand for suggestions on recurrings. It seems a poor idea to leave code around that isn't being used and tested. This could be revisited if there is demand.
wxactly’s picture

StatusFileSize
new8.36 KB

Refactored function parameters, and added alter hook for suggestion config.

wxactly’s picture

StatusFileSize
new8.37 KB

Fix operator for minimum check from > to >=