wgg/pimcore-mailchimp
No Category
Project Summary
Readme
WARNING: This repository is abandoned
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 / Disable
row - Click the green
+
Button inInstall/Uninstall
row
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 inUpdate
row
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_DIRECTORY
Wgg\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