SilverStripe Mailchimp Integration

Installs: 79

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 6

Forks: 1

Open Issues: 1

Type:silverstripe-vendormodule

pkg:composer/iqnection-modules/mailchimp

1.0.0 2019-01-02 15:16 UTC

This package is auto-updated.

Last update: 2025-09-29 02:42:12 UTC


README

Provides functionality to add contacts to Mailchimp Directly integrates with IQnection's Base Pages module

Setup:

Log in to MailChimp as the client: https://login.mailchimp.com

Create a Mailchimp API key. At the time this was written, this was located under Account > Extras > API Keys.

If using the IQnection BasePages module, a field will automatically be added to the form controls tab in the CMS to select which list submissions should be added to.

To add contacts using your own controller:

Create an extension for your page, and add the following function to the Controller Extension:

class FormSubmission extends DataObject { public function onBeforeWrite() { parent::onBeforeWrite(); if (!$this->ID) { $mc = new Mailchimp(SiteConfig::current_site_config()->MailchimpApiKey); $result = $mc->addContact($this->Email, 'my_mailchimp_list_id', $this->FirstName, $this->LastName); } return $this; } }