Results 1 to 7 of 7

Thread: Connect Joomla contact from to sugar?

  1. #1
    hristo17 is offline Member
    Join Date
    Jun 2009
    Posts
    9

    Default Connect Joomla contact from to sugar?

    Hello,

    I'm trying to find a solution for the following:

    I have a joomla web site (1.5.10) and I would like to have a contact form that upon submit to enter the data directly into SugarCRM.

    I couldn't find any working solution on that so I'm writing here, can someone help me please?

  2. #2
    sugarcane is offline Sugar Community Member
    Join Date
    Apr 2005
    Location
    Chicago, IL
    Posts
    1,207

    Default Re: Connect Joomla contact from to sugar?

    You can create a web to lead form that will populate into the lead module.
    Intelestream has a great deal of experience hosting and customizing the SugarCRM application. Our company is made up by former employees of SugarCRM, and together we have over 50 years of experience working with the application. To learn more about us, please visit our website at www.intelestream.net or contact us directly at 800-391-4055 or by email at info@intelestream.net

  3. #3
    hristo17 is offline Member
    Join Date
    Jun 2009
    Posts
    9

    Default Re: Connect Joomla contact from to sugar?

    Thanks Sugarcane!

    I tried that already and it works but I was wondering if I can put the dta from a form directly into contacts, not into leads?

    Thanks again

  4. #4
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Connect Joomla contact from to sugar?

    Sure, you'd basically copy that form on the Sugar side and change all references from Leads to Contacts then send the data to that form instead.

  5. #5
    hristo17 is offline Member
    Join Date
    Jun 2009
    Posts
    9

    Default Re: Connect Joomla contact from to sugar?

    Quote Originally Posted by eggsurplus View Post
    Sure, you'd basically copy that form on the Sugar side and change all references from Leads to Contacts then send the data to that form instead.
    Is that possible? For example in my WebToLead form I have things like this:

    action="http://eval.sugarondemand.com/route75/index.php?entryPoint=WebToLeadCapture"

    document.WebToLeadForm.submit();

    and so on, what should be chnaged to if I would like it to go to Contacts?

    Thanks

  6. #6
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Connect Joomla contact from to sugar?

    It definitely is possible. I've done the same thing. I copied the lead capture form in the modules\Leads directory and created a contactCapture.php file in the root sugar directory with the contents:
    PHP Code:
    <?php
    if(!defined('sugarEntry'))define('sugarEntry'true);

    require_once(
    'include/entryPoint.php');
    require_once(
    'include/utils.php');
    require_once(
    'modules/Contacts/ContactFormBase.php');

    global 
    $app_strings$app_list_strings;

    $mod_strings return_module_language($sugar_config['default_language'], 'Contacts');

    $app_list_strings['record_type_module'] = array('Contact'=>'Contacts''Account'=>'Accounts''Opportunity'=>'Opportunities''Case'=>'Cases''Note'=>'Notes''Call'=>'Calls''Email'=>'Emails''Meeting'=>'Meetings''Task'=>'Tasks''Contact'=>'Contacts','Bug'=>'Bugs',);

    $users = array(
        
    'FORMUSERHEREr' => array('name'=>'FORMUSERHERE''pass'=>'USERHASHHERE'),
    );

    if (!empty(
    $_POST['user']) && !empty($users[$_POST['user']])) {
        require_once(
    'modules/Users/User.php');
        
    $current_user = new User();
        
    $current_user->user_name $users[$_POST['user']]['name'];

        if(
    $current_user->authenticate_user($users[$_POST['user']]['pass'])){
            
    $userid $current_user->retrieve_user_id($users[$_REQUEST['user']]['name']);
            
    $current_user->retrieve($userid);
            
    $contactForm = new ContactFormBase();
            
    $prefix '';
            if(!empty(
    $_POST['prefix'])){
                
    $prefix =     $_POST['prefix'];
            }


            
    $_POST['record'] ='';

            if( isset(
    $_POST['_splitName']) ) {
                
    $name explode(' ',$_POST['name']);
                if(
    sizeof($name) == 1) {
                    
    $_POST['first_name'] = '';  $_POST['last_name'] = $name[0];
                }
                else {
                    
    $_POST['first_name'] = $name[0];  $_POST['last_name'] = $name[1];
                }
            }

            
    $return_val $contactForm->handleSave($prefixfalsetrue);

            if(isset(
    $_POST['redirect']) && !empty($_POST['redirect'])){

                
    //header("Location: ".$_POST['redirect']);
                
    echo '<html><head><title>SugarCRM</title></head><body>';
                echo 
    '<form name="redirect" action="' .$_POST['redirect']. '" method="POST">';

                foreach(
    $_POST as $param => $value) {

                    if(
    $param != 'redirect' || $param != 'submit') {
                        echo 
    '<input type="hidden" name="'.$param.'" value="'.$value.'">';
                    }

                }

                if( (
    $return_val == '') || ($return_val  == 0) || ($return_val 0) ) {
                    echo 
    '<input type="hidden" name="error" value="1">';
                }
                echo 
    '</form><script language="javascript" type="text/javascript">document.redirect.submit();</script>';
                echo 
    '</body></html>';
            }
            else{
                echo 
    "Thank You For Your Submission.";
            }
            
    sugar_cleanup();
            
    // die to keep code from running into redirect case below
            
    die();
        }
    }

    echo 
    "We're sorry, the server is currently unavailable, please try again later.";
    if (!empty(
    $_POST['redirect'])) {
        echo 
    '<html><head><title>SugarCRM</title></head><body>';
        echo 
    '<form name="redirect" action="' .$_POST['redirect']. '" method="POST">';
        echo 
    '</form><script language="javascript" type="text/javascript">document.redirect.submit();</script>';
        echo 
    '</body></html>';
    }
    ?>
    And then my action from my external site on the form submits to that page:
    action="...../sugar/contactCapture.php"

  7. #7
    hristo17 is offline Member
    Join Date
    Jun 2009
    Posts
    9

    Default Re: Connect Joomla contact from to sugar?

    Thank you eggsurplus, will try that!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sugar 4.5.1 and joomla 1.0.12
    By tarantella in forum Web Self Service Portal
    Replies: 18
    Last Post: 2010-06-09, 07:12 AM
  2. Sugar & Joomla
    By jaimesteele in forum General Discussion
    Replies: 1
    Last Post: 2009-04-24, 03:41 PM
  3. Sugar CRM und Joomla
    By AnitaD in forum Deutsche
    Replies: 4
    Last Post: 2007-12-14, 12:19 PM
  4. connect document to contact/customers
    By secquard in forum Installation and Upgrade Help
    Replies: 2
    Last Post: 2007-03-13, 08:01 PM
  5. Replies: 1
    Last Post: 2005-12-24, 09:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •