Statistics: Posted by cassel — November 20th, 2011, 10:44 pm
No, when you fill MERGE fields with data from s2Member, you're dealing with string representations of pieces of data, and NOT with multiple choice options. So I wouldn't try synchronizing multiple choice options with s2Member in this way.cassel wrote:
If i want to use ONE list, and as a merge field i have something like "Course registered", i remember that in MC, one field can have choices instead of just a yes or no. So if i have choices like Course A and Course B and Course C, if a member has registered for CourseA last week, and this week registers to CourseB, will BOTH be entered or will the second one overwrite the first one? I am refering to this phrase "...and then add them back in to the same list they were on before, but now with the new details ", so will it ADD the CourseB to CourseA in the MERGE field or replace it?
Statistics: Posted by Jason Caldwell — October 31st, 2011, 6:53 pm
Statistics: Posted by cassel — October 31st, 2011, 2:25 pm
Jason Caldwell wrote:
- Code:
<?php
add_filter("ws_plugin__s2member_mailchimp_merge_array", "my_filter", 10, 2);
function my_filter($merge, $vars)
{
// $merge /* Array of existing MERGE fields that s2Member passes by default. */
// $vars /* Array of defined variables in the scope/context of this Filter. */
$user_id = $vars["user_id"];
// print_r($vars); // Lots of good stuff in this array.
$user_level = get_user_field("s2member_access_level", $user_id);
$user_role = get_user_field("s2member_access_role", $user_id);
$user_ccaps = implode(",",get_user_field("s2member_access_ccaps", $user_id));
$my_custom_merge_vars = array("S2_LEVEL" => $user_level, "S2_ROLE" => $user_role, "S2_CCAPS" => $user_ccaps);
return array_merge($merge, $my_custom_merge_vars);
}
?>
Statistics: Posted by Jason Caldwell — October 31st, 2011, 2:07 pm
Statistics: Posted by cassel — October 31st, 2011, 1:19 pm
<?php
add_filter("ws_plugin__s2member_mailchimp_merge_array", "my_filter", 10, 2);
function my_filter($merge, $vars)
{
// $merge /* Array of existing MERGE fields that s2Member passes by default. */
// $vars /* Array of defined variables in the scope/context of this Filter. */
$user_id = $vars["user_id"];
// print_r($vars); // Lots of good stuff in this array.
$user_level = get_user_field("s2member_access_level", $user_id);
$user_role = get_user_field("s2member_access_role", $user_id);
$user_ccaps = implode(",",get_user_field("s2member_access_ccaps", $user_id));
$my_custom_merge_vars = array("S2_LEVEL" => $user_level, "S2_ROLE" => $user_role, "S2_CCAPS" => $user_ccaps);
return array_merge($merge, $my_custom_merge_vars);
}
?>
Statistics: Posted by Jason Caldwell — October 31st, 2011, 1:07 pm
Statistics: Posted by cassel — October 31st, 2011, 11:58 am
Yea, the Notifications API and/or the Filter method that I posted here is what I'd use for now. I would go ahead and implement one or both of these, so that you can use segmentation based on whatever extra data you need ( i.e. Custom Capabilities, or something else perhaps ).cassel wrote:
I am pretty sure he looked into it as he said it was possible, but at this time, if the status of a member changes in WP/s2M say, from level0 to level1, or from Level1 with ccapsA to Level1 with ccapsB, is not taken into account by s2Member, how could it be managed in MC? Maybe i should wait until that is integrated in s2M?
Statistics: Posted by Jason Caldwell — October 31st, 2011, 11:44 am
Statistics: Posted by cassel — October 26th, 2011, 9:44 pm