wgg / pimcore-mailchimp
Pimcore Mailchimp Bundle
Package info
github.com/WebGardenGroup/pimcore-mailchimp
Type:pimcore-bundle
pkg:composer/wgg/pimcore-mailchimp
Requires
- php: ^8.0
- ext-json: *
- mailchimp/marketing: ^3.0.0
- pimcore/pimcore: ^10.0.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.18
- phpstan/phpstan: ^0.12
- phpstan/phpstan-phpunit: ^0.12.18
- phpstan/phpstan-symfony: ^0.12
- symfony/phpunit-bridge: ^4.4|^5.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
There is no active support on it.
Feel free to ask if you want to help to keep this project up to date.
Mailchimp integration for Pimcore
Requirements
- Pimcore X (^10.0.0)
Installation
$ composer require wgg/pimcore-x-mailchimp
Installation via Extension Manager
After you have installed the Mailchimp Bundle via composer, open Pimcore backend and go to Tools => Bundles:
- Click the green
+Button inEnable / Disablerow - Click the green
+Button inInstall/Uninstallrow
Installation via CommandLine
After you have installed the Mailchimp Bundle via composer:
- Execute:
$ bin/console pimcore:bundle:enable WggMailchimpBundle - Execute:
$ bin/console pimcore:bundle:install WggMailchimpBundle
Upgrading
Upgrading via Extension Manager
After you have updated the Mailchimp Bundle via composer, open Pimcore backend and go to Tools => Bundles:
- Click the green
+Button inUpdaterow
Upgrading via CommandLine
After you have updated the Mailchimp Bundle via composer:
- Execute:
$ bin/console pimcore:bundle:update WggMailchimpBundle
Migrate via CommandLine
Does actually the same as the update command and preferred in CI-Workflow:
- Execute:
$ bin/console pimcore:migrations:migrate -b WggMailchimpBundle
Bundle configuration
The bundle currently supports two kind of configuration storage:
Wgg\MailchimpBundle\Storage\FileStorage- stores config as YAML file underPIMCORE_CONFIGURATION_DIRECTORYWgg\MailchimpBundle\Storage\SettingsStoreStorage- stores config throughSettingsStore
You can configure it:
# Use the FileStorage wgg_mailchimp: storage: 'Wgg\MailchimpBundle\Storage\FileStorage' #this is the default
# Use the SettingsStore wgg_mailchimp: storage: 'Wgg\MailchimpBundle\Storage\SettingsStoreStorage'
You can also implement your own storage.
<?php namespace Acme; class OwnStorage implements \Wgg\MailchimpBundle\Storage\StorageInterface { public function read(): array { // You own logic to get the data return []; } public function write(string $apiKey, string $serverPrefix, array $listIds): void { // You own logic to save the data } }
# Use your own storage implementation # 1. register your class services: Acme\OwnStorage: ~ # 2. Configure the bundle to use your storage wgg_mailchimp: storage: 'Acme\OwnStorage'
Usage
Configuration is accessible from the Settings / Mailchimp Settings on the administration panel.
Through Wgg\MailchimpBundle\Util\ApiClient service you can access all Mailchimp API
functionality.
You can use Wgg\MailchimpBundle\Util\ListOptionsProvider service in a Select Type
for audience/list ids.
From twig you can use mailchimp_list_store function to get access to list/audience ids and names.
Testing configuration
On the admin panel there is a Validate settings button - you can use it to validate the configuration.
From cli you can ping the Mailchimp API and get information about the configured lists:
$ bin/console wg:mailchimp:ping $ bin/console wg:mailchimp:get-list