Git Product home page Git Product logo

spree_chimpy's Introduction

Spree/MailChimp Integration

Build Status Code Climate

Makes it easy to integrate your Spree app with MailChimp.

List synchronization

Automatically syncs Spree's user list with MailChimp. The user can subscribe/unsubscribe via the registration and account pages.

Order synchronoization

Fully supports MailChimp's eCommerce360 API. Allows you to create targeted campaigns in MailChimp based on a user's purchase history. We'll even update MailChimp if the order changes after the sale (i.e. order modification, cancelation, return). User's who check out with their email in the Spree Storefront, will accrue order data under this email in MailChimp. This data will be available under the 'E-Commerce' tab for the specific subscriber.

Campaign Revenue Tracking

Notifies MailChimp when an order originates from a campaign email.

Custom User Data

Easily add your own custom merge vars. We'll only sync them when data changes.

Existing Stores

Provides a handy rake task rake spree_chimpy:orders:sync is included to sync up all your existing order data with mail chimp. Run this after installing spree_chimpy to an existing store.

Also provides rake spree_chimpy:users:sync_from_mailchimp which annotates your spree users as being subscribed or not, according to Mailchimp.

Deferred Processing

Communication between Spree and MailChimp is synchronous by default. If you have delayed_job in your bundle, the communication is queued up and deferred to one of your workers. (sidekiq support also planned).

Angular.js/Sprangular

You can integrate it with sprangular by using the sprangular_chimpy gem.

Installing

Add spree_chimpy to your Gemfile:

gem 'spree_chimpy'

Alternatively you can use the git repo directly:

gem 'spree_chimpy', github: 'DynamoMTL/spree_chimpy', branch: 'master'

Run bundler:

bundle

Install migrations & initializer file:

bundle exec rails g spree_chimpy:install

MailChimp Setup

If you don't already have an account, you can create one here for free.

Make sure to create a list if you don't already have one. Use any name you like, just dont forget to update the Spree::Chimpy::Config#list_name setting.

Spree Setup

Edit the initializer created by the spree_chimpy:install generator. Only the API key is required.

# config/initializers/spree_chimpy.rb
Spree::Chimpy.config do |config|
  # your API key provided by MailChimp
  config.key = 'your-api-key'
end

If you'd like, you can add additional options:

# config/initializers/spree_chimpy.rb
Spree::Chimpy.config do |config|
  # your API key as provided by MailChimp
  config.key = 'your-api-key'

  # name of your list, defaults to "Members"
  config.list_name = 'peeps'

  # change the double-opt-in behavior
  config.double_opt_in = false

  # send welcome email
  config.send_welcome_email = true

  # id of your store. max 10 letters. defaults to "spree"
  config.store_id = 'acme'

  # define a list of merge vars:
  # - key: a unique name that mail chimp uses. 10 letters max
  # - value: the name of any method on the user class.
  # default is {'EMAIL' => :email}
  config.merge_vars = {
    'EMAIL' => :email,
    'HAIRCOLOR' => :hair_color
  }
end

When adding custom merge vars, you'll need to notify MailChimp by running the rake task: rake spree_chimpy:merge_vars:sync

For deployment on Heroku, you can configure the API key with environment variables:

# config/initializers/spree_chimpy.rb
Spree::Chimpy.config do |config|
  config.key = ENV['MAILCHIMP_API_KEY']
end

Segmenting

By default spree_chimpy will try to segment customers. The segment name can be configured using the segment_name setting. Spree_chimpy will use an existing segment if it exists. If no segment can be found it will be created for you automatically.

Note about double-opt-in & segmenting

Mailchimp does not allow you to segment emails that have not confirmed their subscription. This means that if you use the double-opt-in setting users will not get segmented by default. To work around this there is a rake task to segment all currently subscribed users.

rake spree_chimpy:users:segment

The output of this command will look something like this:

Segmenting all subscribed users
Error 215 with email: [email protected]
 msg: The email address "user@example" does not belong to this list
segmented 2 out of 3
done

You can run this task recurring by setting up a cron using whenever or by using clockwork. Alternatively when you host on Heroku you can use Heroku Scheduler

