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) »
  • Custom profile fields not able to display in Contribution page.
Pages: [1]

Author Topic: Custom profile fields not able to display in Contribution page.  (Read 1059 times)

nicol

  • I post occasionally
  • **
  • Posts: 95
  • Karma: 5
  • CiviCRM version: 4.2, 4.3, 4.4
  • CMS version: Joomla 2.5.x, Joomla 3.x Wordpress 3.x, Drupal 7.x
  • MySQL version: 5.x
  • PHP version: 5.3 / 5.4
Custom profile fields not able to display in Contribution page.
May 15, 2009, 08:20:51 am
Hi

Complete CiviCRM noob so sorry if I could have found the answer to this elsewhere or use the wrong terms.

I'm creating a membership registration system for an academic organisation. There are individual and student memberships - and I've set these up fine (nice program!). There are also organisational memberships where an org signs up and as a result, 50 of their members can also get a user account and log onto our site to view the content.

So someone registering on our site should be able to say I am a member of XYZ organisation, please give me my free membership to this site.

The way I've tried to do this is with a zero fee membership, and a custom profile with a popup of all the organisations registered on the site. Yet I am only offered the chance to include this in search results and user profiles - there is no option to make my custom 'parent organisation profile' appear on contribute pages.

Any ideas why? I'm also still not really sure how to make successful registration conditional on selecting a parent organisation either.

Or is there a better way to achieve what I am doing?

Many thanks in advance

Nicol

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: Custom profile fields not able to display in Contribution page.
May 15, 2009, 10:33:40 am

I would probably do this as follows:

1. Create a profile page to collect information from a member (this need not be a membership page)

2. Add a custom field for to the above profile

3. Implement the custom field options hook: http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmcustomFieldOptions and select the organization who are already members to be part of this list. In your case this is a DB query

4. Implement a post hook on the above profile form and create a relationship between the organization and the new contact

5. Ensure that your  membership type using the relationship option. That way the contact inherits the membership from the parent organization.

You might also be interested in the UK Training Camp on June 23-24 in London, more details here: http://civicrm.org/civicrm/event/info?reset=1&id=4

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

nicol

  • I post occasionally
  • **
  • Posts: 95
  • Karma: 5
  • CiviCRM version: 4.2, 4.3, 4.4
  • CMS version: Joomla 2.5.x, Joomla 3.x Wordpress 3.x, Drupal 7.x
  • MySQL version: 5.x
  • PHP version: 5.3 / 5.4
Re: Custom profile fields not able to display in Contribution page.
May 18, 2009, 07:37:21 am
Hi

Thanks so much for your reply. I only just saw this now - for some reason my email notification didn't work.

That hook system looks pretty good. I think part of my confusion was not realising that organisations could not have contribute pages - only individuals on behalf of orgs.

In the end I created different contribution pages - one for individuals (12 types), one for individuals signing up on behalf of an organisation (12 types), and one for individuals who are members of another organisation, who can sign up to memberships which will sign them up to the organisation they are already a member of.

I now just need active memberships to equate to 'special' joomla users, and lapsed/inactive to still count as registered joomla accounts, keep some content hidden for active members, but still let non-active log in to manage their account. I presume this is the non-straightforward part as the Joomla registration plugin seems to turn memberships on or off, but not from 'special' to 'registered'.

I wish I was in the UK on the 23rd/24th :-(

thanks
Nic



I wish I was in the UK for the training camp


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Custom profile fields not able to display in Contribution page.

This forum was archived on 2017-11-26.