Don't show discounts on entity types that have no available discounts
Merged
requested to merge larssg/cividiscount:Don't-show-discount-when-not-used-for-that-entity into master
In order to reduce the clutter on the backend:
- Discount code fields are no longer shown on New Contribution (standalone mode), as discount codes did nothing here anyways.
- For memberships and events, we first check if there are any valid discount codes for that entity type, and only then add the discount code field if there are any. So if you only use CiviDiscount for events, it won't show on memberships and vice versa. Or if you have no valid codes at the moment, nothing will be shown.
In the future, I may look into some AJAX to show/hide the field based on event or membership type selected (though it's a little more involved than it looks because of the filters on event type), and move the field down the form with the payment details, but this is a first step to making it a little less obtrusive.
Merge request reports
Activity
Filter activity
@larssg could you and @alicefrumin trade review for !286 so we can get both merged?
mentioned in merge request !286
mentioned in commit f664f759
Thanks @alicefrumin
Please register or sign in to reply