nedarta / yii2-mailchimp
Yii2 Mailchimp to manage Mailchimp Email Platform in a Yii2 site.
dev-master
2019-04-05 09:03 UTC
Requires
- drewm/mailchimp-api: ^2.5
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-05-11 07:14:20 UTC
README
Yii2 MailChimp extension to manage the Email Marketing Platform: https://www.mailchimp.com/
Installation
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require nedarta/yii2-mailchimp "*"
or add
"nedarta/yii2-mailchimp": "*"
Configuration
Set on your configuration file, in modules section
'modules' => [
'mailchimp' => [
'class' => 'nedarta\mailchimp\Mailchimp',
'apiKey' => 'YOUR_API_KEY',
'showFirstname' => true,
'showLastname' => true
]
]
Widget Subscription Example
<?= Subscription::widget([
'apiKey' => 'MYAPIKEY' // if not set get Configuration apiKey
'list_id' => 'MYLISTID' // if not set raise Error
]) ?>
alternative to list_id you can set an list_array to set a list_id to a specific language
<?= Subscription::widget([
'apiKey' => 'MYAPIKEY' // if not set get Configuration apiKey
'list_array' => [
'en' => 'MYLISTID_EN',
'es' => 'MYLISTID_ES',
'it' => 'MYLISTID_IT',
]
]) ?>
Actions
- Lists View: PathToApp/index.php?r=mailchimp/default/lists
- Lists View with Pretty Urls: PathToApp/mailchimp/default/lists
- List View: PathToApp/index.php?r=mailchimp/default/list?id=XXX&name=XXX
- List View with Pretty Urls: PathToApp/mailchimp/default/list?id=XXX&name=XXX