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™

Getting Pro Signup Form Fields to Mesh with Buddypress

s2Member Plugin. A Membership plugin for WordPress®.

Getting Pro Signup Form Fields to Mesh with Buddypress

Postby gregfielding » November 12th, 2010, 6:16 pm

I'm using buddypress with S2 member pro and I'm having trouble getting the form fields to translate over to buddypress profiles.

For example, the required fields on the pro form are First Name, Last Name, Email, and Username. The "Last Name" field doesn't appear in the user's profile. If Fred Smith signs up and goes to his profile page, it will show his name as "Fred" and the last name field will be empty.

Also, I've added a "Current Location" additional field that I need to sync with the buddypress field of the same name.

How is this done?
User avatar
gregfielding
Registered User
Registered User
 
Posts: 8
Joined: October 9, 2010

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby phrantick » February 4th, 2011, 8:35 am

Hi Greg, did you find an answer to this problem? I have exactly the same issue and just can't figure out how to resolve it. I think I want to either get s2Member Pro with PayPal Pro to use the Buddypress profile fields on the regi form, OR (worst option) convince the BuddyPress profile pages and profile functionality to use the s2Member Pro profile fields. Cheers, Phill.
User avatar
phrantick
Registered User
Registered User
 
Posts: 12
Joined: December 6, 2010

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby gregfielding » February 4th, 2011, 12:22 pm

No. I ended up scrapping S2 for my registration page. Now, I use the standard BP registration page and then use S2 pro forms for account upgrades. This makes it a two-step process, but it was the best solution I could figure out.
User avatar
gregfielding
Registered User
Registered User
 
Posts: 8
Joined: October 9, 2010

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby s2thel » February 8th, 2011, 9:27 am

Hi Greg & Phill, I am not too familiar wirh WP yet and thus hoping you might be able to help me out. I am also trying to combine BP & S2M (basic) and I am experiencing the same troubles. Plus (maybe you suffer from this too), S2M "custom registration fields" are not stored in the db the "ordinary way", which makes it impossible for me to integrate them into the BP member profile and - especially - to use them as profile search criteria.

@Greg: How did you manage to use the BP registration form, because in my case, the installation of S2M would make the registration link (in the BP logon widget) disappear? And how is the sign-up page for the second step (with the Paypal buttons) not visible to users who did not yet pass the first step?

@Phill: could you find an alternative solution to the problem?

Thank you both very much in advance!
Seb
User avatar
s2thel
Registered User
Registered User
 
Posts: 2
Joined: February 8, 2011

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby phrantick » March 1st, 2011, 8:27 am

