Forums

Constant Contact on registartion page

samoht 03 May, 2011
Hello,

I looked through the forum and noticed some topics on cURL for linking to Newsletters like Constant Contact etc. However, I could not find a tutorial on how to set this up. Also Constant Contact Integration makes a Joomla plugin for the regular joomla registration page - can I just use that somehow?

Thanks,
samoht 03 May, 2011
More:

I have setup the cURL plugin like this so far:


Now I'm not sure how I would check if the checkbox to "Opt in" is checked or not to determine if I need to add the user to my Constant Contact list? would that go in the "Extra before CURL code" box??
GreyHead 03 May, 2011
Hi samoht,

Just from a quick glance that '+username+' input name looks wrong. Plese fix that in the Form and see if the URL then works.

And you probably don't want quotes in the Extra Fields box just login=surgeyte

Bob
samoht 03 May, 2011
Hey Bob,

Thanks for the reply. The +username+ is from the ajax code above my form:
<?php
$script = "//<!--
window.addEvent('domready', function() {
  $('uname').addEvent('blur', function(e) {
    e = new Event(e).stop();

    // Show the spinning indicator when pressing the submit button...  
    $('indicator1').setStyle('display','block');

    var username = $('uname').value;
    if ( username != '' ) {
      var url = 'index2.php?option=com_chronocontact&chronoformname=ajax_form&username='+username+'&tmpl=component';

      new Ajax(url, {
        method: 'get',
        onSuccess: parseResult
      }).request();
    }
    function parseResult(request)
    {
      $('indicator1').setStyle('display','none');

      var msg = request.split('##@##');
      $('username_msg').setHTML(msg[1]);
    }

  });
  
    $('email').addEvent('blur', function(e) {
    e = new Event(e).stop();

    // Show the spinning indicator when pressing the submit button...  
    $('indicator2').setStyle('display','block');

    var email = $('email').value;
    if ( email != '' ) {
      var url = 'index2.php?option=com_chronocontact&chronoformname=ajax_form&email='+email+'&tmpl=component';

      new Ajax(url, {
        method: 'get',
        onSuccess: parseResult
      }).request();
    }
    function parseResult(request)
    {
      $('indicator2').setStyle('display','none');

      var msg = request.split('##@##');
      $('email_msg').setHTML(msg[1]);
    }

  });
  
});
//-->";
$doc =& JFactory::getDocument();
$doc->addScriptDeclaration($script);
?>

Could that be causing a problem?
samoht 03 May, 2011
Also, I read somewhere on the Constant Contact web site that the syntax needs to be:

when the object is getting initialized, the login string must be created as API_KEY%LOGIN:PASSWORD



Would that mean that I would not use
username=adjfkl
password=mypass
apikey=234902-23490

but

234902-23490%adjfkl:mypass
in the box instead??


Here is a link to the documentation on adding a contact
http://community.constantcontact.com/t5/Documentation/Adding-a-Contact/ba-p/25121
GreyHead 04 May, 2011
Hi samoht,

I'm not familiar with the Constant Contact API but from a quick look it uses XML dialogues rather than POST forms???

The simple email signup box unly uses four inputs 'llr', 'm', 'p' and 'ea'. I think that you can probably replicate this using the cURL plug-in.

Bob
This topic is locked and no more replies can be posted.