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.
I'm running a D7 multilingual site and I want all registered users to be part of a required list, in order to send them a newsletter.
However I want to send the newsletter in the language set as their preference in their user profile.
I was thinking to use the standard language settings field of the user profile and merge it as a mailchmp field , to use a single list on Mailchimp.
But I don't see this field on the "merge fields" dropdown in the drupal mailchimp module configuration.
Any tips how to manage that ?
Thanks.
Comments
Comment #1
gabrielcardon CreditAttribution: gabrielcardon commentedSame here. Mailchimp is perfect for all my needs, I just need my website to be able to use the various lists created depending on user language. Nowhere to be found in the list setup.
Comment #2
Khumbu CreditAttribution: Khumbu commentedjust came across this issue myself...any update on this matter?
edit: a workaround could be to add the language fields yourself (in the user profile) and disable the languge settings in a user profile through theming
Comment #3
marthinal CreditAttribution: marthinal commentedA few weeks ago I needed to say in any way to mailchimp send emails depending the user language by default. It was a D6 installation.
First I created different groups per language and then :
So when running cron job we add emails to mailchimpo depending default language selected on user profile.
Hope this info helps you one day.
Comment #4
titouilleMaybe this can help.
From the mailchimp API doc : http://apidocs.mailchimp.com/api/2.0/lists/subscribe.php
In the "merge_vars" structure, you can use "MC_LANGUAGE" to add the preferred language of the user who subscribe to the list. A little modification can be made in the mailchimp_lists_process_subscribe_form_choices function (line 595 of mailchimp_list.module, 7.x (7.x-2.12 in my case)) :
In my case, now user subscribed to list has the language parametred in it account or if anonymous, the global language value when he subscribe.
Hope this help.
Comment #5
joelpittetA hook would be nice here to allow for these changes?
Comment #6
titouilleYes joelpittet, I suggested a drupal_alter implementation here : https://www.drupal.org/node/2259809 but no answer about the proposition...
Comment #7
amytswan CreditAttribution: amytswan at ThinkShout commented“And now our watch [for support of the 7.x-2.x version of the MailChimp module] has ended…” With the approaching deprecation of MailChimp’s API version 2.0, I’m sad to say we too must turn the page. This branch will become unsupported in early October and officially deprecated by the end of this year (2016).
Fret not! The 7.x-4.x and 8.x versions come highly recommended. Both are using Mailchimp’s new API 3.0 and are being actively maintained. If you find this issue still exists on either the 7.x-4.x or 8.x branches, let us know by opening a new ticket. “What is dead may never die, but rises again, harder and stronger!”