spree_ecommerce_mailchimp

Mailchimp ecommerce api extension

Last updated on: May 28 at 09:01 AM

source code bug tracker request upgrade
Opensource
0 0 0
0 / 0
owner:  spark-solutions

SpreeMailchimpEcommerce

Build Status Maintainability Test Coverage

Installation

  1. Add this line to your application's Gemfile:
gem 'spree_mailchimp_ecommerce', github: 'spark-solutions/spree_mailchimp_ecommerce', branch: 'master'
  1. Install the gem using Bundler: ruby bundle install

  2. Install extension bash $ bundle exec rails g spree_mailchimp_ecommerce:install

  3. Review your keys in config/initializers/spree_mailchimp_ecommerce.rb

  4. Restart your server

User first and last name

By default, Spree doesn't provide firstname and lastname methods for the User model. However, MailChimp requires this fields. SpreeMailchimpEcommerce define these methods in presenter as

  def firstname
    user.try(:firstname) || user&.bill_address&.firstname || "unknown firstname"
  end

  def lastname
    user.try(:lastname) || user&.bill_address&.lastname || "unknown lastname"
  end

Feel free to define firstname and lastname in your User model decorator.

License

The gem is available as open source under the terms of the MIT License.

comments

No comments yet

Add article
compatible spree versions
tags spree versions
master >= 3.1.0, < 4.0
authors
Oleg Leontev