Mapping custom user profile fields

More
12 years 3 months ago #24312 by Scott
Mapping custom user profile fields was created by Scott
I wrote a few custom user profile plugins, and they work great. Unfortunately when I try to map my subscription fields to any of my profile fields, the plugin only shows the user profile fields from the default plugin included with Joomla (even when it isn't enabled :ohmy: ). I tried adding a field to the default Joomla user profile plugin, enabled it, and the new field still didn't show up in the mapping field dropdown.

How can I map my new user profile fields to the fields in my subscriptions? If I need to mod some code, that's OK. Just point me to the right files and functions. Thanks.

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #24408 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Mapping custom user profile fields
Hi Scott

At the moment, the extension only map the fields on subscription form with the fields on Joomla default profile. Maybe you can try to edit the code in the file administrator/components/com_osmembership/views/field/view.html.php to add more fields to the mapping ?

Find the code below and add the other fields you want to the array:
Code:
$fields = array('address1', 'address2', 'city', 'region', 'country', 'postal_code', 'phone', 'website', 'favoritebook', 'aboutme', 'dob');

Tuan

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #24409 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Mapping custom user profile fields
You might also have to look at the user profile in Membership Pro and customize it if needed so that the data will be saved properly. The plugin code is located at :

plugins/osmembership/userprofile/userprofile.php

Hope this help

Tuan

Please Log in or Create an account to join the conversation.

More
12 years 3 months ago #24413 by Scott
Replied by Scott on topic Re: Mapping custom user profile fields
Thanks, Tuan, that does help. I did see that the code in the userprofile plugin only applies to saving. I haven't taken a look at the fields view yet, though so that should get me started. Thanks again!

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago - 12 years 1 month ago #26815 by cmtrig
Replied by cmtrig on topic Re: Mapping custom user profile fields
I have the same issue, I have adjusted the files above, and I still can't get it to populate. I can't get any fields to populate to JomSocial, not even the core ones like address, about me, etc.

I have Joomla 2.5.9, JomSocial Version: 2.8.3

I have found that if you are already Registered and logged in when you go to the MembershipPro registration, it DOES populate the mapped fields from JomSocial - but I need it to work the other way, and populate JomSocial fields that are Mapped when a Non-Member signs up for a subscription.

Either that, or a way to make the MembershipPro system go to JomSocial first, then go right into the Subscription page. Is there a way to do that?

Charlie Trig, Trig Web Design
www.trigwebdesign.com
Last edit: 12 years 1 month ago by cmtrig. Reason: learned more by troubleshooting

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #27838 by Neihl Tutor
Replied by Neihl Tutor on topic Re: Mapping custom user profile fields
hi Tuan,

i did try to add more fields in both files you've mentioned and it appears alright in the custom field. however, when i edit a subscriber and fill the details let say phone which is mapped to userprofile phone as well, it won't appear in userprofile field. any idea please?

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #27864 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Mapping custom user profile fields
Hi Neihl

At the moment, the extension doesn't store the information back to Joomla profile when you update a subscription records from back-end, so basically, it is not possible.

I will consider adding support for it in future releases of the extension.

Tuan
The following user(s) said Thank You: Neihl Tutor

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #94598 by Cheryl Bowman
Replied by Cheryl Bowman on topic Re: Mapping custom user profile fields
Any update on this? I looked (as per the above links), but I have the newest version and that file isn't in that spot. I want to add another field to the member profile that shows up on the front end when you click the agent's name. Specifically, I'm doing a subdomain for certain plan users, and the link to their subdomain needs to show up as part of the agent's contact information when a user clicks on the agent's name.

I added the field in MembershipPro, but it doesn't show up - looks like it needs to be in OSProperty, but OSP doesn't have a function to add a custom field to the profile (looks to be only for properties).

Please Log in or Create an account to join the conversation.