PHPackages                             setono/sylius-mailchimp-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. setono/sylius-mailchimp-plugin

ActiveSylius-plugin[Utility &amp; Helpers](/categories/utility)

setono/sylius-mailchimp-plugin
==============================

Mailchimp plugin for Sylius.

v0.5.7(2y ago)1137.2k↓15%14[13 issues](https://github.com/Setono/SyliusMailchimpPlugin/issues)[6 PRs](https://github.com/Setono/SyliusMailchimpPlugin/pulls)MITPHPPHP &gt;=7.4

Since Sep 23Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Setono/SyliusMailchimpPlugin)[ Packagist](https://packagist.org/packages/setono/sylius-mailchimp-plugin)[ RSS](/packages/setono-sylius-mailchimp-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (38)Versions (32)Used By (0)

Sylius Mailchimp Plugin
=======================

[](#sylius-mailchimp-plugin)

[![Latest Version](https://camo.githubusercontent.com/d8f561beb1abe5fde682c31a6c3945d1abaa9175ae23d12f1c4ce21e79c5d728/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f73796c6975732d6d61696c6368696d702d706c7567696e2f762f737461626c65)](https://packagist.org/packages/setono/sylius-mailchimp-plugin)[![Latest Unstable Version](https://camo.githubusercontent.com/84f15850782cd04c2fe780dda266bb44c0709142955ddaca4ed358e971dd80cb/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f73796c6975732d6d61696c6368696d702d706c7567696e2f762f756e737461626c65)](https://packagist.org/packages/setono/sylius-mailchimp-plugin)[![Software License](https://camo.githubusercontent.com/8c7d3d99a34d65585fcbdb05e6da51c201e21e0de625b849167744f9d630d30a/68747470733a2f2f706f7365722e707567782e6f72672f7365746f6e6f2f73796c6975732d6d61696c6368696d702d706c7567696e2f6c6963656e7365)](LICENSE)[![Build Status](https://github.com/Setono/SyliusMailchimpPlugin/workflows/build/badge.svg)](https://github.com/Setono/SyliusMailchimpPlugin/actions)

Overview
--------

[](#overview)

This plugin has three main purposes:

1. Push your customers (as members/subscribers) to Mailchimp
2. Push your orders to Mailchimp utilizing their [ecommerce features](https://mailchimp.com/developer/guides/getting-started-with-ecommerce/)
3. Allow your customers to sign up for newsletters both in the checkout, but also using a form on your page

It does all this in a memory saving and performance optimized way.

Installation
------------

[](#installation)

### 1. Install dependencies

[](#1-install-dependencies)

This plugin uses the [Doctrine ORM Batcher bundle](https://github.com/Setono/DoctrineORMBatcherBundle). Install that first by following the instructions on that page.

### 2. Require plugin with composer:

[](#2-require-plugin-with-composer)

```
$ composer require setono/sylius-mailchimp-plugin
```

### 3. Import configuration:

[](#3-import-configuration)

```
# config/packages/setono_sylius_mailchimp.yaml
imports:
    - { resource: "@SetonoSyliusMailchimpPlugin/Resources/config/app/config.yaml" }

setono_sylius_mailchimp:
    api_key: '%env(MAILCHIMP_API_KEY)%'
```

Remember to update your `.env` and `.env.local` files:

```
# .env

###> setono/sylius-mailchimp-plugin ###
MAILCHIMP_API_KEY=
###< setono/sylius-mailchimp-plugin ###

```

```
# .env.local

###> setono/sylius-mailchimp-plugin ###
MAILCHIMP_API_KEY=INSERT YOUR API KEY HERE
###< setono/sylius-mailchimp-plugin ###

```

### 4. Import routing:

[](#4-import-routing)

```
# config/routes/setono_sylius_mailchimp.yaml
setono_sylius_mailchimp:
    resource: "@SetonoSyliusMailchimpPlugin/Resources/config/routing.yaml"
```

### 5. Add plugin class to your `bundles.php`:

[](#5-add-plugin-class-to-your-bundlesphp)

```
$bundles = [
    // ...

    // Notice that the Mailchimp plugin has to be added before the SyliusGridBundle
    Setono\SyliusMailchimpPlugin\SetonoSyliusMailchimpPlugin::class => ['all' => true],
    Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
    Setono\DoctrineORMBatcherBundle\SetonoDoctrineORMBatcherBundle::class => ['all' => true],

    // ...
];
```

Make sure you add the plugin **before** `SyliusGridBundle`. Otherwise you'll get exception like `You have requested a non-existent parameter "setono_sylius_mailchimp.model.audience.class"`.

### 6. Override core classes

[](#6-override-core-classes)

**Override `Customer` resource**

```
