PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

MailChimp Integration (not working)

s2Member Plugin. A Membership plugin for WordPress®.

MailChimp Integration (not working)

Postby Abercorn » June 14th, 2011, 3:37 pm

I installed and configured version 110606 of S2Member. Everything seems to be working fine except for the Integration with MailChimp. I've entered the API Key and List ID (see pdf attachment). The opt-in box has to be checked by default. We are issuing a system-generated password, and members are getting the confirmation email.

While the record is being created within S2Member upon submission of the registration form, those records are not being created within MailChimp. Could you help me figure out what the problem might be?

Thanks.
Attachments
MailChimp_List_Server_Integration.pdf
(390.43 KiB) Downloaded 103 times
User avatar
Abercorn
Registered User
Registered User
 
Posts: 10
Joined: June 14, 2011

Re: MailChimp Integration (not working)

Postby Cristián Lávaque » June 14th, 2011, 7:04 pm

Could you please enable logging and after a few registrations with the problem you're mentioning, share the log entries?

To enable list server logging, for now we're using the interface for gateway logging, so go to WP Admin -> s2Member -> PayPal Options -> PayPal Account Details -> Enable Logging Routines (if you're not using PayPal, change that to the gateway you're using, I guess) and activate it if you had it off.

You'll later find the logs via FTP in the /wp-content/plugins/s2member-logs/ directory.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: MailChimp Integration (not working)

Postby Abercorn » June 14th, 2011, 11:03 pm

Hi Christián,

I have attached the logs that you requested. Thanks for your help.

I also communicated earlier with Ross Grant (very helpful guy!). He forwarded this link to me:

viewtopic.php?f=4&t=2636

FYI. My host has Linux Servers. Both tests were successful. Here are the results of the tests:

curl-test-https-paypal.php generated the following message:
Test succeeded :-) Lookin' good here. Your cURL extension is functioning properly, with SSL enabled too.

fopen-test-https-paypal.php generated the following messages:
Test succeeded :-) Lookin' good here.

I have also checked the php.ini file and "allow_url_fopen = On" is already in there. So this is not a server issue.

Thanks again. I hope you can help me figure out what's wrong.
Attachments
mailchimp-api.log
(9.29 KiB) Downloaded 46 times
User avatar
Abercorn
Registered User
Registered User
 
Posts: 10
Joined: June 14, 2011

Re: MailChimp Integration (not working)

Postby Abercorn » June 14th, 2011, 11:10 pm

Christián,

I should also mention that my subscribers are not getting a confirmation email from MailChimp. They get an email from pr*******@box593.bluehost.com [which is the admin of my hosting account - so the emails are not even coming from the domain I have S2Member set up at).

The content of the emails are as follows:

Username: pl********i
Password: 8Xs43MAikAeO
http://www.synergiainsight.com/feature/wp-login.php

Hope all of this info helps.
User avatar
Abercorn
Registered User
Registered User
 
Posts: 10
Joined: June 14, 2011

Re: MailChimp Integration (not working)

Postby Jason Caldwell » June 15th, 2011, 12:51 am

Thanks for reporting this important issue.
~ and thanks for the heads up Cristián.

I just took a look at your MailChimp® API log, and I'm seeing an error code of 250.
According to this documentation, error code 250 means there is a problem with MERGE fields.
http://apidocs.mailchimp.com/1.3/exceptions.field.php
Code: Select all
250   List_MergeFieldRequired

By default, s2Member sends a merge array with the following associative array.
Code: Select all
    'MERGE1' => '[ FIRST NAME ]',
    'MERGE2' => '[ LAST NAME ]',
    'OPTIN_IP' => '[ IP ADDRESS ]',
    'OPTIN_TIME' => '[ DATE AND TIME ]'

If your MailChimp list has been configured with required MERGE fields that are outside the standard defaults, you may need to use the Filter provided by s2Member, or modify the configuration of your MERGE fields inside your MailChimp® account.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: MailChimp Integration (not working)

Postby Abercorn » June 15th, 2011, 1:43 am

Hi Jason,

Thank you very much (and thanks to Christián, as well). There were indeed some discrepancies in the merge labels, but fixing them within my mailchimp account didn't do the trick. I'm still getting the 250 error code.

Could you elaborate on how to use the Filter provided by s2Member. I am not a programmer, so I could use step-by-step instructions on how to install/apply/use that filter.

Also, as I explained in previous posts, the confirmation email that is going out to subscribers (with their system-generated password) is not going out from mailchimp. It's being sent by bluehost.com (host). Am I missing some additional configuration there (other than the API Key and List ID)?

Thanks much.
User avatar
Abercorn
Registered User
Registered User
 
Posts: 10
Joined: June 14, 2011

Re: MailChimp Integration (not working)

Postby Cristián Lávaque » June 15th, 2011, 1:58 am

When the user creates his account, WordPress sends that email with the account info, this is not something MailChimp does. If you need to edit that email you can use a plugin like https://wordpress.org/extend/plugins/ne ... il-set-up/

The address seems weird, and it may have to do with how your server is configured. You should contact your hosting support so they help you sort out the address your emails are going out from.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: MailChimp Integration (not working)

Postby Abercorn » June 15th, 2011, 8:21 am

Thanks, Christián. I will look into that email configuration with my host.

