Add coupons to events with a module

Publié
2010-12-16 12:20
Written by
dharmatech - member of the CiviCRM community - view blog guidelines

Based on Deepak's excellent blog post about adding discount codes, we decided to take it one step further and write a module. The CiviEvent Discount module has an admin interface to manage discount codes and the ability to link them to one or more events. Combined with the recent ability to access price sets from hook_civicrm_buildAmount the module also supports adding discount codes to events with price sets.

 

We just added the project to d.o. this morning, so the dev release may not show up until tomorrow. In addition, this was developed mostly as a prototype for a client we're currently working with so we haven't flushed out all the requirements (or bugs) yet.

 

Filed under

Comments

Looking forward to taking it for a spin. Maybe post an update here once the downloads are available!

Or at least something similar. We have the requirements that some of the Price Set Fields are discounts for the total price but not only this ...the discount is calculated only on the fields you define (exclude the field that should be ignored) for that we created a new type of price Field where you can enter a % value (for example -20%) ... To exclude some fields you can exclude fields by adding the id (-20%, 2,10).

how can you use this:
with that you can give a discount for example for a event ticket, but exclude the optional fee for the dinner in the calculation discount.
In other words you are very flexible with the fee calculation for your event.

We also created a second field type called coupon... You can imagine what is possible with that..
The next step is to make a joomla component where you can add, edit and delete and track coupons...

This whole thing will run in 3.3.0
We keep you posted about our progress..we also love to see this options in the core :-)
Best regards
Raphael , artd webdesign

Dave,

 

We've been actively working on the module for our client. The latest -dev release on d.o also includes support for the following:

 

  • Apply discount codes to membership
  • Apply discount codes to individual items in a price set rather than the entire price set
  • Support for monetary or percentage based discounts

 

Our client would also like the ability to automatically apply the discount to an event if someone is already a member, so we'll be adding that as well.

Great job! Nice to see somebody working in the same lines.