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) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Post hook - order of objects - online and offline contribution - civicrm 4.0
Pages: [1]

Author Topic: Post hook - order of objects - online and offline contribution - civicrm 4.0  (Read 517 times)

yasheshb

  • I post occasionally
  • **
  • Posts: 72
  • Karma: 5
Post hook - order of objects - online and offline contribution - civicrm 4.0
August 22, 2012, 08:34:11 am
Hello:

    Wanted to share my thoughts about the order of objects recorded by the post hook when creating an Online and Offline contribution.
Here's the background

Site - www.example.com

Contribution Types - Member Dues
                                      Offline Member Dues

Membership Type -   Book Club 1 month - $12

Contribution Pages - Book contribution 1

The contribution page - Book Contribution 1 is linked to Membership Type Book Club 1 month in the contribution page settings
in the section "Membership Section Enabled?"

When one makes a contribution to using the Book Contribution 1 (in the live mode) and submits the form,
the following objects are called in the hook

----------------------------------------------------------------------------------------------------------------
Aug 22 11:22:05  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:22:05  [info] $op = edit
Aug 22 11:22:05  [info] $objectName = Address

Aug 22 11:22:05  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:22:05  [info] $op = edit
Aug 22 11:22:05  [info] $objectName = Individual

Aug 22 11:22:05  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:22:05  [info] $op = edit
Aug 22 11:22:05  [info] $objectName = Profile

Aug 22 11:22:06  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:22:06  [info] $op = create
Aug 22 11:22:06  [info] $objectName = Address

Aug 22 11:22:07  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:22:07  [info] $op = create
Aug 22 11:22:07  [info] $objectName = Contribution

Aug 22 11:22:07  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:22:07  [info] $op = create
Aug 22 11:22:07  [info] $objectName = Activity

Aug 22 11:22:07  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:22:07  [info] $op = edit
Aug 22 11:22:07  [info] $objectName = Membership

Aug 22 11:22:07  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:22:07  [info] $op = create
Aug 22 11:22:07  [info] $objectName = Activity

Aug 22 11:22:07  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:22:07  [info] $op = create
Aug 22 11:22:07  [info] $objectName = Membership

Aug 22 11:22:07  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:22:07  [info] $op = create
Aug 22 11:22:07  [info] $objectName = Activity

Aug 22 11:22:07  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:22:07  [info] $op = create
Aug 22 11:22:07  [info] $objectName = MembershipPayment
----------------------------------------------------------------------------------------------------------------

and if the admin records a contribution payment for the page Book Contributon 1 using the
View Contact -> Contributions -> Record Contribution (Check, Cash, EFT ...)

(Contribution Type * = Offline Member Dues)

Additional Details
Online Contribution Page = Book Contribution 1

the following objects are called in the hooks

Aug 22 11:31:49  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:31:49  [info] $op = create
Aug 22 11:31:49  [info] $objectName = Contribution

Aug 22 11:31:49  [info] entering function local137_membership_civicrm_post() in local137_membership.module
Aug 22 11:31:49  [info] $op = create
Aug 22 11:31:49  [info] $objectName = Activity

----------------------------------------------------------------------------------------------------------------

Query here is why are Membership objects not being created when a contribution is being used which links to a Book Contribution 1 page
which in turn creates a Membership and Membership Payment object.

Any input is appreciated.

Thanks.

Yashesh

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Post hook - order of objects - online and offline contribution - civicrm 4.0

This forum was archived on 2017-11-26.