I'm building a new site using Drupal Commerce, and I'd like the ability for customers to subscribe to our newsletter on checkout. In essence, I'd like to recreate the functionality explained in UberCart MailChimp (http://drupal.org/project/uc_mailchimp), though I've never tried it out.
I could also see this being done with Rules. If another Checkout Pane is added, a boolean field could be added (read: checkbox) that asks the user if they would like to subscribe to our newsletter. If it is checked, then once the checkout is complete, a MailChimp rule (which doesn't exist now) could add that customer to the newsletter.
Is a module like this possible? Or, even better, is Rules integration on the way for MailChimp? Or is there another way entirely to pull this off?
Comments
Comment #1
trevorkjorlien CreditAttribution: trevorkjorlien commentedTo clarify, the Rule would have an action of "Set a data value", and then change the MailChimp "Newsletter Subscriptions" options to 1. What would be better is if there was a way to select a specific list you have made in the MailChimp configuration, if you have multiple lists.
(Note: I am not yet a PHP-grammer, or a module developer. Merely a site-builder who maybe dreams a bit too much...)
Comment #2
levelos CreditAttribution: levelos commentedThis can be accomplished with some fairly simple PHP module code, although not a via a rule anytime soon. You'd simply add the subscription checkbox to the checkout form and then subscribe the user using the mailchimp module's API when it's submitted. A commerce submodule will come out at some point and we can put it on the official roadmap.
Comment #4
j0rd CreditAttribution: j0rd commentedI'm re-doing the uc_mailchimp module currently for a D6 project. You'll be able to take my code and apply it to Drupal Commerce fairly easily, since Ubercart & Commerce are very similar with how checkout works.
The uc_mailchimp module is too old and does too many remote API calls, which can bring down your site, so I wouldn't recommend using that as an example.
My sandbox module should be up shortly and will most likely be called uc_mailchimp_subscribe.
Comment #5
silkogelman CreditAttribution: silkogelman commented@j0rd did you ever get to re-doing the uc_mailchimp module?
I'm currently trying to build a Commerce Mailchimp module in a sandbox.
It's still very experimental so every bit of help is appreciated.
Comment #6
j0rd CreditAttribution: j0rd commented@s1l, No I don't believe I ever did.
I did make my own for Ubercart though
http://drupal.org/project/uc_mailchimp_subscribe
Problem with existing mailchimp modules I found, was that they always poll'ed mailchimp to see which mail-lists were available, or upon form submission attempted to sign the users up via remote request to mailchimp. I consider this a bad idea, since mailchimp could stall the checkout process and you will lose sales because of this (especially if the form returns an error when it's down). I'd rather give the sale preference, rather than an email list signup. I think this is very important when creating a mail-list module for an e-commerce platform.
I think in my module I either moved the successful signup to after a successful sale. Ideally it would be batch via cron.
Comment #7
lsolesen CreditAttribution: lsolesen commented@j0rd Any progress
@s1l Had any time to work more on your sandbox module?
Comment #8
silkogelman CreditAttribution: silkogelman commentedpure coincidence: working on it as we speak
Currently trying to do #1565362: making signup work and #1565354: No newsletter option when already signed up by integrating it with Mailchimp module's Rules integration #1593224: provide rules integration for 7.x-2.x
Please signup to those issues if you want to keep informed and/or help testing, I can use all the help I can get.
Comment #9
silkogelman CreditAttribution: silkogelman commentedPutting this on active, because at this point in time we can probably do this through Rules integration and a bit of custom module code.
Comment #10
silkogelman CreditAttribution: silkogelman commentedYou can do 'MailChimp list signup during Drupal Commerce checkout' with the commerce_mailchimp module.
It requires MailChimp module.
Tutorial on how to configure it can be found at http://s1l.org/subscribe-email-list-during-checkout-drupal-commerce-and-mailchimp.