cinghie/yii2-mailchimp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cinghie/yii2-mailchimp

最新稳定版本:0.2.2

Composer 安装命令:

composer require cinghie/yii2-mailchimp

包简介

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

README 文档

README

License Latest Stable Version Latest Release Date Latest Commit Total Downloads

Yii2 MailChimp extension to manage the Mailchimp Email Marketing Platform:

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"cinghie/yii2-mailchimp": "*"

Configuration

Set on your configuration file

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

'modules' => [ 

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

Override view example, on components config

'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

<?= 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

统计信息

  • 总下载量: 4.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-01-29