Adding a Guest subscription form

spree_chimpy comes with a default subscription form for users who are not logged in, just add the following deface override:

Deface::Override.new(:virtual_path  => "spree/shared/_footer",
                     :name          => "spree_chimpy_subscription_form",
                     :insert_bottom => "#footer-right",
                     :partial       => "spree/shared/guest_subscription")

The selector and virtual path can be changed to taste.


Contributing

In the spirit of free software, everyone is encouraged to help improve this project.

Here are some ways you can contribute:

  • by using prerelease versions
  • by reporting bugs
  • by suggesting new features
  • by writing translations
  • by writing or editing documentation
  • by writing specifications
  • by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
  • by refactoring code
  • by resolving issues
  • by reviewing patches

Starting point:

  • Fork the repo
  • Clone your repo
  • Run bundle install
  • Run bundle exec rake test_app to create the test application in spec/test_app
  • Make your changes
  • Ensure specs pass by running bundle exec rspec spec
  • Submit your pull request

Copyright (c) 2014 Joshua Nussbaum and contributors, released under the New BSD License

spree_chimpy's People

Contributors

braidn avatar bryanmtl avatar christoph-buente avatar frahugo avatar futhr avatar iloveitaly avatar jkelleyj avatar johanb avatar jormon avatar joshnuss avatar papayaah avatar reinaris avatar rposborne avatar rterbush avatar simperreault avatar thogg4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spree_chimpy's Issues

Official MailChimp Gem Instead of Hominid

Is there any interest in switching to the official MailChimp gem instead of using hominid? Hominid does not work on Ruby 2.0.

I've found working with the official MailChimp to be a bit cleaner, and it supports Mandrill.

Destroying user does not synchronize

Destroying the user in asynchronous mode (Delayed Job/Sdekiq etc) should unsubscribe the user from mail chimp.

by the time the background worker gets the message the user no longer exist.

maybe we can send the email address in the payload

Unable to run merge_vars:sync rake task

