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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • CiviEvent Suggestions (Moderator: Michał Mach) »
  • Event Fees Based on Roles/Groups
Pages: [1]

Author Topic: Event Fees Based on Roles/Groups  (Read 1735 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Event Fees Based on Roles/Groups
September 02, 2012, 07:03:22 am
Having different event fees for different groups or roles has been requested before:

http://forum.civicrm.org/index.php?topic=11655.0
http://forum.civicrm.org/index.php?topic=20044.0

As far as I know, it still doesn't exist in CiviCRM 4.2.

Yet another client of mine has requested this now...
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

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: Event Fees Based on Roles/Groups
September 02, 2012, 10:07:08 am

any chance any of your clients will be willing to fund this. I suspect this is at least a 30-50 hour project

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

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Event Fees Based on Roles/Groups
September 02, 2012, 01:31:22 pm
Unfortunately I don't think so, since all the clients who have requested this (thus far) use Drupal, I am able to provide for them a very simple solution in a few hours (or less) of work, but one that satisfies their needs.

:(
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

DicE

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.5.1
  • CMS version: Drupal 7.latest
  • MySQL version: 5.5.25a
  • PHP version: 5.3.15
Re: Event Fees Based on Roles/Groups
September 07, 2012, 03:29:22 am
any chance you happened to wrote down somewhere how exactly you accomplish that Hershel?
could use some pointers.
thanks

DicE

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Event Fees Based on Roles/Groups
September 09, 2012, 06:32:01 am
Here is a bit of code for a membership page. Here it limits renewal options depending on status:

Code: [Select]
function myMod_civicrm_membershipTypeValues( &$form, &$membershipTypeValues ) {
  // Hide certain memberships for expired members
  if ($expired_membership = myMod_is_expired_member()) {
    if ('Associate' == $expired_membership) {
      // do nothing
      return true;
    }
    if ('General' == $expired_membership ||
             "Executive" == $expired_membership) {
      // Hide Associate
      unset ($membershipTypeValues[2]);
      return true;
    }
  }
  if ($expired_membership = myMod_is_member()) {
    if ('Associate' == $expired_membership) {
      // do nothing
      return true;
    }
    if ('General' == $expired_membership ||
        "Executive" == $expired_membership) {
      // Hide Associate
      unset ($membershipTypeValues[2]);
      return true;
    }
  }
}

The event fee limits I think are in JS. Backend code has this line if the user is a member:

Code: [Select]
    drupal_add_js(array('myMod' => array('is_member' => myMod_is_member())), 'setting');

and JS:

Code: [Select]
  if(0 < $('#noOfparticipants').length) {
    $('#priceset #priceset div').hide();
    $('#priceset #pricesetTotal').show();
    $('#priceset #pricesetTotal div').show();
    if (Drupal.settings.myMod.is_member) {
      $('#priceset #priceset div div input[class^=form-radio input_Member]').click();
    }
    else {
      $('#priceset #priceset div div input[class^=form-radio input_Non-Member]').click();
    }
  }
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • CiviEvent Suggestions (Moderator: Michał Mach) »
  • Event Fees Based on Roles/Groups

This forum was archived on 2017-11-26.