Download the PHP package setono/sylius-mailchimp-plugin without Composer
On this page you can find all versions of the php package setono/sylius-mailchimp-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download setono/sylius-mailchimp-plugin
More information about setono/sylius-mailchimp-plugin
Files in setono/sylius-mailchimp-plugin
Package sylius-mailchimp-plugin
Short Description Mailchimp plugin for Sylius.
License MIT
Informations about the package sylius-mailchimp-plugin
Sylius Mailchimp Plugin
Overview
This plugin has three main purposes:
- Push your customers (as members/subscribers) to Mailchimp
- Push your orders to Mailchimp utilizing their ecommerce features
- 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
1. Install dependencies
This plugin uses the Doctrine ORM Batcher bundle. Install that first by following the instructions on that page.
2. Require plugin with composer:
3. Import configuration:
Remember to update your .env
and .env.local
files:
4. Import routing:
5. Add plugin class to your bundles.php
:
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
Override Customer
resource
Override Order
resource
Override Channel
resource
Create CustomerRepository.php
Create OrderRepository.php
Add configuration
7. Update your database:
8. Install assets:
Step 9: Using asynchronous transport (optional, but very recommended)
All commands in this plugin will extend the CommandInterface. Therefore, you can route all commands easily by adding this to your Messenger config:
10. Copy templates:
Copy templates located in test directory (tests/Application/templates/bundles/
link) into your templates directory, and modify to your needs
11. Clear cache:
12. Define fixtures
Usage
The pushing of entities uses the mailchimp
state machine:
When the state is pending
, the entities are pushed to Mailchimp. As you can see from the image both the updating
and failing of an entity is handled by the state machine.
By default, the plugin can push customers and orders to Mailchimp.
Push customers
Run the following command to push customers:
Push orders
Run the following command to push orders:
Insert subscription form
To insert the subscription form anywhere on your site, just do the following in twig:
You can of course also use the BlockEventListener:
In this case - you should disable default block event listener:
Troubleshooting
Associating a channel to an audience
When associating an audience to a channel, if you are greeted with such message :
Verify that your channel has an address, if not define it and try to re-submit the form.
Contribution
Run composer try
to setup plugin environment and try test application.
Please, run composer all
before pusing changes to run all checks and tests.
Testing
Run composer tests
to run all tests.
All versions of sylius-mailchimp-plugin with dependencies
ext-json Version *
ext-mbstring Version *
doctrine/doctrine-bundle Version ^1.12.12 || ^2.0
doctrine/event-manager Version ^1.1
doctrine/orm Version ^2.7
doctrine/persistence Version ^1.3 || ^2.0
drewm/mailchimp-api Version ^2.5
fakerphp/faker Version ^1.20
knplabs/knp-menu Version ^3.3
psr/log Version ^1.1 || ^2.0 || ^3.0
setono/doctrine-orm-batcher Version ^0.6.2
setono/doctrine-orm-batcher-bundle Version ^0.3.1
sylius/resource-bundle Version ^1.6
symfony/cache Version ^4.4 || ^5.4 || ^6.0
symfony/config Version ^4.4 || ^5.4 || ^6.0
symfony/console Version ^4.4 || ^5.4 || ^6.0
symfony/dependency-injection Version ^4.4 || ^5.4 || ^6.0
symfony/event-dispatcher Version ^4.4 || ^5.4 || ^6.0
symfony/form Version ^4.4 || ^5.4 || ^6.0
symfony/http-foundation Version ^4.4 || ^5.4 || ^6.0
symfony/lock Version ^4.4 || ^5.4 || ^6.0
symfony/messenger Version ^4.4 || ^5.4 || ^6.0
symfony/options-resolver Version ^4.4 || ^5.4 || ^6.0
symfony/routing Version ^4.4 || ^5.4 || ^6.0
symfony/translation-contracts Version ^1.0 || ^2.0 || ^3.0
symfony/validator Version ^4.4 || ^5.4 || ^6.0
symfony/workflow Version ^4.4 || ^5.4 || ^6.0
thecodingmachine/safe Version ^1.3
twig/twig Version ^2.15 || ^3.0
webmozart/assert Version ^1.11