Giter Site home page Giter Site logo

marchino / spree_mailchimp_gibbon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jetsgit/spree_mailchimp_gibbon

0.0 2.0 0.0 104 KB

Mailchimp Interface using the Gibbon Mailchimp Wrapper

License: MIT License

Ruby 90.49% JavaScript 6.86% CSS 2.65%

spree_mailchimp_gibbon's Introduction

Mail Chimp integration with Gibbon gem for Spree

MailChimp API integration for a Spree store, using the gibbon 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 gibbon 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!

Subscription form partial with JS

Also includes a partial at shared/newsletter_subscribe_form that can be included in your footer or sidebar anywhere on the site, has one field for the email address. jQuery code in public/javascripts/mailchimp_subscribe.js 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)

Installation

Add to project’s Gemfile:


gem 'spree_mailchimp_gibbon', :git => git://github.com/bluehandtalking/spree_mailchimp_gibbon.git 
 

Run from project’s root:


$ bundle install
$ rails g spree_mailchimp_gibbon:install

Add this in your app’s config/environments/production.rb file:

config.assets.precompile += %w( admin/jquery.validate/jquery.validate.min.js )

Or add the following line at the bottom of your javascripts/admin/all.js file:


//= require jquery.validate/jquery.validate.min

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.

Requirements

Spree >= 1.0

gem ‘gibbon’, ‘~> 0.4.2’
gem ‘exceptional’ # For Testing

Also uses the jQuery SimpleModal plugin, included.

Credits

Authored by Jerrold Thompson @bluehandtalking

Based heavily on spree_mail_chimp by Sam Beam @sbeam

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

spree_mailchimp_gibbon's People

Contributors

marchino avatar rterbush avatar suryart avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.