**When running the rake task : **
rake spree_chimpy:merge_vars:sync
the following error is raised:
/home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:25:in configured?': Use RbConfig instead of obsolete and deprecated Config. /home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:25:inconfigured?': Use RbConfig instead of obsolete and deprecated Config.
rake aborted!
NoMethodError: undefined method key' for RbConfig:Module /home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:25:inconfigured?'
/home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:41:in list' /home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:61:insync_merge_vars'
/home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/tasks/spree_chimpy.rake:5:in block (3 levels) in <top (required)>' /home/andreea/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:ineval'
/home/andreea/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `

'
Tasks: TOP => spree_chimpy:merge_vars:sync

This is the spree_chimpy.rb initializer:

Spree::Chimpy.config do |config|

your API key as provided by MailChimp

config.key = 'api-key'

extra api options for the Mailchimp gem

config.api_options = { throws_exceptions: false, timeout: 3600 }

name of your list, defaults to "Members"

config.list_name = 'Clienti'

define a list of merge vars:

- key: a unique name that mail chimp uses. 10 letters max

- value: the name of any method on the user class.

make sure to avoid any of these reserved field names:

http://kb.mailchimp.com/article/i-got-a-message-saying-that-my-list-field-name-is-reserved-and-cant-be-used

default is {'EMAIL' => :email}

config.merge_vars = {
'EMAIL' => :email,
'FIRSTNAME' => :first_name,
'LASTNAME' => :last_name
}
end

** Spree-Chimpy version: 3-stable **
Could you provide some details on what might be missing?

Unable to run merge_vars:sync rake task

I'm getting the same error as previously reported, with Spree 3.1. I also tried bundle exec, but no luck.

Thank you.

rake aborted!
NameError: uninitialized constant Spree::Chimpy::Config
/Users/sarahana/.rvm/gems/ruby-2.2.2/bundler/gems/spree_chimpy-1763ad974109/lib/spree_chimpy.rb:25:in `configured?'
/Users/sarahana/.rvm/gems/ruby-2.2.2/bundler/gems/spree_chimpy-1763ad974109/lib/spree_chimpy.rb:45:in `list'
/Users/sarahana/.rvm/gems/ruby-2.2.2/bundler/gems/spree_chimpy-1763ad974109/lib/spree_chimpy.rb:69:in `sync_merge_vars'
/Users/sarahana/.rvm/gems/ruby-2.2.2/bundler/gems/spree_chimpy-1763ad974109/lib/tasks/spree_chimpy.rake:5:in `block (3 levels) in <top (required)>'
/Users/sarahana/.rvm/gems/ruby-2.2.2/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/Users/sarahana/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'
/Users/sarahana/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => spree_chimpy:merge_vars:sync
(See full trace by running task with --trace)

Make delayed_job optional

I'd like to explore if we can make delayed_job optional, personally I use sidekiq and maybe we can support each one dynamically based on wether or not the gems are present in the host project. What do you think @joshnuss ?

update:
Hmm, I'm not an expert on delayed_job but I can't find any uses of it in the codebase other then the declared dependency. Am I missing something ?

Mailchimp blocked

I suddenly started facing error on mailchimp integration for eCommerce both on staging and live.

selection_999 003

Basically the call to API is blocked somehow and it generally comes when I restart the app.

Has anybody faced such issues?

Spree 2.0

Does anyone see a problem surrounding branching master and creating a Spree 2.0 version? Currently master requires 2.1

Sending email on completed order

Hey there, I've recently deployed a website, and I was interested in sending mails through mailchimp when a customer places an order.

I've added the API key and the list ID, and I can indeed see the 'ecomm/order-add' call being made on the mailchimp account.

My question is, how/where can I configure to send a mail from that point? Do people really need to be added the specific list first?

If so, is that done automatically? It would make little to no sense if a customer would have to subscribe to a list to get an order confirmation email.

Support for Mailchimp API 3.0

Mailchimp is retiring their older APIs pretty soon (Dec 2016)
http://us12.campaign-archive1.com/?u=165abe0a1aa09263bc6ad1397&id=7146f7c68e

Is there anyone working on updating this gem to support 3.0? It doesn't look like mailchimp has put out a wrapper yet. They say they are planning to release a wrapper, but I can't find a timeline on that to upgrade what spree_chimpy uses today from 2.0 to 3.0.
http://devs.mailchimp.com/blog/a-good-api-shouldnt-need-an-sdk/

We could move to gibbon instead, as it has 3.0 support now, or we could just directly connect using something like HTTParty.

@braidn do you have a strong opinion on this? I'm happy to put together a pull request. I'd probably go with making it configurable for now w/ a default API Version of 2.0 to provide backward compatibility.

When subscribe/unsubscribe it doesn't update in mailchimp

rails 1.9.3p194
spree 2-0

In spree_chimpy/lib/spree/chimpysubscription.erb

def resubscribe(&block)
  block.call if block
  return unless configured?

  if unsubscribing?
    unsubscribe
  elsif subscribing? || merge_vars_changed?
    subscribe
  end
end

When we want to "subscribe" or "unsubscribe" with the checkbox on http://0.0.0.0:3000/fr//account/edit

def allowed?
  configured? && @model.subscribed
end

def subscribing?
  merge_vars_changed? && @model.subscribed
end

"merge_vars_changed?" always return false and if i want to unsubscribe "@model.subscribed" will be false and will conflict with the "def allowed?" so it will not be possible to unsubscribe.

I had to put it like that if i wanted it to change the subscribe or unsubscribe in mailchimp.com

def allowed?
  configured?
end

def subscribing?
  @model.subscribed
end

Maybe i'm wrong and broke everything, can you explain if i'm wrong.

Make sure an order is only synced once

Removing an order only removes it (seemingly) from the campaign stats, but not the total order count. As such, calling remove and then add, as we do in the sync method, can cause inflated numbers in MailChimp.

cc: @joshnuss

Allow user to subscribe without registering an account

The user should be able to subscribe to the "newsletter" without going thru the signup process.

For the model, what do you think about calling it "Subscriber"?
Then we can reuse the existing Subscription class like we do in the user class. (maybe we could refactor that stuff into a module?)

The subscribers should be added to a separate mail chimp list.

Thanks @johanb for suggesting this feature.

500 Server Error editing order.

Attempting to access an order through the admin panel errors out with the following.

Started GET "/admin/orders/R781673870/edit" for 174.29.117.52 at 2013-06-18 07:02:57 -0600
Processing by Spree::Admin::OrdersController#edit as HTML
  Parameters: {"id"=>"R781673870"}
spree_chimpy: Attempting to remove order R781673870
spree_chimpy: Adding order R781673870
Completed 500 Internal Server Error in 1186ms

Hominid::APIError (<330> Category Ids must be integers, not "".):
  vendor/bundle/ruby/1.9.1/gems/hominid-3.0.5/lib/hominid/api.rb:35:in `rescue in method_missing'
  vendor/bundle/ruby/1.9.1/gems/hominid-3.0.5/lib/hominid/api.rb:32:in `method_missing'
  vendor/bundle/ruby/1.9.1/bundler/gems/spree_chimpy-d819392b5ea9/lib/spree/chimpy/interface/orders.rb:15:in `add'
  vendor/bundle/ruby/1.9.1/bundler/gems/spree_chimpy-d819392b5ea9/lib/spree/chimpy/interface/orders.rb:30:in `sync'
  vendor/bundle/ruby/1.9.1/bundler/gems/spree_chimpy-d819392b5ea9/lib/spree_chimpy.rb:101:in `perform'
  vendor/bundle/ruby/1.9.1/bundler/gems/spree_chimpy-d819392b5ea9/lib/spree_chimpy.rb:89:in `handle_event'
  vendor/bundle/ruby/1.9.1/bundler/gems/spree_chimpy-d819392b5ea9/lib/spree/chimpy/engine.rb:27:in `block (2 levels) in <class:Engine>'
  vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/notifications/fanout.rb:47:in `call'

Sidekiq worker tries to access records too fast

The point is that spree_chimpy enqueues background jobs on after_create (after_destroy and state_machine's transition) callback and so underlying DB just doesn't commit changes in time (at least those RDBMS who use transactions).
Please allow the models to schedule background jobs on after_commit (on: :create etc.) callback.

It's not working

Hi there,

This might be a very silly question and I apologise for that.

I installed the gem and everything is working fine, but I don't understand what is supposed to happen.

I complete one order and then I go back to my MailChimp to see if the user has been added to the list set in the preferences, but it doesn't happen.

Am I doing something wrong?

Thanks
https://guides.github.com/features/mastering-markdown/

ecommerce sync of guest carts

Hi, I'd like to propose a change and check to see if it would engender support from the maintainers...

I'd like to make it possible to sync ecommerce data (and list signups) for guest orders as well. In our store, 75% of orders aren't associated with a user at checkout, but that shouldn't stop us from subscribing them to a list and having their orders tracked in Mailchimp.

I propose removing the checks around order.user_id being nil, and allowing the creation of Mailchimp customer resources for emails with a new Mailchimp customer_id schema.

  • If an order comes in with a user attached, continue to use customer_<spree_user_id> as the Mailchimp customer_id.
  • However, if an order comes in with no Spree user attached, use email_<email_address> as the Mailchimp customer_id.

Does anyone see challenges with this approach? If well implemented, would you consider adoption?

Gibbon SSL issue

Seems to have SSL issue with mail chimp. I have tried downloading all certs that mail chimp requires but not successful. Anyone else seeing this in their local build?

Gibbon::MailChimpError: SSL_connect returned=1 errno=0 state=error: certificate verify failed @title=nil, @detail=nil, @body=nil, @raw_body=nil, @status_code=nil
/Users/matttopher/.rvm/gems/ruby-2.3.1/gems/gibbon-2.2.4/lib/gibbon/api_request.rb:120:in `handle_error'```