Having said that, I will still need some clarification from you or Jason on how to use the Filter provided by s2Member to fix the 250 error code (described in Jason's response below).

I am not a programmer, so I could use step-by-step instructions on how to install/apply/use that filter.

Thanks.
User avatar
Abercorn
Registered User
Registered User
 
Posts: 10
Joined: June 14, 2011

Re: MailChimp Integration (not working)

Postby Jason Caldwell » June 17th, 2011, 12:13 am

You will probably want to seek assistance from a developer to complete this, but none the less, here is a quick example for you. This examples shows how you might add custom MERGE fields into the existing defaults that s2Member already supplies with each call to the MailChimp API.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code: Select all
<?php
add_filter
("ws_plugin__s2member_mailchimp_merge_array", "my_filter");
function my_filter($merge, $vars)
    {
// $merge /* Array of existing MERGE fields that s2Member passes by default. */
// $vars /* Array of defined variables in the scope/context of this Filter. */

        $user_id = $vars["user_id"];
        // print_r($vars); // Lots of good stuff in this array.
        $user_custom = get_user_option("s2member_custom", $user_id);
        $my_custom_merge_vars = array("S2_CUSTOM" => $user_custom);
        return array_merge($merge, $my_custom_merge_vars);
    }
?>
* Based on this example, you would first need to add a new MERGE field to your MailChimp list, giving it the name: S2_CUSTOM. See also this s2Member API Function: get_user_field(), which might be helpful when collecting certain details about a User/Member: viewtopic.php?f=40&t=12453&src_doc_v=111003#src_doc_get_user_field%28%29
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: MailChimp Integration (not working)

Postby Abercorn » June 20th, 2011, 10:38 pm

Hi Jason,

Thanks so much. This has been very helpful. Instead of:
function my_filter($merge, $vars)
did you mean?:
function my_filter($mergeVars)

I was getting a syntax error with the former, but $mergeVars seems to be working. I am now able to populate text into Mailchimp....the part I seem to be having trouble with is referencing the actual s2member custom fields.

I am using:

Code: Select all
<?php
add_filter
("ws_plugin__s2member_mailchimp_merge_array", "my_filter");
function my_filter($mergeVars)
   {
        $my_custom_elements = array('MERGE3' => 'addr1', 'MERGE7' => 'city');
        return array_merge($mergeVars, $my_custom_elements);
    }
?>


This writes city and addr1 (or whatever text I put inside the quotes) into the correct fields in mailChimp. I've also tried using [s2Get user_field="city" /]. Same result. The quoted text gets populated in mailChimp.

Could you advise on the appropriate way to reference the S2member custom fields?

The unique ids of the s2member custom fields I want to use are (all text fields):

job_title, org_name, phone, addr1, addr2, city, state, zip, country

Thanks a lot
Last edited by Cristián Lávaque on August 27th, 2011, 9:15 pm, edited 1 time in total.
Reason: Improve code readability. http://www.primothemes.com/forums/viewtopic.php?f=36&t=2780
User avatar
Abercorn
Registered User
Registered User
 
Posts: 10
Joined: June 14, 2011

Re: MailChimp Integration (not working)

Postby Cristián Lávaque » June 20th, 2011, 11:21 pm

You can get a user's s2Member custom fields in an array doing this:

Code: Select all
$s2_custom_fields = get_user_option('wp_s2member_custom_fields', $user_id); 
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: MailChimp Integration (not working)

Postby Abercorn » June 21st, 2011, 9:39 am

Hi Cristián,

Thanks for your help. Is there a list of freelance developers familiar with s2member that you could recommend? Clearly without some decent coding skills it's impossible to take advantage of your plugin.

I run 3 e-commerce websites and use dozens of plugins and themes. I've never been so frustrated with a plugin as I am with s2member. S2member offers the ability to create custom fields (pretty easy to set up and straightforward), it also offers a pretty easy to use integration with Mailchimp. Does the notion of having to hire a freelance developer to automate the Mailchimp integration of custom fields sound ridiculous to you? Or is it just me? How difficult would it be for you guys to automate this or to provide the complete syntax of your filter (including how to deal with custom fields in a way that Mailchimp will be happy with)?

Having said that, you offer a good product. Better in many ways than that of your competitors. Pretty happy with all of the features except the integration of custom fields.

Anyways, if there's a list of preferred developers you could point me to, I'd really appreciate it.
User avatar
Abercorn
Registered User
Registered User
 
Posts: 10
Joined: June 14, 2011

Re: MailChimp Integration (not working)

Postby Cristián Lávaque » June 21st, 2011, 11:15 am

I know Jason has pointed people to Michael at BuddyBoss http://www.buddyboss.com/how-to-set-up- ... uddypress/ when they ask about BuddyPress integrations.

But when it comes to the MailChimp integration, the most experienced one I've seen has been Ross, although I'm not sure if he does freelance development. memberlist.php?mode=viewprofile&u=57

All that said, you could try posting at http://jobs.wordpress.net.


I can understand what you say about some parts being frustrating, but you have to realize that a ton of things have been added and improved to what is the current s2Member, and a ton more things are in the to-do list to be added and improved too.

We are working hard on it and we appreciate the input from users like you that point out things that can be made better, and we take the input seriously since we can't envision on our own all the possible scenarios or needs.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: MailChimp Integration (not working)

Postby dancarp » June 27th, 2011, 6:59 pm

Kudos to you both in the way this was handled. Having been a former programmer analyst(left the field in the mid 90's) I can understand how this becomes both frustrating and difficult. Keeping s2member growing with all the changes happening in all the autoresponder services out there is a challenge to say the least. Each time any one of them modifies their system s2member is out of sync and dated. Narrowing the field of static integration is the only sane way to handle it if that is a sane statement to make . Through all this, I have had to take a step back to see how the work arounds were going to come out. Thank you all for helping to clear these issues up for me.
User avatar
dancarp
Registered User
Registered User
 
Posts: 14
Joined: April 27, 2011

Re: MailChimp Integration (not working)

Postby Cristián Lávaque » June 27th, 2011, 9:44 pm

Thank you very much for the kudos! And I'm very glad we could help you. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron