I was hunting around for a D7 version for this, and since nothing was available I've cobbled something together - partially based on the previous version but compatible with Ubercart 7.x-3.5.

Others might find it useful -but as I'm pressed for time I was unable to integrate properly with the Mailchimp module, so it uses the Mailchimp API directly and you need to insert your own API code and List ID. Would be good if someone could finish this off and post an official D7 version at some point.

Zip file attached.

CommentFileSizeAuthor
uc_mailchimp_subscribe.zip3.32 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GBurg’s picture

Thanks, I am going to try this out!

trevorleenc’s picture

Issue summary: View changes

This works great! Thank you!

I would like to know how to set it up where it wouldn't require users to double opt-in. (like the mailchimp module block/page)

ledom’s picture

Thanks, works fine! Just miss a configuration page, and a bit of cleaning.

For newbies like me: Api key and list id must be changed into module code.

This module do not need Mailchimp module, no?. So we could remove "dependencies[] = mailchimp" into .info file.
But we still need MCAPI library (put it into our libraries folder)

@trevorleenc: it seems mailchimp does not allow to disable double opt-in (email confirmation needed): http://kb.mailchimp.com/lists/signup-forms/disable-final-welcome-email

bnorbi’s picture

Change the $apikey and $listId to these:

  $apikey = variable_get('mailchimp_api_key', null);
  $mc_list_ids = array_keys(mailchimp_get_lists());
  $listId = isset($mc_list_ids['0']) ? $mc_list_ids['0'] : null;

So your first list is going to be used and no additional configuration page needed.

parkout’s picture

Hello! Please help me. When costumers click finish checkout button we get an empty page with no errors. Could u please tell me what need to do?
P.S. i have changed api and idlist on my.

hockey2112’s picture

This no longer works with mailchimp 7.4.x. Error message from logs:

Warning: require_once(/home/mysite/public_html/sites/all/libraries/mailchimp/MCAPI.class.php): failed to open stream: No such file or directory in uc_mailchimp_subscribe_to_list() (line 51 of /home/mysite/public_html/sites/all/modules/uc_mailchimp_subscribe/uc_mailchimp_subscribe.module).

hockey2112’s picture