CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Suggested Approach to Reduce Price Field Maddness
Pages: [1]

Author Topic: Suggested Approach to Reduce Price Field Maddness  (Read 354 times)

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Suggested Approach to Reduce Price Field Maddness
January 07, 2015, 12:38:55 pm
I'm supporting a site where the event coordinator often adds a processing fee and an option to make an additional donation.  For these scenarios, she is forced to create a unique price field for each event fee and now has 50+ price fields to manage.

The organization has been very successful in offsetting costs and increasing fees using this approach. A custom field could indicate if there is an "Additional Donation" and/or "$2 surcharge" field.  I have seen some approaches using a patch from several years ago, but wonder if someone could suggest on a more elegant approach using a hook or API call.
S.

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: Suggested Approach to Reduce Price Field Maddness
January 08, 2015, 12:44:31 am
My first thoughts when you are developing something is to split the two in two individual contributions. One is the actual event fee contributions another is the actual donation. That way your reporting becomes probably easier too. But it requires some development
Developer at Edeveloper / CiviCoop

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Suggested Approach to Reduce Price Field Maddness
January 08, 2015, 06:53:36 am
 Yes.  I agree.  I looked at the price set api and could see a way to add 2 fields.  The price set api is a bit tricky though. Ideally they would use the regular price option and no price set. I have not used a hook before but wonder if that might be easier. Tgoughts?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Suggested Approach to Reduce Price Field Maddness

This forum was archived on 2017-11-26.