Code Monkey home page Code Monkey logo

modx-mchimpx's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.