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) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Problem with CiviContribute when there are options with same amount
Pages: [1]

Author Topic: Problem with CiviContribute when there are options with same amount  (Read 996 times)

genkml

  • Guest
Problem with CiviContribute when there are options with same amount
September 03, 2009, 12:17:27 am
I'm using CiviContribute to receive various sponsorship contribution. Here's the scenario of the sponsorship options we used, as setup in Contribution Amounts:
* Sponsor activity A cost $10
* Sponsor activity B cost $10
* Sponsor activity C cost $10
* Sponsor activity D cost $20
* Sponsor activity E cost $20

Because it is important for us to know which activity is sponsored, we set it up as above.

Here's the problem:
If somebody choose to sponsor activity B or C, when they go to the next page (=confirmation page), it will show as the activity A. Choosing activity A is fine. Similarly, if the choice is activity E, in the confirmation page it will show as activity D has been chosen.

It looks to me that CiviContribute expect each contribution label to have different amount. In the above scenario, if I vary the amount slightly, then everything works. This is the work around I use at the moment:
* Sponsor activity A cost $10.01
* Sponsor activity B cost $10.02
* Sponsor activity C cost $10.03
* Sponsor activity D cost $20.01
* Sponsor activity E cost $20.02

Any comments or advice how to better implement the above. Is the above a bug, or an expected behaviour?

Thanks

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Problem with CiviContribute when there are options with same amount
September 03, 2009, 07:11:19 am

this is expected behavior :) the code assumed that the amounts will be different and hence we use tha amount to figure out which option was selected

You could give them a choice of amount $10 or $20, and then in a custom field ask them to pick which activity they would like to sponsor. Alternatively you can give each sponsoring activity a different amount (as u've discovered)

the fix for this is non trivial, IMO

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

genkml

  • Guest
Re: Problem with CiviContribute when there are options with same amount
September 04, 2009, 07:21:15 pm
Thanks Lobo for the explanation.
I'm sure your suggestion to have only two amounts ($10, and $20), then use custom data to create radio button for user to select which activity they would like to sponsor, should work. The only drawback I can think of, there's no link between the amount and custom code options.

In other words and using the above example, someone may select $10, but then select Activity E for the radio button, which shouldn't be allowed. I can't think of a way to "force" user to select from Activity A, B, or C only, if they decide the $10 sponsorship. Is this correct?

Thanks again

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Problem with CiviContribute when there are options with same amount
September 04, 2009, 09:09:57 pm
Hey Lobo = am i getting my wires crossed? I thought the above had been fixed - http://issues.civicrm.org/jira/browse/CRM-2983
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Problem with CiviContribute when there are options with same amount
September 05, 2009, 08:02:20 am

Peter: that was for event price sets. So a price set item can have the same cost as another price set item

genkmi: the should be relatively easy if you are good with javascript. If someone chooses $10, then you can hide the radio buttons D and E. Customize the contribution page template and add the javascript there.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Problem with CiviContribute when there are options with same amount

This forum was archived on 2017-11-26.