I'm trying to give people an option to add donations to special projects when they register for a particular event. We could just point folks to the contributions pages, but it would be more effective/convenient to just roll the donations into the event registration form.
Any advice on a strategy to accomplish this?
What I've tried so far:
- A developer friend suggested adding custom profile fields to the Register.tpl template and then saving the donation amounts to the custom fields using an ajax call. I've got that working.
- I'm not sure how to add my custom donation field values to the event amounts, which would be needed in order to actually charge people for their donations during the event confirmation and payment pages. (I've tried using the postProcess and buildForm hooks, but don't see how/where to change the "amounts" values.)
(CiviCRM 4.1.6; Drupal 6)