Re: CiviCRM Integration

emilyfr's picture
Offline
Joined: 10/09/2008
Juice: 32
Re: CiviCRM Integration

This works well except under the case of having Civi db separate from Drupal. For others in that case, where there are SQL calls you'll need to run db_set_active to hit the Civi db and then again to hit back to Drupal.

For the admin page, I thought it would be better to have an api call for the contribution types, so I created a new Civi issue here that requests a new function to pull contrib types gets added:
http://issues.civicrm.org/jira/browse/CRM-6719

I don't think the latest attached version of this module is in cvs (?) so I didn't make a patch for this next part, but assuming Civi adds in the above API call, then it would be ideal to make one change to uc_civicrm_admin()

replace the gathering of contribution types (approx lines 651 - 660) with the following:

  require_once 'api/Contribution.php';
  $contributionType =& civicrm_contribution_type_get();
  $contTypes = array();
  foreach ($contributionType as $cont){
    $contTypes[$cont['id']] = $cont['name'];
  }
CiviCRM Integration By: dharmatech (63 replies) Wed, 03/12/2008 - 15:04