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 (Moderator: Donald Lobo) »
  • Civi buildAmount Hook not getting called
Pages: [1]

Author Topic: Civi buildAmount Hook not getting called  (Read 485 times)

developer

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.2+
  • CMS version: drupal 7.x/6.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Civi buildAmount Hook not getting called
July 04, 2014, 08:12:12 am
Hi All,
Im using Shopping Cart Style Event Registration. I've added 2 events to the cart and trying to check out.
in cart check out form(CRM_Event_Cart_Form_Checkout_ParticipantsAndPrices) the url is
http://192.168.2.28/mysite/index.php?option=com_civicrm&task=civicrm/event/cart_checkout.

On this form I'm trying to implement a hook called
hook_civicrm_buildAmount( $pageType, &$form, &$amount )

Civi is not calling buildAmount hook. I tried with other following GUI hooks, nothing seems to be called by Civi on this form.

function hook_civicrm_pageRun( &$page ){
function hook_civicrm_customFieldOptions( $fieldID, &$options, $detailedFormat = false ){
function hook_civicrm_dashboard( $contactID, &$contentPlacement = self::DASHBOARD_BELOW ){

is it for any purpose in Civi. if so, Can anyone please tell me how can I achieve buildAmount hook functionality??

Thanks in advance!!
« Last Edit: July 04, 2014, 09:23:05 am by developer »

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: Civi buildAmount Hook not getting called
July 06, 2014, 11:19:57 pm
You could try adding a hook to the CRM_Event_Cart_Form_Checkout_ParticipantsAndPrices? You can do this by making a call to CRM_Utils_Hook, check for example one of the simpler forms in CiviCRM?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

developer

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.2+
  • CMS version: drupal 7.x/6.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Civi buildAmount Hook not getting called
July 08, 2014, 02:12:05 am
Thanks Erik, I'll try to do that.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Civi buildAmount Hook not getting called

This forum was archived on 2017-11-26.