I have seen references to CiviDiscount on contribution pages for memberships. Can it be used for a fundraising dinner? Note - I often struggle between creating an event or contribution page for fundraising dinners - both have tradeoffs

  • What is the downside of an Event in this scenario?
    – petednz - fuzion
    Apr 1 '16 at 2:45

Here is a proof-of-concept extension that shows how to override bits of CiviDiscount to make it possible. It might be better to fix this in CiviDiscount itself, but meanwhile it's a good way to test and better define the requirements.


This is copy-pasted code from a project. I tried to package it as an extension so that it can be re-usable, but I have not tested it at all. If you find it useful, please contribute to it.

  • 1
    I've used this successfully out of the box, and another CiviCRM vendor submitted patches, so folks can consider this extension tested now. Oct 14 at 19:20

You can use Discount for event registrations too, assuming you mean the fundraising dinner is an event sign up?

  • No, the point is that it is a contribution page. not an event. Nov 2 '15 at 18:49
  • 2
    Ok, so I'm not sure thats the desired behaviour of CiviDiscount, Contribution pages without Membership are in effect donation pages so giving a discount on a donation doesn't seem to make sense. You could simply point supporters to a different donation page which implied the discount or something along those lines with a module. Nov 3 '15 at 8:48
  • 1
    I've had to work around this limitation at times, since I sometimes have a plain contribution page to buy a book or a t-shirt, with a member/code discount. In one case I duplicated/adapted the buildAmount function of cividiscount, and in one case I had to override the DiscountCalculator() because I didn't want to have to configure every single priceset-item.
    – bgm
    Aug 22 '17 at 13:11
  • @bgm can you share how you modified buildAmount function for applying discounts to a plain contribution page? I see it checks for page type but it gets confusing from there.
    – schatz
    Aug 1 '19 at 7:34
  • @schatz OK, posted below as an answer.
    – bgm
    Aug 2 '19 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.