Multiple segments

We have customized our spree to have multiple sellers.
I have a sign up for merchant then seller and I need to segment it.

'groupings' merge_var not subscribing user to specified group in list

Hello,

I'm trying to insert a merge_var for 'groupings' as I've done with the Mailchimp API in the past to automatically subscribe the user to a specific group within my list. I've tried to set this in the config as follows:

config.merge_vars = {
    'EMAIL' => :email,
    'FNAME' => :first_name,
    'LNAME' => :last_name,
    'groupings' => [{
      'name' => Rails.application.secrets.mailchimp["sign_up_type_group_name"],
      'groups' => [Rails.application.secrets.mailchimp["store_customers_subgroup_name"]]
    }]
  }

The user is subscribed with his/her first and last names as expected, but the grouping does not show up. I have another form in this same project that allows a user to sign-up without creating a user profile. It uses an identical format for the merge_vars, just with a different subgroup name and works as expected.

Also, I do believe 'groupings' needs to be lower-case for this to work, from the many StackOverflow posts I've checked out.

Any ideas?

Thanks!

Order synchronoization not working

The user are getting synced to mail chimp but the orders, carts are not getting synced with mail chimp. thus unable to use E commerce automation report on mail chimp

Invalid Ecomm Order Error caused by Variant Images

There appears to be an issue in spree_chimpy/lib/spree/chimpy/interface/products.rb

