CiviDiscount doesn't work for events in 4.3
Created by: sdragnev
Not sure if this is a 4.3 issue or it's also broken in 4.4
Seems like the discount is completely dependent on the priceset ID of the event, however that priceset is not saved when creating a discount. The "priceset" field in the database is null yet the code only applies the discount if the price set ID is set.
See cividiscount.php:434:
if (CRM_Utils_Array::value($option['id'], $discount['pricesets'])) {
// apply discount
}
CiviDiscount either has to save the price set ID when creating the discount or that if statement has to change. Of course the former will only work for new discounts and will break any current ones so it's not much of a solution.
I'll take a look at it today and report back.