2017 © Pedro Peláez
 

yii2-extension yii2-mailchimp

Yii2 Mailchimp to manage Mailchimp Email Platform in a Yii2 site.

image

cinghie/yii2-mailchimp

Yii2 Mailchimp to manage Mailchimp Email Platform in a Yii2 site.

  • Thursday, March 1, 2018
  • by cinghie
  • Repository
  • 3 Watchers
  • 4 Stars
  • 516 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 96 % Grown

The README.md

Yii2 Mailchimp

License Latest Stable Version Latest Release Date Latest Commit Total Downloads, (*1)

Yii2 MailChimp extension to manage the Mailchimp Email Marketing Platform:, (*2)

  • Website: https://www.mailchimp.com/
  • PHP API: https://github.com/drewm/mailchimp-api
  • Documentation: https://developer.mailchimp.com/documentation/mailchimp/

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

$ php composer.phar require cinghie/yii2-mailchimp "*"

or add, (*5)

"cinghie/yii2-mailchimp": "*"

Configuration

Set on your configuration file, (*6)

use cinghie\mailchimp\components\Mailchimp as MailchimpComponent;
use cinghie\mailchimp\Mailchimp;

'components' => [

    'mailchimp' => [
        'class' => MailchimpComponent::class,
        'apiKey' => 'YOUR_MAILCHIMP_API_KEY'
    ],

],

'modules' => [ 

    'mailchimp' => [
        'class' => Mailchimp::class,
        'showFirstname' => true,
        'showLastname' => true
    ]

]

Overrides

Override controller example, on modules config, (*7)

'modules' => [ 

    'mailchimp' => [
        'class' => Mailchimp::class,
        'controllerMap' => [
            'default' => 'app\controllers\DefaultController',
        ]
    ]

],

Override view example, on components config, (*8)

'components' => [ 

    'view' => [
        'theme' => [
            'pathMap' => [
                '@cinghie/mailchimp/views/default' => '@app/views/mailchimp/default',
            ],
        ],
    ],

],

Usage

\Yii::$app->mailchimp;
\Yii::$app->mailchimp->getClient();
\Yii::$app->mailchimp->getLists();
\Yii::$app->mailchimp->getListMembers($listID);

Widget Subscription Example

<?= Subscription::widget([
    '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, (*9)

<?= Subscription::widget([
    '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

The Versions

01/03 2018

dev-master

9999999-dev https://github.com/cinghie/yii2-mailchimp

Yii2 Mailchimp to manage Mailchimp Email Platform in a Yii2 site.

  Sources   Download

BSD-3-Clause BSD 3-Clause

The Requires

 

newsletter yii2 mailchimp module yii2 mailchimp yii2 newsletter

28/03 2017

0.2.0

0.2.0.0 https://github.com/cinghie/yii2-mailchimp

Yii2 Mailchimp to manage Mailchimp Email Platform in a Yii2 site.

  Sources   Download

BSD 3-Clause

The Requires

 

newsletter yii2 mailchimp module yii2 mailchimp yii2 newsletter

06/02 2017

0.1.1

0.1.1.0 https://github.com/cinghie/yii2-mailchimp

Yii2 Mailchimp to manage Mailchimp Email Platform in a Yii2 site.

  Sources   Download

BSD 3-Clause

The Requires

 

newsletter yii2 mailchimp module yii2 mailchimp yii2 newsletter