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 CiviMember (Moderator: Deepak Srivastava) »
  • How to find membership type id from contribution
Pages: [1]

Author Topic: How to find membership type id from contribution  (Read 901 times)

shashikant

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 0
  • CiviCRM version: civicrm 4.1.3
  • CMS version: Drupal 6.26
  • MySQL version: Mysql 5.1.56
  • PHP version: PHP Version 5.3.6
How to find membership type id from contribution
August 21, 2012, 11:07:11 pm
Hi i am using civicrm 4.0
if I make contribution by selecting contact and clicking on Contribution tab.
and while creating contribution I am selecting Additional Details and in that i am Online Contribution Page (Which is linked to the Membership Type)

I wants to know how can know the membership type id from contribution programmatically.

Thanks

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: How to find membership type id from contribution
August 22, 2012, 06:01:27 am
If you are trying to add a back office record for Contribution, there is no linkage between membership (and hence membership type) and contribution record. However, if you create a backoffice membership record, and check Record Membership Payment? then there is a linkage between contribution and membership.

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Re: How to find membership type id from contribution
August 22, 2012, 06:21:37 am
yeah.. we're going to the contact record and adding a contribution and then selecting the contribution page for contribution.
and since the contribution page is linked to a membership type we were keen on getting the membership type for the
offline contribution record.

lobo suggested on irc to check the civicrm_membership_block which works fine if only a single membership type is linked to a contribution page id.

thx yashoda / lobo. appreciate it.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • How to find membership type id from contribution

This forum was archived on 2017-11-26.