3brs/sylius-mailchimp-plugin

MailChimp plugin for Sylius

v1.0.0 2025-06-03 10:59 UTC

This package is auto-updated.

Last update: 2025-06-03 11:52:54 UTC


README

MailChimp Plugin

Features

  • Per channel configurable options
  • Subscribe user during checkout
  • Subscribe user during registration
  • Sync newsletter preferences in customer's profile
  • Select the mailing list per channel
  • Configure double opt-in per channel
  • This plugin, unlike others, can handle large mailing lists

Installation

  1. Run $ composer require 3brs/sylius-mailchimp-plugin.
  2. Register \ThreeBRS\SyliusMailChimpPlugin\ThreeBRSSyliusMailChimpPlugin in your Kernel.
  3. Your Entity Channel has to implement \ThreeBRS\SyliusMailChimpPlugin\Entity\ChannelMailChimpSettingsInterface. You can use Trait ThreeBRS\SyliusMailChimpPlugin\Entity\ChannelMailChimpSettingsTrait.
  4. Include {{ include('@ThreeBRSSyliusMailChimpPlugin/mailChimpChannelSettingsForm.html.twig') }} in channel edit page.
  5. Create and run doctrine database migrations.

For guide to use your own entity see Sylius docs - Customizing Models.

Configuration

Set the API Key in parameters.yml

three_brs_sylius_mail_chimp:
    mailchimp_api_key: API_KEY

Optional (subscription from checkout)

  • Include subscribe checkbox template into checkout {{ include('@ThreeBRSSyliusMailChimpPlugin/newsletterSubscribeForm.html.twig') }}

Development

Usage

  • Create symlink from .env.dist to .env or create your own .env file
  • Develop your plugin in /src
  • See bin/ for useful commands

Testing

After your changes you must ensure that the tests are still passing.

$ composer install
$ bin/console doctrine:schema:create -e test
$ bin/phpstan.sh
$ bin/ecs.sh

License

This library is under the MIT license.

Credits

Developed by 3BRS
Forked from manGoweb.