Statistics: Posted by Jason Caldwell — October 8th, 2011, 7:50 pm
Statistics: Posted by mmdouce — October 5th, 2011, 10:01 am
function envirolink_migrate_user_profile_to_s2member($user)
{
$result = "Doing " . $user->display_name;
$user_id = $user->ID;
$s2m_field_defns = array(
'telephone' => 'Telephone',
'mobile' => 'Mobile',
'organisation_name' => 'Organisation Name',
'street1' => 'Street 1',
'street2' => 'Street 2',
'street3' => 'Street 3',
'city' => 'Town/City',
'region' => 'County/Region',
'postcode' => 'Post Code',
'country' => 'Country',
'job_title' => 'Job Title',
'interested_in' => 'Interested In',
'interested_in_other' => 'Interested In Other'
);
$s2m_fields = get_user_option ("s2member_custom_fields", $user_id);
$result .= "<br/>--- " . print_r($s2m_fields,true);
// For each field in the s2member profile
foreach ($s2m_field_defns as $s2m_field_name => $bp_field_name)
{
$bp_value = xprofile_get_field_data($bp_field_name, $user_id);
if ($bp_field_name == 'Interested In') $bp_value = unserialize($bp_value);
$s2m_value = $s2m_fields[$s2m_field_name];
if (!empty($bp_value))
{
$s2m_fields[$s2m_field_name] = $bp_value;
$result .= "<br/>--- s2m[{$s2m_field_name}] was '{$s2m_value}'. Now set to '" . print_r($bp_value,true) . "'";
}
}
update_user_option ($user_id, "s2member_custom_fields", $s2m_fields);
$result .= "<br/>--- " . print_r($s2m_fields,true);
$result .= "<br/>Done " . $user->display_name;
return $result;
}
function envirolink_migrate_bp_profiles_to_s2member()
{
$users = get_users(array());
foreach ($users as $user)
{
$results .= "<br/><br/>" . envirolink_migrate_user_profile_to_s2member($user);
}
return $results;
}
Statistics: Posted by phrantick — October 5th, 2011, 4:40 am
Statistics: Posted by mmdouce — October 4th, 2011, 12:06 pm
Statistics: Posted by Jason Caldwell — July 21st, 2011, 6:48 pm
Statistics: Posted by phrantick — July 21st, 2011, 2:54 am
Statistics: Posted by phrantick — July 20th, 2011, 4:21 am
Statistics: Posted by Jason Caldwell — June 5th, 2011, 9:13 pm
s2Member Documentation wrote:
''With BuddyPress installed, Custom Registration Fields are NOT applicable. BuddyPress themes usually come with their own Registration Form ( i.e. BuddyPress redirects you away from the default Registration Form, over to a special /register page ); BuddyPress also has its own Profile Field Configuration Tool, under BuddyPress -> Profile Field Setup. When BuddyPress is installed, the use of s2Member's Custom Fields is not advised; that is... UNLESS you're using the s2Member Pro Module. With the s2Member Pro Module, Custom Fields will be included in all PayPal® Pro Forms, including even Free Registration Forms generated by the s2Member Pro Module.''
This is still an issue in current versions of s2Member when running w/BuddyPress. The conflict between which piece of software will be used for profile fields is troublesome; depending on the way you're using BuddyPress. If your intention is to use BuddyPress Profiles, then I would not use s2Member's registration fields, and instead let Customers signup with basic information needed to complete checkout.
Once they log in, you can have them fill in the rest of their profile, as configured with BuddyPress Profile Fields, and not with s2Member.
This issue is being addressed for the next release of s2Member.
Statistics: Posted by Jason Caldwell — April 3rd, 2011, 1:01 pm
Statistics: Posted by giovanni — March 30th, 2011, 8:44 pm
Statistics: Posted by Cristián Lávaque — March 1st, 2011, 5:50 pm
Statistics: Posted by phrantick — March 1st, 2011, 8:27 am
Statistics: Posted by s2thel — February 8th, 2011, 9:27 am
Statistics: Posted by gregfielding — November 12th, 2010, 6:16 pm