I see "invalid ecomm order error" when completing checkout on an order. The MailChimp API serves an error message for the variant image: "Shema describes string, NULL found instead".

This is the rb file snip in question:
image

I believe line 94 is the issue. When setting the image_url on the product proper, there is some nil checking involved, and the key is excluded if there are no images found for a product.

However, in this case, it looks like variants always include the image_url key which results in passing nil if variant_image_url returns nothing.

Looking at the variant_image_url method (pictured below):
image

I believe you want to do one of two things:

  1. Add an else condition that returns an empty string
  2. Modify the call to this function and exlude img_url from the Variant object when no images are available

`find_list_id': undefined method `detect' for nil:NilClass

Using Spree 2.1
spree_chimpy last version from master branch.

Default config:

Spree::Chimpy.config do |config|
  # your API key as provided by MailChimp
  config.key = '...'

  # extra api options for the Mailchimp gem
  # config.api_options = { throws_exceptions: false, timeout: 3600 }

  # name of your list, defaults to "Members"
  # config.list_name = 'peeps'

  # Allow users to be subscribed by default. Defaults to false
  # If you enable this option, it's strongly advised that your enable
  # double_opt_in as well. Abusing this may cause Mailchimp to suspend your account.
  # config.subscribed_by_default = false

  # When double-opt is enabled, the user will receive an email
  # asking to confirm their subscription. Defaults to false
  # config.double_opt_in = false

  # id of your store. max 10 letters. defaults to "spree"
  config.store_id = 'GroceryMarket'

  # define a list of merge vars:
  # - key: a unique name that mail chimp uses. 10 letters max
  # - value: the name of any method on the user class.
  # default is {'EMAIL' => :email}
  # config.merge_vars = {
  #   'EMAIL' => :email,
  #   'HAIRCOLOR' => :hair_color
  # }
end

Disabled SSL verificatin (because error with api.mailchimp.com):
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

On start localhost, get error:

