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) »
  • Specify Membership Quantity
Pages: [1]

Author Topic: Specify Membership Quantity  (Read 2577 times)

generalredneck

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.29-0ubuntu0.12.04.1
  • PHP version: 5.3.10-1ubuntu3.6 with Suhosin-Patch
Specify Membership Quantity
August 19, 2013, 08:10:46 am
I'm trying to make it where I can specify the quantity of relationships to apply an organizational membership to. However, I can't figure out how to do this with the core features of price sets. However, I know that doing what I want to do is possible because it is almost exactly what the Drupal Association has.  see: https://association.drupal.org/civicrm/contribute/transact?reset=1&id=73

I'm not so worried about the slider, I just want to be able to type in the number of memberships and calculated a price based on that for a single membership type... Any ideas?

generalredneck

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.29-0ubuntu0.12.04.1
  • PHP version: 5.3.10-1ubuntu3.6 with Suhosin-Patch
Re: Specify Membership Quantity
August 19, 2013, 12:53:56 pm
Ok this one was actually an easy one. what I ended up doing was creating a price set with 2 fields. One is a default selected membership radio button. I make it worth $0. Then I add a quantity text field with the unit price equal to the cost of the membership. This pretty much takes care of what I wanted.

Afterword I'm just going to have to set the Max_related on the membership that was created in a post process hook.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Specify Membership Quantity
August 19, 2013, 01:16:21 pm
It would be amazing if it were possible to make 'max_related' directly tied to the price set line items & configurable through the UI. A lot of problems would be sorted at that point.

I realise you aren't trying to get to that point - but please share your code so others can use it
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Specify Membership Quantity
August 19, 2013, 02:11:39 pm
I discussed this with Nicolas & he is keen to look at it at some point -http://issues.civicrm.org/jira/browse/CRM-13246

I'm sure he'd be very happy to have some help
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

generalredneck

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.29-0ubuntu0.12.04.1
  • PHP version: 5.3.10-1ubuntu3.6 with Suhosin-Patch
Re: Specify Membership Quantity
August 20, 2013, 10:31:34 am
Yeah it's going to be a simple post process hook... but yeah for sure... I'll post it up here... Not promising anything extravagant. Maybe yall could peer review it and make me a better coder :P

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Specify Membership Quantity

This forum was archived on 2017-11-26.