Tips and Tricks HQ Forum

Support Forum for Tips and Tricks HQ Products

Register or log in - lost password? (Having an issue with the forum login?)

Search the Forum

Tips and Tricks HQ Forum » WP eMember

MailChimp Integration

(12 posts) (5 voices)
  • Started 1 year ago by intern007
  • Latest reply from ddeo
  • Possible Solutions (Related Topics):
    1. MailChimp Integration with WP eStore
    2. MailChimp Integration - works with Squeeze / Does not work with product
    3. Mailchimp integration not working, don't know where to begin
    4. Mailchimp integration problem
    5. eStore/PDF Stamper/Wordpress v3.21/MailChimp/ and now ---->goMobi integration

Tags:

  • form data
  • mail chimp
  • mailchimp
  • mailchimp list
  • member level
12Next »
  1. intern007

    Hi,

    how do I go about passing a few extra fields from the registration form to MailChimp (e.g. the state and province fields). I would like when new users signup to be automatically signed up with MailChimp but I need to get their address information as well over to MailChimp?

    Regards

    Posted 1 year ago #
  2. amin007
    Key Master

    You will need to modify the "eMember_auto_responder_handler.php" file which handles the signup:

    Search for the following function which does the actual signup:

    eMember_mailchimp_subscribe

    Follow the trail of where the function gets called from so you can pass in the other data to this function.

    Posted 1 year ago #
  3. intern007

    Thanks

    Posted 1 year ago #
  4. hoffybalboa
    Member

    This is good, but is it possible to get more detailed information about this? I would like to at the very least pass the Wordpress Username and Phone to mailchimp. Could you help mark up the actual code below, to show us non-coders, how to pass username and phone?

    Here is the code from eMember_mailchimp_subscribe:

    function eMember_mailchimp_subscribe($api,$target_list_name,$fname,$lname,$email_to_subscribe)
    {
    $lists = $api->lists();
    foreach ($lists AS $list)
    {
    if ($list['name'] == $target_list_name)
    {
    $list_id = $list['id'];
    }
    }
    $merge_vars = array('FNAME'=>$fname, 'LNAME'=>$lname,
    'INTERESTS'=>'');

    $retval = $api->listSubscribe( $list_id, $email_to_subscribe, $merge_vars );
    return $retval;
    }

    Thank you

    Posted 1 year ago #
  5. amin007
    Key Master

    Its not that simple as the phone number and the WordPress username is not passed to this function. So the first thing you will need to do is pass the WordPress username and the phone number to this function then I will be able to give you help with the markup.

    Posted 1 year ago #
  6. hoffybalboa
    Member

    Pardon my ignorance, but I do not understand or how to proceed.

    Posted 1 year ago #
  7. dkbrainard
    Member

    When I installed WP eMember plugin, I had about 700 people subscribed to my legacy list.

    In configuring MailChimp, we set up three membership levels

    None - legacy subscribers
    Free - eMember free subscribers
    Premium - eMember paid subscribers

    When my legacy members sign up for my member site in eMember, this change isn't reflected in MailChimp data. (I.e. eMember shows them as Free or Premium members but MailChimp still shows member level as None).

    How can I send the changed member level to Mail Chimp for pre-existing subscribers?

    Thanks - I have both eStore and eMember and the plug-ins are fantastic.

    DK Brainard

    Posted 1 year ago #
  8. amin007
    Key Master

    The plugin only signs up a user to a particular list. It doesn't not send any membership level data to MailChimp.

    Posted 1 year ago #
  9. dkbrainard
    Member

    Thanks Amin. The integration between eMember and Mail Chimp does seem to be working to the effect that when one of my legacy users becomes a Free Member on my site, it doesn't add a duplicate list entry on Mail Chimp. So that's cool. Wish there was a way to send the membership level over, though.

    Posted 1 year ago #
  10. ddeo
    Member

    Hello, has anyone figured out how to pass more e-member field data to mailchimp? I have been looking at the emember code and the MCAPI code for hours and i don't have enough smarts to figure this out. In the MCAPI it says that other field data can be passed through array $merge_vars array of merges for the email (FNAME, LNAME, etc.)

    I edited the file eMember_auto_responder_handler.php like this:

    function eMember_mailchimp_subscribe($api,$target_list_name,$fname,$lname,$company,$email_to_subscribe)
    {
        $lists = $api->lists();
        foreach ($lists AS $list)
        {
            if ($list['name'] == $target_list_name)
            {
                $list_id = $list['id'];
            }
        }
        $merge_vars = array('FNAME'=>$fname, 'LNAME'=>$lname, 'COMPANY'=>$company,
                            'INTERESTS'=>'');

    and

    function eMember_global_autoresponder_signup($firstname,$lastname,$company_name,$emailaddress)
    {
    
     if ($emember_config->getValue('eMember_use_mailchimp') == 1)
        {
            $api = eMember_get_chimp_api();
            $target_list_name = $emember_config->getValue('eMember_chimp_list_name');
            $retval = eMember_mailchimp_subscribe($api,$target_list_name,$firstname,$lastname,$company_name,$emailaddress);
            eMember_log_debug('Mailchimp email address to signup:'.$emailaddress,true);
            eMember_log_debug('Mailchimp list to signup to:'.$target_list_name,true);
            eMember_log_debug('Mailchimp signup operation performed. returned value:'.$retval,true);
        }
    }

    Once I added $company_name to the eMember_global_autoresponder_signup function it seems to have brokent hte connection with mailchimp. here is the output from my log file:

    [09/01/2011 3:15 PM] - SUCCESS :Performing global autoresponder signup if specified.
    [09/01/2011 3:15 PM] - SUCCESS :Mailchimp email address to signup:
    [09/01/2011 3:15 PM] - SUCCESS :Mailchimp list to signup to:Web Customers
    [09/01/2011 3:15 PM] - SUCCESS :Mailchimp signup operation performed. returned value:
    [09/01/2011 3:15 PM] - SUCCESS :End of global autoresponder signup.

    the return value should be 1

    Also, I did add the mergtag 'COMPANY' in my mailchimp account..

    Am I missing something. Please help me because I think I am close to figuring this out. Possibly the variable for company in e-member is not right. should it be $wp_emember_company_name or something else?

    Your help is greatly appreciated. Thanks, Ddeo

    Posted 8 months ago #

RSS feed for this topic

12Next »

Reply »

You must log in to post.

Tips and Tricks HQ  | WP Shopping Cart  | WP Affiliate Software  | WordPress Membership Plugin