$ rails s
=> Booting Thin
=> Rails 4.0.2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[...]]/config/initializers/bypass_ssl.rb:1: warning: already initialized constant OpenSSL::SSL::VERIFY_PEER
Exiting
[...].rvm/gems/ruby-2.0.0-p451/bundler/gems/spree_chimpy-dfabef7e642f/lib/spree/chimpy/interface/list.rb:49:in `find_list_id': undefined method `detect' for nil:NilClass (NoMethodError)
    from [...].rvm/gems/ruby-2.0.0-p451/bundler/gems/spree_chimpy-dfabef7e642f/lib/spree/chimpy/interface/list.rb:53:in `list_id'
    from [...].rvm/gems/ruby-2.0.0-p451/bundler/gems/spree_chimpy-dfabef7e642f/lib/spree_chimpy.rb:47:in `list_exists?'
    from [...].rvm/gems/ruby-2.0.0-p451/bundler/gems/spree_chimpy-dfabef7e642f/lib/spree_chimpy.rb:80:in `ensure_list'
    from [...].rvm/gems/ruby-2.0.0-p451/bundler/gems/spree_chimpy-dfabef7e642f/lib/spree/chimpy/engine.rb:15:in `block in <class:Engine>'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
    from [...].rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
    from [...].rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
    from [...].rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
    from [...].rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
    from [...].rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each'
    from [...].rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
    from [...].rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from [...]Projects/[...]/config/environment.rb:5:in `<top (required)>'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/polyglot-0.3.4/lib/polyglot.rb:65:in `require'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/polyglot-0.3.4/lib/polyglot.rb:65:in `require'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
    from [...]Projects/[...]/config.ru:3:in `block in <main>'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
    from [...]Projects/[...]/config.ru:in `new'
    from [...]Projects/[...]/config.ru:in `<main>'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
    from [...].rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'


taxon loading problem

when using with multi domain and multi currency taxons do not load in admin panel
NameError (undefined local variable or method `supported_currencies' for #Spree::Api::V1::TaxonsController:0x007fcc593ea058

Load on-demand

Currently we require communication with mailchimp to boot rails. Would be nicer if we connected to mailchimp on demand.

Specs broken with Spree 2.4

Due to the fact that acts_as_paranoid was added to spree_auth_devise. So our callbacks in the Spree::User model are broken.

Sync users from website to mailchimp

Gem had bug which did not sent new users to mailchimp during few weeks.
We fixed it.

Now we want new users who not synced with mailchimp (changed their subscription status from false to true on website) to appears in Mailchimp list with subscribed status.

Task rake spree_chimpy:sync don't do this. No new users appears in Mailchimp.

Bundler fails to install on spree-3.0.0 stable

Using rails 4.2, spree 3.0, I cannot install spree_chimpy

Relevent portion of my Gemfile

gem 'spree', '3.0.0'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '3-0-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'
#gem 'spree_static_content', github: 'spree/spree_static_content', branch: '3-0-stable'
gem 'spree_chimpy', github: 'DynamoMTL/spree_chimpy', branch: 'master'
gem "spree_comments", github: 'spree/spree_comments', branch: '3-0-stable'
Andromeda:handmade Jeff$ bundle
Updating git://github.com/DynamoMTL/spree_chimpy.git
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "spree_core":
  In snapshot (Gemfile.lock):
    spree_core (3.0.0)

  In Gemfile:
    spree_chimpy (>= 0) ruby depends on
      spree_core (~> 2.1) ruby

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Andromeda:handmade Jeff$ bundle update
Updating git://github.com/spree/spree_gateway.git
Updating git://github.com/spree/spree_auth_devise.git
Updating git://github.com/spree/spree_static_content.git
Updating git://github.com/DynamoMTL/spree_chimpy.git
Updating git://github.com/spree/spree_comments.git
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "spree_core":
  In Gemfile:
    spree_chimpy (>= 0) ruby depends on
      spree_core (~> 2.1) ruby

    spree_static_content (>= 0) ruby depends on
      spree_core (3.0.0.rc3)

SubscribersController#create redirects differently depending on success and error

I have a form for subscription like this:

%form{action: "/subscribe", method: 'post'}
  %input{name: 'chimpy_subscriber[email]', type: "text", placeholder: "#{t('footer.newsletter.placeholder')}"}
  %input{:type=>"hidden", name: 'chimpy_subscriber[subscribed]', value: "true"}
  %button{type: "submit"}

routes.rb contain:

post '/subscribe', to: 'spree/chimpy/subscribers#create'

When I submit correct email address, I get redirected to the referrer and get proper flash[:notice] message. However, when I submit an incorrect email (like 'foo@') I get a "Missing template spree/chimpy/subscribers/new" error. Why doesn't it redirect just like in the case of sucess?

What's more, if I create the missing view template, it still isn't rendered for successful case - I just get redirected to the referrer with flash[:notice].

Two lists in one store

I have two subscribers lists: each for a different language. Is there any way to configure spree_chimpy to be able to choose dynamically which list to use? In Spree::Chimpy.config I can set only one list_name.

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.