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 CiviEvent (Moderator: Yashodha Chaku) »
  • Free Event for Paid Members
Pages: [1]

Author Topic: Free Event for Paid Members  (Read 1722 times)

Cid.chad

  • Guest
Free Event for Paid Members
February 21, 2009, 08:15:37 pm
Hi Guys,

I am using CiviCrm 2.1.4  with Drupal 6.9

We have certain type of events which I want it to be free for Paid Members.

Paid Membes usually have a Membership ID which they use as their Drupal User Name to Login.

Also, If their memberhsip is expired, we need them to pay for the event.

How can I achieve this with CiviEvents?

Regards
Cid


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Free Event for Paid Members
February 22, 2009, 09:43:38 am
Not clear from your description whether the user's membership status is stored in your database (e.g. current member, expired member, not a member). If it is - then you should be able to accomplish this by creating a small module that uses our new buildAmount hook to over-ride non-member fee structure for the event when "active membership" is detected.

*Note that you'll need to upgrade to 2.2 which is currently in beta in order to use this hook.*

The hook is described here:
http://wiki.civicrm.org/confluence/display/CRMUPCOMING/CiviCRM+hook+specification

An example is included here:
http://svn.civicrm.org/civicrm/branches/v2.2/drupal/civitest.module.sample

Alternatively you could set up two separate events / registration pages with different fee structures and use Drupal permissions or CiviCRM ACL's to restrict access to the free registration.
Protect your investment in CiviCRM by  becoming a Member!

Cid.chad

  • Guest
Re: Free Event for Paid Members
February 22, 2009, 04:01:58 pm
Thanks for the feedback.

I am not sure using 2.2 would be a good option, since it is still a beta, and I dont know how stable this version is.

Lets for a moment, stick with one even t registration form which might have a profile attached to it.

apart from the hook, is there anyway that I can show certain custom fields/Profles to users based on their Role in the system?
Let say the Paid members know that they need to login to drupal first to be able to use free registration.

if the member is logged in, we already know that the member is  a paid one since they have the Paid Members Role.

Also, is there any Hook or post processing mechanism available in version 2.1 that is triggered once the member tried to Process the form, so if a none member selected the FREE Price Set, the form does not get submitted and shows a warning message.

By the way, do you reckon 2.2 is stable enough to be used on a live site?
« Last Edit: February 22, 2009, 04:06:40 pm by Cid.chad »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Free Event for Paid Members
February 22, 2009, 05:56:19 pm
You might be able to use the "post" hook and /or the "validate" hook - both of which are available in 2.1. Lobo or Kurund might chime in here w/ more advice.
Protect your investment in CiviCRM by  becoming a Member!

Cid.chad

  • Guest
Re: Free Event for Paid Members
February 22, 2009, 06:19:43 pm
Thanks Mate,

Have not tried that yet,but had a quick look at Validate hook, I believe that will do the trick.

Just a suggestion though, in the Hook documentation, you need to check the hook description to figure out from which version the hook is enabled, would be really cool if this piece of information become available right in the Hooks Table of Content.

Great work guys, Should be fun working on such projects.

I can not appreciate enough for your quick feedbacks.



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: Free Event for Paid Members
February 22, 2009, 07:30:37 pm

starting v2.2, the documentation will also be versioned :) which resolves the below problem

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

Cid.chad

  • Guest
Re: Free Event for Paid Members
February 22, 2009, 09:24:41 pm
May I suggest an improvement to Documentation?

The type of problem I had and your responses are usually happening for many people.

Wouldn't it be nice if under each relevant entry for documentation, we have an FAQ (not a general one, but per concept or even page) so we can share the potential questions and their relative answers may be even with link to the threads related to the issue.

I am assuming that hopefully community is helping a lot on documentation, so it can be done by community, if the framework is ready for users.


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: Free Event for Paid Members
February 23, 2009, 09:23:05 am

having an FAQ per component (i.e. per concept) might be a good thing.

Wanna go ahead and start one off and add your FAQ questions (AND answers) for CiviMember?

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 CiviEvent (Moderator: Yashodha Chaku) »
  • Free Event for Paid Members

This forum was archived on 2017-11-26.