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 »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • CiviCRM and a complex group structure - will it work?
Pages: 1 [2] 3 4

Author Topic: CiviCRM and a complex group structure - will it work?  (Read 8763 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: CiviCRM and a complex group structure - will it work?
July 04, 2010, 09:17:17 pm
Just wanted to weigh on this discussion as it pertains to Civi development --

I agree with Dave -- while the ability to upsell (jump from one membership type to another using the renewal concept, where the existing period's end date is the starting point for measuring the new type's period) would be a nice feature, it really shouldn't be the only available behavior. I think the existing behavior (different membership types are handled independent of each other) is what people will naturally assume, and a common enough scenario that it shouldn't be changed or lost.

I like the idea of adding an option to control the behavior universally, or possibly to have the option of selecting specific membership types within which this upsell (or really it could be any movement up or down within the types) alternate behavior was applied. But it should definitely be an option. Maybe it doesn't need to be a universal option, but something available as part of the contribution page membership settings? That might be easier to handle with code, as you're simply changing the way the start/end dates are calculated at the point the data is collected. And since contrib page member settings let you choose which membership categories are available on a page, you would have control over which types people can jump between and have the date-extension effect take place. For memberships processed through the backend, you would just adjust the dates as desired manually.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: CiviCRM and a complex group structure - will it work?
July 05, 2010, 07:04:40 pm
Perhaps neither Pat nor I have explained our needs sufficiently.  We are actually not looking to upsell membership types, rather for the ability to offer a range of prices for the same membership benefits depending on the person's circumstances.

We are an not-for-profit that supports and promotes breastfeeding.  One of our membership types, lets call it XYZ membership provides access to a range of services and discounts.  We have always had 3 prices associated with the XYZ membership in our country.  A twelve month (currently $65), a 12 month concession price for those who are eligible for government low-income benefits (currently $50) and a 24 month price (currently $95).  We also have prices for overseas subscriptions (more expensive because postage is more expensive - one membership benefit is a paper-copy magazine) This combination of prices works for us and for our members.  It just doesn't work with standard CiviCRM. 

We don't want low-income earners stigmatised by having their own membership type and we want to encourage members to join for more that 12 months so that they might 'fall in love' with us and become active volunteers who provide the majority of the services we offer (Some do and are members for many years).

My original thought was that we needed Price Sets to work with membership (I have noticed this has been a suggestion/request by other forum posters). People could choose to use price sets or not. I don't know how complicated it would be to extend price sets to memberships. 

Pat's idea to tie in the renewal start date and the current membership end date would also work but as has been pointed out, not everyone would want to have it work that way for all membership types (we certainly wouldn't, as we offer other membership types that can run concurrently with the XYZ membership.)

I suppose the membership setup page would need to have a check box such as "This membership type shares start and end dates with other memberships"  If you ticked it, an additional table would appear where you could list the other membership types for which 'current membership end date = renewal start date' will apply - but perhaps this is starting to sound like price sets for membership? 

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: CiviCRM and a complex group structure - will it work?
July 05, 2010, 11:01:01 pm
Quote
We don't want low-income earners stigmatised by having their own membership type

I think you are reading too much into a different membership types. A member isn't more or less discriminated while getting a price X instead of Y because they are younger that, or older that, or live in a different country, or whatever the criteria.

A membership type defines a price and a duration. you'd have different membership type for "oversea" or "low income benefits", "12 months" and "24 months". That's not discrimination (well, one might argue that the low income is positive discrimination and nothing to be ashamed of, but I digress), that's different prices and different durations.

We are working on a similar need, and we have chosen not to display the membership, we simply ask for instance the age and the wanted duration, and based on that, we select the hidden membership type and process it.

If the term "low income" is something your members, volunteer or staff don't feel comfortable with, rebrand it "reduced fee" and voila, problem solved ;).

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

