Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Right now when you are using Profile2 to add custom profile fields to your site there is no way to add these to Mailchimp list merge fields, instead you are presented with just a single item named for the profile, e.g. if the profile name is "Personal Information" then you see a field named "Personal Information profile". Ideally each field from the profile set should be provided, and for UX purposes it might also help to put them in an optgroup.
Comment | File | Size | Author |
---|---|---|---|
#2 | profile2-tokens-1243952.patch | 2.47 KB | thebuckst0p |
Comments
Comment #1
thebuckst0p CreditAttribution: thebuckst0p commentedSubscribe. Is anyone working on this already? I have a client who wants this so I might patch it in soon, if no one else has already done so.
Comment #2
thebuckst0p CreditAttribution: thebuckst0p commentedThis patch adds Profile2 token handling to the Mailchimp merge field mapping.
Comment #3
levelos CreditAttribution: levelos commentedI'm not a Profile2 user. Any idea why it doesn't store it's tokens as user tokens. Seems to be standard, no? I'm also not keen on adding specific module support, at least for Profile2.
I did change the code to call and implement 2 hooks allowing other modules, like Profile2 or a custom one, to add additional merge tokens and values. Ref mailchimp_lists_mailchimp_lists_merge_tokens() and mailchimp_lists_mailchimp_lists_merge_values() in mailchimp_lists.module.
Comment #4
levelos CreditAttribution: levelos commentedComment #5
jlab CreditAttribution: jlab commentedIs this fixed in the mailchimp-7.x-2.x-dev version?
Or should I still apply the patch in #2?
Because the patch currently fails when I try to patch the mailchimp-7.x-2.x-dev
I also don't see any mappable profile2 fields to map to the merge fields.
Comment #7
the_g_bomb CreditAttribution: the_g_bomb commentedYou have to enable the Entity token module that ships with Entity API, once that is done all the profile2 tokens should become available to MailChimp.
Comment #8
fossie CreditAttribution: fossie commentedI enabled entity tokens, the tokens are available and I mapped them, but only the email adress is passed to mailchimp, the profile fields aren't sync'd during this action.
Do I overlook some setting?