mhuber84/femanager-mailchimp

TYPO3 CMS Extension to connect femanager and mailchimp

Installs: 56

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:typo3-cms-extension

2.0.1 2023-12-11 14:20 UTC

This package is auto-updated.

Last update: 2024-05-11 15:13:29 UTC


README

This extension adds a new field "tx_femanagermailchimp_newsletter" to the fe_users table and integrates it into the extension 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 unsubscribes 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 your 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@troet.cafe, mail@marco-huber.de

Feel free to contribute and send in pull requests or create an issue on https://gitlab.com/mhuber84/femanager-mailchimp