mhuber84/femanager-mailchimp

TYPO3 CMS Extension to connect femanager and mailchimp

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Type:typo3-cms-extension

1.0.2 2022-02-22 11:31 UTC

This package is not auto-updated.

Last update: 2022-06-15 09:31:01 UTC


README

This extension adds a new field "tx_femanagermailchimp_newsletter" to the fe_users table and integrates it into the extendion femanager.

It adds a finisher to the new and edit action to subscribe/unsubscribe the user from a mailchimp audience/list.

It adds a middleware which can be used as mailchimp webhook. If a user unsibscribes directly on mailchimp, the data in TYPO3 is updated.

Installation

  1. Install with composer require mhuber84/femanager-mailchimp Attention: If you extend femanager's domain model user in your own theme extension, then add femanager-mailchimp as requirement in your theme's composer.json instead of your projects composer.json and as depenency in your theme's ext_emconf.php. It has to be loaded before your theme! In your user domain model extend \Mhuber84\FemanagerMailchimp\Domain\Model\User instead of \In2code\Femanager\Domain\Model\User and add 'newsletter' => ['fieldName' => 'tx_femanagermailchimp_newsletter',], to the properties in Configuration/Extbase/Persistence/Classes.php.

  2. Include TypoScript Check if this overwrites your own settings and adjust if necessary! :-)

  3. Include Page TsConfig

  4. Add Partial <f:render partial="Fields/Newsletter" arguments="{_all}" /> to your new and edit templates.

  5. Configure API in ExtensionManager

  6. Configure Webhook "https://example.de/femanagermailchimp/unsubscribe?secret=dummy" in Mailchimp to get updates if a user unsubscribes. For offline testing use curl:

    curl -X "POST" "https://example.ddev.site/femanagermailchimp/unsubscribe?secret=dummy" \
    -H "Content-Type: application/x-www-form-urlencoded" \
    --data-urlencode "type=unsubscribe" \
    --data-urlencode "data[email]=test@example.de" \
    --data-urlencode "data[list_id]=dummy"
    

Author

Marco Huber, @mhuber84, mail@marco-huber.de

Feel free to contribute and send in pull requests or create an issue.