PRedmond

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Re: CiviCRM and a complex group structure - will it work?
July 05, 2010, 11:06:06 pm
Interesting idea. So users can subscribe and renew their memberships, but the membership types are hidden? I would love more information on how you do this - it could be the answer we are looking for.

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: CiviCRM and a complex group structure - will it work?
July 06, 2010, 03:28:58 am
jchester --

the "upsell" concept is just a common use case in which the same (or similar) effect is taking place -- where you are transferring over some of the settings (specifically end date) from an existing membership to another membership. many orgs would just call it membership transferring or something similar, and really it just introduces an alternate method of computing the memberships. we're trying to genericize to some extent in order to roughly define the spec. and determine what could be involved.

the idea of handling this in a contribution form would partly address your need, as you select which membership types you want available to a single form. so you could create a form specifically handling membership types that need to behave this way.

civicrm doesn't currently support a membership signup form in which multiple membership types are selectable. but there are some discussions about that (interested in possibly helping support this?). if that was the case, we're talking about having membership types grouped into blocks, and within those blocks you can choose your desired behavior for calculations. so your first block has six types of membership that act in the standard way, and the second block has these three types in which the start/end dates are calculated from existing values.

piggy-backing on Xavier's comments about sensitivity to the membership types/amounts --
obviously at some stage in a signup process you need to tell people the amount and distinguish between the membership types. so assuming you work through the terminology for that, you then have complete flexibility with how you handle their use after that. let's say you have a membership directory. you could base it on the collective memberships, irrespective of the specific type, and with no reference to the type. in other words, once a member, there's no real distinction between member benefits, etc. -- other than the join/renew process.

so I don't think that should present a hurdle.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: CiviCRM and a complex group structure - will it work?
July 06, 2010, 04:28:09 am
I drafted a wiki page to talk through these items:
http://wiki.civicrm.org/confluence/display/CRM/Membership+-+Multiple+type+signup+and+alternate+calculations
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

PRedmond

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Re: CiviCRM and a complex group structure - will it work?
July 06, 2010, 06:12:14 am
Can we start off simple, and gradually add the complexities?

I think it would be a good start to add a renewal option to each membership (as currently exists within CiviCRM). My thought is that new subscribers see the new subscription rates, while renewing subscribers see the renewal rates - much the same way that users see different messages if they are subscribing than if they are renewing.

It seems to me that this will require an additional field in the database to store the cost of renewing, an additional field in the admin end to allow admin's to specify the renewal cost, and then some changes so that the cost displayed to users changes in the same way as the message does.

One question I have with the way CiviCRM currently works: if a user has one membership, then signs up for a different membership, they get the the renewal message, right? Then if they chose the same membership as the one they currently have, they get an additional period of time. If they chose a different membership, they get a new membership. Is that how it works?

How common is it to have renewals costing less than initial memberships? Would others use this if it was available?
How common is it for people to have multiple different memberships?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviCRM and a complex group structure - will it work?
July 06, 2010, 07:49:48 am
Regarding "renewal vs. initial signup rates" - it sounds like you're introducing an additional concept to the ones already on the table... the option to set a different fee for renewing a given membership type than the "signup" fee. I'm not quite sure how this ties in to the issue of how the start date for a renewal is determined (today vs. end of current membership).

In any case, fee adjustments for renewals (and potentially for other conditions like a URL parameter from a referring page, some property of a contact etc. ) can potentially be done using the "membershipTypeValues" hook. This hook allows you to modify membership types / fees on a contribution page programmatically.

http://wiki.civicrm.org/confluence/display/CRMUPCOMING/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmmembershipTypeValues

So the code in your hook implementation could detect a renewal situation and automatically modify the fees. Refer to the Extending CiviCRM - Hooks section in our online book for more info on using hooks:

http://en.flossmanuals.net/CiviCRM/DevelopHooks
Protect your investment in CiviCRM by  becoming a Member!

PRedmond

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Re: CiviCRM and a complex group structure - will it work?
July 06, 2010, 04:16:59 pm
So theoretically it would be possible to use a hook to alter the start date of a membership?

