Download the PHP package luyadev/luya-module-mailchimp without Composer

On this page you can find all versions of the php package luyadev/luya-module-mailchimp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package luya-module-mailchimp

LUYA Logo

LUYA MAILCHIMP MODULE

LUYA Total Downloads Latest Stable Version Join the chat at https://gitter.im/luyadev/luya

This module provides a simple way to build your own form for a user registration in a MailChimp newsletter.

Preparation

Before you install and configure the module you've to setup you Mailchimp account. After a successful registration, create a new mailing list and add you list fields. It's recommended to add them directly under Settings > List fields and |MERGE| tags in your list view. After you've setup your mailing list, extract the list id and note all your list field names. Additionally you'll need to get your API key for your account. With this informations you're ready to setup the mailchimp luya module.

Installation

Require the mailchimp module via composer

add the mailchimp form module to your config:

By default LUYA will wrap the value into the Yii::t('app', $value) functions so you are able to translate the attributes labels. In the above example 'E-Mail' or 'Firstname' would look like this Yii::t('app', 'E-Mail') and Yii::t('app', 'Firstname').

Enter your API key in mailchimpAPI, your list id in listid and all list fields in attributes, rules and attributeLabels. As you can see your list field names in mailchimp will be used as model attributes which then can be validated via Yii rules defined in rules.

View Files

Create two view files in your module name directory in your views folder: _mail.php and index.php

_mail.php

Define your email confirmation admin mail in this view. If you've left recipient empty, no confirmation mail will be sent and you can skip the view definition.

index.php

Define your registration form in this view. It includes the success and error message output as well. The form fields have to be correspond to attributes definition:

Send current language

To let Mailchimp know what language the visitor is using, add the field mc_language to attributes and create a safe rule for it (or add it to the require rule).

In the view file, add the following line:

Embed the Module in the CMS

Add a new module page and choose your configured mailchimp-module-name. In the config example above we used newsletter-form. Make sure the site is visible and online and you're ready to use the module to register users via your defined custom forms to your mailchimp newsletter list.

Something isn't working as expected

You can check the API calls to your account in mailchimp account with the given responds on the same page where you get your API key. Just scroll to the bottom.


All versions of luya-module-mailchimp with dependencies

PHP Build Version
Package Version
Requires luyadev/mailchimp-marketing-php Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package luyadev/luya-module-mailchimp contains the following files

Loading the files please wait ....