By Bruce Dill on Friday, 10 August 2018
Posted in Technical Issues
Replies 13
Likes 0
Views 591
Votes 0
I am integrating EasySocial into an existing product of services. New members pay a membership fee. These new members are assigned to Joomla user groups automatically.

On the EasySocial side new users need to be assigned to specific Profile types depending on the type of membership they purchase.

How can I accomplish this?

Thank you!

Bruce
Hi Bruce,

I'm not really sure which existing product of services that you're using to integrate with Easysocial,
but this can be accomplish by integrate Payplans and EasySocial.
Where you can further read it in our documentation here: https://stackideas.com/docs/payplans/administrators/integrations/easysocial-profiletype
·
Friday, 10 August 2018 11:23
·
0 Likes
·
0 Votes
·
0 Comments
·
How do I set a user's profile type without using a payplan? I looked in Users and I can't find a field.
What file is it set in?

Thanks

Bruce
·
Friday, 10 August 2018 16:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Bruce,

If you want manually change the user's profile type you can do it in the backend as shown: http://take.ms/xHacB
If you want to know the file that you can pass in it is actually in the file:
.../administrator/components/com_easysocial/models/profiles.php
function updateUserProfile
·
Friday, 10 August 2018 17:00
·
0 Likes
·
0 Votes
·
0 Comments
·
What file in the database contains the profile type for the specific user?
·
Friday, 10 August 2018 17:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Bruce,

Do you mean you want to change the user's profile type in database?
It is actually not advisable to do that as changing user's profile type is not effected only one table
·
Friday, 10 August 2018 18:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, I want to change it in the database. I know you might not advise it but please educate me. Why do you not advise changing the database file(s)?

We do not actually want to "CHANGE" a user's profile type. We want to set the initial profile type before the user can access EasySocial.

What exactly happens when you change a user's profile manually using the "Switch Profile" button? What database files are changed?

I am not able to use the paid profile app because our entire website requires some type of membership. If our site was ONLY an EasySocial site then we would use the Stackideas Paid Membership App.
·
Friday, 10 August 2018 18:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Bruce,

I am sorry that i still not really understand what you trying to achieve here.

Can you elaborate more details as what happen when the user sign up on your site after done the payment?
e.g.
- what will happen when user subscribe free plan?
- what will happen when user subscribe premium plan?

And which kind of Joomla user group you allow user to access Easysocial page?

The reason why i need to understand this is because i would like to see whether i can provide you a better suggestion to do this or not, if not every time new user register on your site, then you have to manually update the data from database?

If that is the case, that will very difficult to update if there got 1000 user sign up on your site at the same time.
·
Saturday, 11 August 2018 12:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Bruce, I've run into the same thing. I considered moving to PayPlans to achieve this but it is unworkable for those like me who already have a membership system and there is no real migration path. My existing membership system already changes the users Joomla group based on membership level and whether that membership is expired or not. Most of this is done with a direct database update so there is no real event (like on JUser::save() )that a plugin could be developed for. If yours already does the same what you could do is write a small cron script to run on it's own that updates the easysocial profile field for a user (xxxxx_ social_profiles_maps) based on their group (xxxxx_user_usergroup_map). It's a direct database update and though Arlex states he wouldn't do that I don't see where else in the database the ES profile type is updated per user. I believe, btw, that even PayPlans in some instances does not trigger some events so the integration is not complete there, either, even with the profile type app running with it.
·
Monday, 13 August 2018 08:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Steve for your insights on this, and yes that's is better way, where you can run some script to update the database.
And yes, Bruce as my colleague mention in previous reply, we should consider the situation if your site have 100 user sign up at a time. That could be a nightmare to manually update it in the database manually
·
Monday, 13 August 2018 11:38
·
0 Likes
·
0 Votes
·
0 Comments
·
What I am thinking about doing is creating a custom field in the membership plugin for each membership type. This field would correspond to a specific Profile Type. When the membership record is saved,the profile type would be set. This would eliminate the need for a cron.

Thoughts?

Also, I still need to know what SQL database tables would need to be updated regardless of which rout we go.

Steve, thanks for your input.

Fadhli, thank you also and for the good service.

Bruce
·
Monday, 13 August 2018 20:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Bruce,

Kindly find my response for your inquiries below:
What I am thinking about doing is creating a custom field in the membership plugin for each membership type. This field would correspond to a specific Profile Type. When the membership record is saved,the profile type would be set. This would eliminate the need for a cron.
Thoughts?

That is also a great idea Bruce

Also, I still need to know what SQL database tables would need to be updated regardless of which rout we go.

The effected tables is social_profiles_maps, social_fields_data, social_privacy_items
·
Tuesday, 14 August 2018 11:55
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post