PRedmond

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Re: CiviCRM and a complex group structure - will it work?
July 06, 2010, 10:38:33 pm
I have had a look at this: http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmbuildAmount

It seems that you can modify the contribution but not the membership dues. Is there any way this is possible?

Interestingly, I found what looks like where the start dates are defined: ContributionPage.php, about line 216:
Code: [Select]
            if ( CRM_Utils_Array::value( 'start_date', $defaults ) ) {
                list( $defaults['start_date'], $defaults['start_date_time'] ) = CRM_Utils_Date::setDateDefaults( $defaults['start_date'] );
            }

I haven't been able to figure out where $defaults comes from... Is it possible that if I change this value, it would make new memberships start from that date. I am thinking that I can create a module which looks up the members current membership expiry date, and uses that. Obviously this won't work for everyone, but it would work nicely for us. There are a lot of other things to look at too, but this seems to be a decent place to start.


lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: CiviCRM and a complex group structure - will it work?
July 07, 2010, 05:46:18 am
did you look at the membershipTypeValues hook?
that's really the one you most likely will use
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: CiviCRM and a complex group structure - will it work?
July 07, 2010, 11:17:59 am
Pat - As Brian noted, you'll want to use membershipTypeValue hook to modify the membership types and associated fees. I discussed the issue of using a hook to modify the default behavior for assigning start_date to a membership - and lobo agreed that you could potentially use the 'post' hook. This hook is fired on a DB operation - so in this case you'd trap inserts on membership records. Hopefully you could ascertain if there's already an existing current membership for that contact and if so, update the newly inserted membership with corrected start and end dates (based on the end_date of the existing membership).

The snippet you've referenced above is actually setting defaults for Pledge behavior. If you want to follow the code which currently handles the online membership renewal, start at:
CRM/Contribute/Form/Contribution/Confirm.php line 513 (in v3.2) which calls
CRM_Member_BAO_Membership::postProcessMembership which uses
CRM_Member_BAO_Membership::renewMembership to handle renewal logic
Protect your investment in CiviCRM by  becoming a Member!

PRedmond

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Re: CiviCRM and a complex group structure - will it work?
July 07, 2010, 03:59:56 pm
Sorry - didn't read the post close enough and got carried away with the variety of different hooks!!

Thanks for the advice - I will work on it today and get back to you!

PRedmond

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Re: CiviCRM and a complex group structure - will it work?
July 07, 2010, 06:27:21 pm
Super! I used this code (in a drupal module) to alter the renewal price:

Code: [Select]
function membershipRenewal_civicrm_membershipTypeValues( &$form, &$membershipTypeValues ) {
    for ($i=0; $i < count($membershipTypeValues); $i++) {
      if ($membershipTypeValues[$i]['name'] == '12 month Australian') {
          $membershipTypeValues[$i]['minimum_fee'] = "50";
      }
      if ($membershipTypeValues[$i]['name'] == '24 month Australian') {
          $membershipTypeValues[$i]['minimum_fee'] = "95";
      }
      if ($membershipTypeValues[$i]['name'] == '12 month Concession') {
          $membershipTypeValues[$i]['minimum_fee'] = "35";
      }
    }
       
}

Next step is to create a module UI so admin can set the renewal rates for each subscription... Then I will start looking at the start_date changes...

Am I approaching this the right way? It strikes me that this is using Drupal to do what seems to be CiviCRM's job...? Is it possible to use hooks from within CiviCRM?

Thanks for the help on this guys - this is one of the best support forums for any open source project I've dealt with!!

PRedmond

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
Re: CiviCRM and a complex group structure - will it work?
July 07, 2010, 09:50:09 pm

Actually, this doesn't work... It displays the correct price on the page where you select the subscription type, but when you click continue, it displays the full price on the confirmation page...

Pages: 1 [2] 3 4
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Pre-installation Questions (Moderator: Dave Greenberg) »
  • CiviCRM and a complex group structure - will it work?

This forum was archived on 2017-11-26.