<commit_before>h1. Spree + Mail Chimp

MailChimp API integration for your Spree store, using the hominid gem.

Adds a checkbox to the user signup form to allow customer to opt-in to your Mailchimp mailing list. Mailchimp API calls happen via the hominid gem.

Mailchimp subscription status is tracked with a boolean flag on the users table, we also fetch and store the unique MC record id when the subscription is created. This allows us to modify existing email addresses with minimal fuss.

This is a very simple extension as of now, *any ideas suggestions or improvements welcome!*

h2. Subscription form partial with JS

Also includes a partial at <code>shared/newsletter_subscribe_form</code> that can be included in your footer or sidebar anywhere on the site, has one field for the email address. jQuery code in <code>public/javascripts/mailchimp_subscribe.js</code> will POST to the SubscriptionsController which will relay to Mailchimp.

The SimpleModal plugin is used in the EJB to pop up a confirmation or error alert (because you won't be satisfied with a simple alert() box)

h3. Installation

Add to project's Gemfile:
<pre><code>
gem 'mail_chimp', '>=1.3', :git => 'git://github.com/sbeam/spree-mail-chimp.git'
</code> </pre>

Run from project's root:
<pre><code>
bundle install

rails g spree_mail_chimp:install
</code> </pre>

h3. Configuration

See the Mail Chimp Settings forms in the Admin under Configuration.

Note, using Mail Chimp "Merge Vars", you can have any callable methods on User sent
to the MC list, mapped to indentically named (but uppercased) fields in the MC list admin console.
Unfortunately these are only sent at the time the subscription is created, so there isn't much available.

h3. Changes

Version 2.0.0 - released 6 Dec 2010 - Spree 0.30-stable
Version 1.0.1 - released 21 Nov 2010 - Spree 0.11-stable

h3. Requirements

Spree >= 0.3.0
hominid >= 2.2.0 http://rubygems.org/gems/hominid

Also uses the jQuery SimpleModal plugin, included.

h3. Credits

Authored by <NAME> <EMAIL>
Migrated to Spree 0.30 by bzt <EMAIL>

Inspired originally by https://github.com/softa/mailee_spree

includes SimpleModal http://www.ericmmartin.com/projects/simplemodal/

h3. TODO

* make subscribe_to_newsletter_field work
* Send user address info to MC via merge vars, when address is given
* Export new orders to Mailchimp for full CRM gnarliness
* Utility to export existing users to Mailchimp
* Add admin controller to view lists and subscriptions
* Allow for multiple lists
* Tests :/

<commit_msg>update README and credits<commit_after>h1. Spree + Mail Chimp

MailChimp API integration for your Spree store, using the hominid gem.

Adds a checkbox to the user signup form to allow customer to opt-in to your Mailchimp mailing list. Mailchimp API calls happen via the hominid gem.

Mailchimp subscription status is tracked with a boolean flag on the users table, we also fetch and store the unique MC record id when the subscription is created. This allows us to modify existing email addresses with minimal fuss.

This is a very simple extension as of now, *any ideas suggestions or improvements welcome!*

h2. Subscription form partial with JS

Also includes a partial at <code>shared/newsletter_subscribe_form</code> that can be included in your footer or sidebar anywhere on the site, has one field for the email address. jQuery code in <code>public/javascripts/mailchimp_subscribe.js</code> will POST to the SubscriptionsController which will relay to Mailchimp.

The SimpleModal plugin is used in the EJB to pop up a confirmation or error alert (because you won't be satisfied with a simple alert() box)

h3. Installation

Add to project's Gemfile:
<pre><code>
gem 'mail_chimp', '>=1.3', :git => 'git://github.com/sbeam/spree-mail-chimp.git'
</code> </pre>

Run from project's root:
<pre><code>
bundle install

rails g spree_mail_chimp:install
</code> </pre>

h3. Configuration

See the Mail Chimp Settings forms in the Admin under Configuration.

Note, using Mail Chimp "Merge Vars", you can have any callable methods on User sent
to the MC list, mapped to indentically named (but uppercased) fields in the MC list admin console.
Unfortunately these are only sent at the time the subscription is created, so there isn't much available.

h3. Changes

Version 3.0.0 - released 19 Apr 2012 - Spree 1.0 compat
Version 2.0.0 - released 6 Dec 2010 - Spree 0.30-stable
Version 1.0.1 - released 21 Nov 2010 - Spree 0.11-stable

h3. Requirements

Spree >= 1.0
hominid >= 2.2.0 http://rubygems.org/gems/hominid

Also uses the jQuery SimpleModal plugin, included.

h3. Credits

Authored by <NAME> @sbeam
Migrated to Spree 0.30 by <NAME> @bzt
Migrated to Spree 1.0 (and extensively refactored) by <NAME> @jkongie

Inspired originally by https://github.com/softa/mailee_spree

includes SimpleModal http://www.ericmmartin.com/projects/simplemodal/

h3. TODO

* make subscribe_to_newsletter_field work
* Send user address info to MC via merge vars, when address is given
* Export new orders to Mailchimp for full CRM gnarliness
* Utility to export existing users to Mailchimp
* Add admin controller to view lists and subscriptions
* Allow for multiple lists
* Tests :/


{'fraction_non_alphanumeric': 0.06547275178124398, 'fraction_numerical': 0.01848642403235124, 'mean_word_length': 4.354639175257732, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 41, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7098432', 'n_tokens_mistral': 1597, 'n_tokens_neox': 1490, 'n_words': 730}