Hi Seb,
I am very actively seeking an answer but so far I have not resolved this issue. Jason has not replied to my direct email. Nor have the web sharks support team. No one on the forum seems to have an answer (or if they do they're keeping it to themselves). I'm getting very frustrated.

Tantalisingly, the s2m custom fields configuration section says "With BuddyPress installed, Custom Registration Fields are NOT applicable. ... When BuddyPress is installed, the use of s2Member's Custom Fields is not advised." So we know it's possible for s2m to use the BP fields. But it then goes on to say "that is... UNLESS you're using the s2Member Pro Module."

It looks like we're forced to use the s2m custom fields. But they're not as functional as the BP fields, which can be grouped (a major advantage in my eyes) and have a description field for hints to the user. And the BP profile edit page is far better than the s2m profile edit form. And everything else in the WP+BP system uses the BP fields, ignoring the s2m fields.

So, we pay good money for the Pro module, to get LESS functionality! Sigh.

The only response other than Greg's is from 'clavaque' who posted this, which I think is an extract from the s2m changelog:

"(s2Member). Bug fix. When s2Member was running together with BuddyPress, wp-login.php?redirect_to= logic implemented by BuddyPress was conflicting with s2Member's handling of wp-login.php?redirect_to=, including Login Welcome Page redirection. s2Member v3.5 resolves this BuddyPress conflict by removing all Filters applied by BuddyPress to login_redirect; thereby eliminating the conflict all together. This conflict was resolved in favor of s2Member, because s2Member provides a very comprehensive option configuration for this behavior in it's General Options panel."

I have upgraded to v3.5.1 but this does not resolve the issue. And that last sentence raises my blood-pressure a little.

Please let me know if you find a way around this.

Cheers
Phill
User avatar
phrantick
Registered User
Registered User
 
Posts: 12
Joined: December 6, 2010

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby Cristián Lávaque » March 1st, 2011, 5:50 pm

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:


That's correct, I was quoting the changelog.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby giovanni » March 30th, 2011, 8:44 pm

Hi all,

Were any of you able to find a solution?

I just paid for s2member Pro because of this statement:

''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.''

I'm using the latests version of Buddypress [Version 1.2.8], WP [3.1], and S2 [Version 3.5.7 + Pro Module v1.5.7 ].

What I'd like to do is have a registration page that has a drop-down with the different types of memberships [Level 0, 1, 2, or 3], the fields of the application (username, password, name, custom fields from bp_xprofile). When the user clicks Register, it will take them to Paypal, the user will pay and come back to my site.

Any idea on how to go about this? Or what other options I have?

Thanks,
Giovanni
User avatar
giovanni
Registered User
Registered User
 
Posts: 1
Joined: March 30, 2011

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby Jason Caldwell » April 3rd, 2011, 1:01 pm

VERY sorry for the delayed response guys.
~ thanks for bringing this to my attention Cristián.

I think I answered some of this via email to @Phill a couple weeks ago.

There is no solution available for this yet, but we ARE working on it for the next release.
@TODO / COPY :: Make it possible to merge BuddyPress fields with s2Member and vice versa. ( done, see below )

This was addressed in the official release of s2Member v110605+, available now. viewtopic.php?f=4&t=6505&p=20121#p16089


Regarding this statement.
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 statement is making a suggestion to use BuddyPress Profile Fields when you're running BuddyPress together with s2Member. However, in the case of s2Member Pro Forms, if you intend to apply Custom Registration Fields during checkout, you MUST use s2Member's Custom Registration Fields, because s2Member Pro Forms integrate exclusively with s2Member. We hope to change this in a future release.

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.

Thanks in advance for your continued patience and support of s2Member.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby Jason Caldwell » June 5th, 2011, 9:13 pm

This was addressed in the official release of s2Member v110605+, available now.
viewtopic.php?f=4&t=6505&p=20121#p16089
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby phrantick » July 20th, 2011, 4:21 am

We have WP 3.2.1 with BuddyPress 1.2.9 and s2Member Pro 110710

In BuddyPress (BP) we have set up a large number of xprofile fields and these fields are visible/editable at the front end. So far so good.

Now we want to integrate s2Member Pro (s2mpro). Previously s2mpro would ignore BP profile fields. But the latest version promised to fix that. And indeed, under General Options, Custom Registration Fields/Options there is now a check box for 'Yes, integrate with BuddyPress Public Profiles.' which I have duly ticked.

But it seems to have no affect whatsoever; when I register a test member the s2mpro regi form does not ask for the BP profile fields. And after registration if we look at the new member's BP profile page no fields are populated, not even their first and last names!

So we added a required field (Organisation Name) into the s2mpro custom registration fields. And this is asked on the s2mpro regi form. And it shows up in the BP profile page. But as a completely separate field - it does not sync into the already existing BP Profile Field called 'Organisation Name'. So now we have two fields called Organisation Name.

Is there any documentation on how to integrate s2Member profile fields with BuddyPress profile?
Do we have to re-define all our wanted profile fields in the s2mpro options?
How do we get it to sync these fields into the existing BP Profile fields?
How do we get it to sync core fields (such as First and Last names) into the BP profile?
User avatar
phrantick
Registered User
Registered User
 
Posts: 12
Joined: December 6, 2010

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby Cristián Lávaque » July 20th, 2011, 7:44 pm

Jason will give much better insight, but what I understand is that it's better to use one or the other, not a mix. The current integration works from s2Member to BuddyPress showing the custom fields in the BP profile, but not the other way.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby phrantick » July 21st, 2011, 2:54 am

Thanks Cristian,

This is going to be a big problem for us. We will have to
1. Redefine all our profile fields as s2member custom fields - not particularly hard to do I admit
2. For all our existing members, transfer all the data from the BP profile fields into the s2member custom fields. Is there any tool or function which can help with this?
3. Remove the BP profile fields
4. Rework ALL the rest of the site (including parts of BuddyPress itself!!!!!) to work with the s2member fields rather than the BP profile fields. This is what really, really worries me.

OR have I got point 4 wrong. You say the s2member custom fields 'show in the BP profile'. Does this mean that any code that looks up a specific BP xprofile field will get the value of the corresponding s2member profile field? Is there some special naming convention which makes this work? Is each s2member profile field auto-synced to a BP profile field auto-created to correspond to it? How do we get the First Name and Last Name to correctly sync into the BP profile?

I sure wish there was some good documentation for this.
User avatar
phrantick
Registered User
Registered User
 
Posts: 12
Joined: December 6, 2010

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby Jason Caldwell » July 21st, 2011, 6:48 pm

Thanks for the heads up on this thread Cristián.
~ and thanks for the great questions.

s2Member's Custom Registration/Profile Fields are now integrated with BuddyPress themes, in several ways, which I've detailed here: viewtopic.php?f=4&t=6505&p=20121#p16089

That is to say, when/if you configure Custom Registration Fields ( aka: Profile Fields ) with s2Member, those Fields can be displayed in public BuddyPress Profiles, they can be edited along with other BuddyPress Profile fields ( if configured ), and can also be filled during registration with the BuddyPress /register/ page. For screenshots, please see this thread, and for configuration options, please check your Dashboard, under: s2Member -> General Options -> Custom Registration Fields -> BuddyPress.

All of that being said, there are some limitations in the current release of s2Member v110710.

1. s2Member Custom Fields integrate with BuddyPress themes, BuddyPress Profile Fields do NOT (yet) integrate with s2Member. In other words, if you want to configure Custom Fields that are compatible with both s2Member and with BuddyPress, you should create them with s2Member.

2. Custom Fields created with s2Member are stored in a way that is unique to s2Member. That is, they are stored in an associative array in the usermeta table, as s2member_custom_fields, and they can be retrieved easily with this API function: get_user_field().

However ( limitation ), if you're running plugins for BuddyPress that depend heavily on the concept of xprofile fields, the Profile fields you configure with s2Member may not be compatible with those plugins. So limitation #2 may actually create a problem for some people that want to use s2Member Fields exclusively. We are working to improve upon this in a future release.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby mmdouce » October 4th, 2011, 12:06 pm

I am using S2Member Pro (v111003) and Buddypress (v 1.5).

I have checked all three boxes in "Integrate Custom Registration Fields with BuddyPress too?" and added the default S2Member fields (Email and Last Name fields) to the Buddpress Profile Fields. The problem I am having is that these "default" S2Member fields are not populating the Buddypress profile fields.

Is there another step/configuration I need to make?

Thanks,
Michele
User avatar
mmdouce
Registered User
Registered User
 
Posts: 5
Joined: August 19, 2011

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby phrantick » October 5th, 2011, 4:40 am

Hi Michele,

I gave up. As far as I can make out s2M does NOT actually 'integrate with BuddyPress' as Web Sharks, and the "Integrate Custom Registration Fields with BuddyPress too?" option might imply. Jason, please correct me if I'm wrong on this, and perhaps provide some documentation on how to integrate s2M and BP!

This is what I've had to do to get profiles working in a BP+s2M combination:
1. Define ALL our profile fields in s2M. The only profile field in BP is the unremovable default Name field, which I have renamed as 'Full Name' (but we pretty much ignore this field and just use the user display_name field for their full name.)
2. Replace the content of our_theme/members/single/profile/edit.php with the following line
echo do_shortcode('[s2Member-Profile /]');
Now, whenever a member goes to edit their profile they end up viewing and editing their s2M profile.
3. Wherever our code extracted info from BP xprofile fields we had to change it to look instead in the s2M profile fields.
4. I then had to write a function to migrate for each existing user all their BP profile data to their s2M profile. We had to run this before removing the fields from BP in step 1. Here's the code for that function, please adapt to suit your needs

Code: Select all
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;
}
 


