Skip to content

Draft: [WIP] Resolution for #214, !215, #167

elilisseck requested to merge elilisseck/cividiscount:issues/214/167 into master

This branch is for development towards resolving issues #214 and #167 (closed) that have been inactive. There is a long conversation on each issue and on MR !215 (closed) but what we are currently experiencing boils down to:

CiviDiscount gives admins the ability to configure a discount for just a subset of price options on a price set with no warning on current limitations of this feature.

There are several issues that arise from this feature around users now expecting multiple automated discounts to apply to an event / membership form with a price set that can be described as:

  • Multiple automated discounts do not apply when they're configured as one-applicable-per-price-option. This used to work before #167 (closed) and I would categorize it as a regression and aim to fix it in this branch (!215 (closed) fixes this in my experience) Ordering issues.
  • Multiple discounts do not apply to the same price option. Cividiscount appears to choose the automated discount with the highest ID number but it isn't clear to admins what is happening. @agh1 noted a nice idea in #214 of adding weights to discount code configurations with some help text, and then choosing on weight, or this could be as simple as help-text as a first step. I would be interested in thoughts on that.
  • Multiple automated discounts do not stack on a single price option if they're all applicable. I'm not sure if folks are interested in this but it got confused with the issues above at some point. This never worked and wasn't supposed to AFAIK. I would categorize it as a feature request that I don't aim to fix on this branch.

My proposal to move forward is:

  • Get the commit from !215 (closed) in (cherry-picked here, basically reverts the fix for #167 (closed))
  • Confirm whether #167 (closed) is now an issue again (Issue is 4-5 years old)
  • Find an alternative solution for #167 (closed) if the issue persists, without resorting to this problematic break

I'm not sure if these usernames still exist in gitlab but tagging some folks from the old issues who may have input: @mtnpavlas @h-c-c @kewljuice @freeform-sg

Edited by elilisseck

Merge request reports