Add Opt Out field and MailChimp integration#78
Conversation
…e mailchimp opt out query filters on correct bundle
yanniboi
left a comment
There was a problem hiding this comment.
Looking good so far. A couple of tweaks.
| "#2584729: Hook entity_field_storage_info is broken": "https://www.drupal.org/files/issues/core-entity-sql-content-entity-storage-2583111-1_0.patch" | ||
| }, | ||
| "drupal/ctools": { | ||
| "#2667652: Option to expose filters in block on views block display": "https://www.drupal.org/files/issues/ctools-option_to_expose-2667652-3.patch", |
There was a problem hiding this comment.
Was there not a mailchimp patch as well?
There was a problem hiding this comment.
@yanniboi Yes - this is only needed if you install contacts_mailchimp though, so should it go in the composer.json for the contacts module, or would there need to be a new composer.json specifically for contacts_mailchimp?
| @@ -0,0 +1,35 @@ | |||
| uuid: 5800747c-04df-4555-902f-b233214033a7 | |||
| langcode: en | |||
| status: true | |||
There was a problem hiding this comment.
We don't tend to include uuids for config that goes in contributed modules. @andrewbelcher is that still accurate?
There was a problem hiding this comment.
I think the current consensus is that UUIDs should be included in default configuration so you can see if different config entities are being managed (e.g. 2 modules provide the same profile type, UUID can tell you which one you have).
| id: 'contacts_entity:profile-crm_communications' | ||
| label: 'Communications Profile block' | ||
| provider: contacts | ||
| label_display: '0' |
There was a problem hiding this comment.
Lets change the label to 'Communication preferences'.
|
|
||
| // TODO: Investigate making this asynchronous. | ||
| if (($original === 0 || $original == NULL) && $opt_out === 1 && $entity->uid->entity->hasField('mail')) { | ||
| $email = $entity->uid->entity->mail->value; |
There was a problem hiding this comment.
Not many ways of doing asynchronous in Drupal. We could consider moving it to a cron queue for performance, but its probably fine for now.
These commits begin the work on adding Opt Out features for communication, as well as mailchimp integration for emails.