Hi everybody,

I tried and install Commerce Mailchimp module over mailchimp 7.x-4.3, but I'm not allowed to enable it because i receive the message that the module is incompatible with mailchimp 7.x-4.3 (see attached screenshot).

I tried either with the "regular" and dev versions.

I didn't find anything googling.

Is there any way to fix this?
In case the solution requires coding skills, please explain me like a was a school child.

Thank you very much
Simone

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

midmood created an issue. See original summary.

Perignon’s picture

The Mailchimp 4.x module is fairly new. I too have the same problem as you. I will see if I can do some work to update this module.

Perignon’s picture

Carlitus’s picture

¿Any plans to update the module to API 3.0?

The API 2.0 will no longer be supported after 2016.

Perignon’s picture

I am working on the updates and will submit back as a patch for inclusion in the project. This module relies on the Mailchimp module which has updated to v3.0 of the API but they developed their own PHP API that is missing all of the eCommerce stuff so first I have to code all the eCommerce stuff and create the appropriate pull requests on Github for that.

Perignon’s picture

Started the work on the API: https://github.com/taz77/mailchimp-api-php/tree/ecommerce-api

This will drive changes to the Admin UI. You have to create a store before you can add commerce information with v3.0 of the API. So the module will have to save the store when you save the configuration of the module.

Carlitus’s picture

¿Have you be able to "connect" the store with mailchimp?

I've created a store, products, orders and so on but mailchimp says that "You have no ecommerce"

Perignon’s picture

I am working on v3.0 API and not very close to finishing so I have not attempted anything?

Perignon’s picture

FYI, the Thinkshout guys have started a new module for Mailchimp Ecommerce. I am devoting my efforts to that since they are also working on a PHP API implementation at the same time - it's the only V3.0 PHP API implementation out there right now.

https://github.com/thinkshout/mailchimp_ecommerce

Perignon’s picture

And they also have started working on the eCommerce stuff. I'm helping with PRs.

https://github.com/thinkshout/mailchimp-api-php/tree/ecommerce

Carlitus’s picture

Thanks!

ruscoe’s picture

There's now an official D7 release for MailChimp eCommerce: https://www.drupal.org/project/mailchimp_ecommerce

andyg5000’s picture

I opened an issue in mailchimp_ecommerce #2850825: Ability to add subscription checkbox to checkout and was told any issues with adding a subscribe checkbox should be addressed with the mailchimp module (see #2). We're going to patch commerce_mailchimp (this module) to work with mailchimp 4.x because this module has better integration with Drupal Commerce (ie: checkout pane). Stay tuned :)

andyg5000’s picture

Since https://www.drupal.org/project/mailchimp_ecommerce is maintained by Mailchimp/ThinkShout, I think we should strip the 360 functionality from this module and just use it to expose a checkout pane for subscribing to lists during checkout. We can roll this as a 2.x or even 4.x (to be consistent with MC modules) release.

Open to suggestions, but that's the direction we'll take in our upcoming patch.

Perignon’s picture

I am also helping with the Mailchimp_ecommerce module as well. It needs a lot of work to get it production ready.

andyg5000’s picture

@perignon,

What are your thoughts on this module being for checkout subscriptions and mailchimp_ecommmerce for 360 integration? The maintainers seemed to push back on having checkout panes added to that module and decommissioning this one. Subscribe during checkout is a very common use case for my clients.

Perignon’s picture

@andyg5000

Not sure really. I do the same thing but I wrote my own custom module to add the checkout pain. I also have a custom module just to handle email subscriptions that I keep agnostic of the email service provider I am using. I am using Mailchimp right now, but I have moved around service providers. We do a lot of email marketing. ~15 new email addresses a day and email 37,000 people daily via Mailchimp. I am not the norm!

andyg5000’s picture

Status: Active » Needs review
FileSize
22.56 KB

As described above, here's a patch to strip all 360 functionality from this module and just use it for list subscription during checkout. There's a new alter hook exposed (see commerce_mailchimp.api.php) that allows you to alter merge_vars, interests, etc... when subscribing users.

Please review and provide feedback regarding rolling a new release.

marameodesign’s picture

Hi Andy, thank you for your work.

We are testing this and having an issue during checkout:

An error occurred subscribing xxx@yyy.com to list 6be9ef837a. Status code 400. "400: Invalid Resource - Your merge fields were invalid. a:1:{i:0;O:8:"stdClass":2:{s:5:"field";s:9:"CUSTYPEOK";s:7:"message";s:20:"Please enter a value";}}"

All I have done was configuring the "Subscribe" checkout pane linking it to the list.

Happy to try other things if can help you. Cheers

jefuri’s picture

Added the update hook and removed some irrelevant code.

andyg5000’s picture

Hey @jefuri,

Thanks for doing that. Can you re-roll your patch against the git branch so it doesn't include the GNU license and other d.o stuff?

@marameodesign since each site is different, I opted to just expose an alter hook for setting merge vars. Look at the commerce_mailchimp.api.php file for an example of how to implement that. Let me know if you still have issues.

jefuri’s picture

@andyg5000
What do you mean with d.o stuff?

andyg5000’s picture

You included the GNU license and packaging information in your patch. Looks like you downloaded the Drupal package and started from there instead of cloning the git repo. See https://www.drupal.org/project/commerce_mailchimp/git-instructions

mattjones86’s picture

The patch in #20 gives me the following error when attempting to checkout:

Notice: Undefined property: Mailchimp\MailchimpLists::$ecomm in commerce_mailchimp_rules_action_user_subscribe_order() (line 68 of *****/sites/all/modules/commerce_mailchimp/commerce_mailchimp.rules.inc).

As far as I can see this property does not exist in the library?

https://github.com/thinkshout/mailchimp-api-php/blob/master/src/Mailchim...

derjochenmeyer’s picture

Re-rolled patch against the git branch.

Fixed error reported in #24 according to MCAPI.class

- $mcapi->ecomm->orderAdd($mcorder);
+ $mcapi->ecommOrderAdd($mcorder);

Tested the subscription during checkout. It works, but orders gets assigned to 'guest' without visible PHP errors.

Please test.

adam1’s picture

I cloned git repo with this command:
git clone --branch 7.x-1.x https://git.drupal.org/project/commerce_mailchimp.git
changed into the root folder of the cloned module and ran patch like this:
patch < commerce_mailchimp-support-mailchimp-4x-2721277-25.patch
and got this message:

patching file README.md
patching file commerce_mailchimp.info
patching file commerce_mailchimp.install
patching file commerce_mailchimp.module
patching file commerce_mailchimp.rules.inc
patching file commerce_mailchimp.rules_defaults.inc
The next patch would delete the file commerce_mailchimp.admin.inc,
which does not exist!  Assume -R? [n]

What am I doing wrong? What about the file commerce_mailchimp.admin.inc?
Maybe the patch is already done in the git repo?
When I enable the module and go to /admin/commerce/config/checkout and click the Config-Button of Subscription Options, I get this error:
Fatal error: Cannot use object of type stdClass as array in /Users/ab/mamp-hosts/adocs.dev/sites/all/modules/contrib_patched/commerce_mailchimp/includes/commerce_mailchimp.checkout_pane.inc on line 18

Hope someone can help me out!