It would be nice to support cck fields (content profile node types would be good enough) when using the mapping of merge variables.

Thanks for the lovely module!

CommentFileSizeAuthor
#4 mccpt.zip1.94 KBItangalo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

levelos’s picture

Status: Active » Closed (won't fix)

There's an exposed hook available exposing additional merge fields so that any contrib module can do just that. This will not be part of the core module, but anyone can write a contrib module. E.g., the original 5.x version had a mailchimp_bio module which did this if you want to see an example.

ChrisBryant’s picture

That makes sense, thanks for the reply!

ChrisBryant’s picture

Status: Closed (won't fix) » Closed (fixed)
Itangalo’s picture

FileSize
1.94 KB

I encountered a similar problem, and the noble [Ximo](http://drupal.org/user/88701) helped me to build a mini-module to fix integration with two content profile fields.

The result is attached. It will obviously have to be changed to match the node type and field names for any other project.

All cred to Ximo!

Jim Kirkpatrick’s picture

FYI all: I just enabled the "Content Profile Tokens" module that comes with Content Profile - then the CCK profile fields were available in the settings for the Mailchimp module.

No custom code needed.

sercagil’s picture

Itangalo, I tested your mini-module but it didn't work for me: the content profile isn't still created when I call your function to set the token values. That's strange because modules' weight is correct. For example:

user = 0
content_profile = 2
mini_module = 4
mailchimp = 10

Would you know how to fix this?

Thanks in advance,
Sergio

Itangalo’s picture

@sercagil: The code doesn't create any new content profiles – only exposes token values from content profile to Mailchimp.

(And, as Jim Kirkpatrick correctly points out, this is already handled by the Content Profile Tokens module included in the Content Profile project.)

sercagil’s picture

Itangalo,

I didn't mean your mini-module creates a new content profile. I just meant: inside your function, when content_profile_load() is called, it seems profile isn't still created. Despite weight's modules are right, "content profile registration" is called the last one. Would you know what could be causing this?

sercagil’s picture

Itangalo,

I didn't mean your mini-module creates a new content profile. I just meant: inside your function, when content_profile_load() is called, it seems profile isn't still created. Despite weight's modules are right, "content profile registration" is called the last one. Would you know what could be causing this?

Itangalo’s picture

@sercagil: Oh, sorry – now I get what you mean. (I would say that the profile is loaded, not created.)

I don't know what's causing this, but I know that the content_profile_load() takes an argument that should be the (machine) name of the profile node type. Could that be it?

It is also likely that you don't have to solve this, since the Content Profile Tokens solves the problem for you.

Poieo’s picture

Hey Guys,

I want to sync a content profile date field but it's not available as a merge field. The text fields I've added to the profile content type are there, but not the date field.

Any ideas why all content profile fields wouldn't be available?