PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
phrantick wrote:The only response other than Greg's is from 'clavaque' who posted this, which I think is an extract from the s2m changelog:
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.
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;
}
Users browsing this forum: Yahoo [Bot] and 1 guest