Requesting the ability to have an event's line items automatically apply a discount based on a preset quantity.

The use-case I see is having multiple sessions for an event, and each session having multiple classes. Using a Price Set for each session, this would allow a member to register for multiple classes during the event. If we wanted to price the event at $10/class, but with a discount enabled for registering for 3 classes, like 3 for $25.

This can be achieved now by adding the discount field and putting a specific code in, which would discount the last line item. It would be nice to have a way to automatically check for this and apply the discount code if the requirements are satisfied.

Comments

dharmatech’s picture

dnovotny,

Great idea. If you're going to generate a patch for this, it seems like you'll need to change a few things.

  • The schema will need to change slightly to indicate a "grouped" discount on the price set.
  • The discount admin screen will need a way to "group" price sets, so maybe just a checkbox with something like "when checked, all price set line items are required to be eligible for the discount."
  • In civievent_discount_civicrm_buildAmount() you'll need to add the logic of calculating the discount.
  • In hook_landmine(), I mean, civievent_discount_civicrm_postProcess() you'll need to add logic and call _increment_counter() and _set_tracking().

Take a stab at it and if you get stuck we can try to work through it together.

dharmatech’s picture

Status: Active » Postponed

@dnovotny I'm moving this to postponed for now. If you want to work on this together or need help with it, let me know.