I hope all this helps.
Cheers
Phill
Last edited by Cristián Lávaque on October 6th, 2011, 2:23 am, edited 1 time in total.
Reason: Improve code readability. http://www.primothemes.com/forums/viewtopic.php?f=36&t=2780
User avatar
phrantick
Registered User
Registered User
 
Posts: 12
Joined: December 6, 2010

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby mmdouce » October 5th, 2011, 10:01 am

Hi Phill,

This info REALLY helps. I so appreciate you sharing your fix for this.

Best,
Michele
User avatar
mmdouce
Registered User
Registered User
 
Posts: 5
Joined: August 19, 2011

Re: Getting Pro Signup Form Fields to Mesh with Buddypress

Postby Jason Caldwell » October 8th, 2011, 7:50 pm

Thanks for the follow-ups.
~ Glad to hear you got things working the way you need them.

Yes, I believe we're on the same page. While s2Member DOES integrate it's Custom Registration Fields into BuddyPress effectively ( recently updated to support BuddyPress v1.5 as well ), it is also true that s2Member does NOT pull any data from your BuddyPress configuration at all. s2Member's integration with BuddyPress Profiles, is a "one-way" integration. That is, Custom Registration/Profile fields that you configure with s2Member, CAN be integrated by s2Member into BuddyPress, as shown here. But, you are correct, this does NOT work the other way around. At least, not yet, as of s2Member v111003.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron