Skip to content

earlhickey/PgMailchimp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PgMailchimp

ZF2 MailChimp Module

Installation

Main Setup

By cloning project

  1. Install the PgMailchimp ZF2 module by cloning it into ./vendor/.
  2. Clone this project into your ./vendor/ directory.

With composer

  1. Add this project in your composer.json:

    "require": {
        "earlhickey/pg-mailchimp": "1.*"
    }
  2. Now tell composer to download PgMailchimp by running the command:

    $ php composer.phar update

Post installation

  1. Enabling it in your application.config.php file.

    <?php
    return array(
        'modules' => array(
            // ...
            'PgMailchimp',
        ),
        // ...
    );
  2. Copy ./vendor/earlhickey/PgMailchimp/config/pg-mailchimp.global.php.dist to ./config/autoload/pg-mailchimp.global.php and change the values as desired.

Usage

  1. Subscribe

    //  create recipient
    $recipient = new \stdClass();
    $recipient->firstname = 'John';
    $recipient->lastname = 'Doe';
    $recipient->gender = '';
    $recipient->dateOfBirth = '';
    $recipient->email = '[email protected]';
    
    $subscribe = $this->mailchimp()->subscribe($recipient);
  2. Unsubscribe

    //  create recipient
    $recipient = new \stdClass();
    $recipient->email = '[email protected]';
    
    $unsubscribe = $this->mailchimp()->unsubscribe($recipient);

About

ZF2 MailChimp Module

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages