Skip to content

Latest commit

 

History

History
executable file
·
64 lines (49 loc) · 3.66 KB

README.md

File metadata and controls

executable file
·
64 lines (49 loc) · 3.66 KB

mChimpX

Reviews version MODX Extra by Bert Oost MODX version requirements

A FormIt hook provided to subscribe an emailaddress to your Mailchimp list. Fully configurable.

Author: Bert Oost at OostDesign.nl [email protected]

Author: Oleg Pryadko [email protected] - Adapt for MailChimp API v.2

Author: Anton Tarasov [email protected] - Further maintenance & support

This extra stable works with Maichimp API 2.0 support (only 1.x versions support has been stopped), 3.0 version will be implemented soon.

Example snippet call

[[!FormIt?
  &hooks=`mChimpXSubscribe`
  &mcApiKey=`xxxxxx5229a6a84acd58xxxxxx210ax-us11`
  &mcListId=`yyyyyyyyyyy`
  &mcEmailField=`EMAIL`
  &mcMergeTags=`FNAME:FNAME,LNAME:LNAME,BIRTHDATE:BIRTHDATE,CODE:CODE,SOURCE:SOURCE`
  &mcDoubleOptin=`1`
  &mcDebug=`true`
  &mcUpdateExisting=`0`
  &mcFailOnAlreadySubscribed=`1`
  &mcFailOnNotSubscribed=`1`
  &mcFailOnMissingRequired=`1`
]]

Possible options which can be added to the FormIt tag

Parameter Description
mcApiKey [optional] The Mailchimp API Key (can be also specified via system setting mcApiKey)
mcListId [optional] The Mailchimp list id to subscribe to (can be also specified via system setting mcListId)
mcEmailField The name of the email field in the form. Default: email.
mcMergeTags The merge tags of Mailchimp combined with the form fields. Default: FNAME:firstname,LNAME:lastname,FULLNAME:firstname:lastname.

Subscribe parameters

Parameter Description
mcEmailType Email type preference for the email (html, text, or mobile).Default: html.
mcDoubleOptin To control whether a double opt-in confirmation message is sent. Default: 1
mcUpdateExisting To control whether a existing subscribers should be updated instead of throwing and error. Default: 0.
mcReplaceInterests To determine whether we replace the interest groups with the groups provided, or we add the provided groups to the member's interest groups. Default: 1.
mcSendWelcome if your double_optin is false and this is true, we will send your lists Welcome Email if this subscribe succeeds - this will not fire if we end up updating an existing subscriber. If double_optin is true, this has no effect. Default: 0.

Error parameters

Parameter Description
mcDebug Debug messages in MODX error log, when needed.Default: 0.
mcFailOnApiKey Return API key errors to the front-end form. Default: 0
mcFailOnListNotExists Return 'list not exists' error to the front-end form. Default: 0.
mcFailOnAlreadySubscribed Return 'already subscribed' error to the front-end form. Default: 0.
mcFailOnNotSubscribed Return 'not subscribed' error to the front-end form. Default: 0.
mcFailOnMissingRequired Return 'missing required' error to the front-end form.. Default: 0.

Official Documentation

https://docs.modx.com/extras/revo/mchimpx