This module integrates Ubercart with CiviCRM. This version has been tested with CiviCRM 1.9 and CiviCRM 2.0.
When a customer buys something from the Ubercart store, the name and address information they provide is added to the CiviCRM contact database. If the customer has a simple contact record generated by synching CiviCRM from the Drupal user table, that record is updated with the new information. If no contact record exists, one is created.
Then the new or updated contact is added to the 'Purchasers' group, which is created if necessary. An activity history record of type 'Purchase' is added to the contact's history, and the 'Purchases' tab on the contact's dashboard entry is populated with a link to the contact's order history in Ubercart.
In CiviCRM 2.0, the functionality of API call civicrm_contact_add() has been reduced in that the call does not store a primary address. The following patch to CiviCRM 2.0 api/v2/Contact.php restores this function:
@@ -387,6 +387,17 @@
require_once 'CRM/Contact/BAO/Contact.php';
$contact = CRM_Contact_BAO_Contact::create( $params );
+ // store primary address for the contact
+ require_once 'CRM/Core/BAO/Address.php';
+ $addr_params = array();
+ $addr_params['address'] = array();
+ $addr_params['address']['contact_id'] = $contact->id;
+ $addr_params['address']['1'] = $params;
+ $addr_params['address']['1']['location_type_id'] = 1;
+ $addr_params['address']['1']['is_primary'] = 1;
+
+ CRM_Core_BAO_Address::create( $addr_params, true );
+
$transaction->commit( );
if ( $contactID ) {Without the above patch, only the contact name will be added in CiviCRM 2.0
| Attachment | Size |
|---|---|
| uc_civicrm-5.x-uc1.x-1.0-beta3.tar.gz | 5.41 KB |

Re: CiviCRM Integration
this looks terrific - I will test it. thanks for contributing!
cheers,
tobias
tested on my site - seems to be working very well thanks!
Hello,
Thanks for a nifty contribution to ubercart. It seems to be working great on my site as advertised.
Cheers,
Tobias