January 24, 2010 at 10:50 pm #699
I have purchased all 3 plugins (Store, Affiliate & Membership) and all works fine so far…
But I am wondering if it is possible when a purchase is made, that a customer can be integrated with Simple Press Forum ( for customer support )…
Essentially all that is needed is for a new user to be assigned a WP role (like subscriber, author, editor, etc). Or any of the Roles created by Role Manager.
I think that this would be a nice addition to your plugin on a per product basis…
If there’s an easier way to integrate with SPF, I’m all ears!
MattJanuary 25, 2010 at 12:44 am #17503
Hi Matt, When you use the “WordPress Integration” feature of eMember it will create a wordpress user with the specified role whenever a new Member signs up.
The other option is to automatically create a WordPress user with a defined role for every purchase.
Do you have a bit of code that does the above (it should be pretty easy) then I can tell you how to integrate that piece of code with every purchase.January 25, 2010 at 2:16 am #17504
Unfortunately, I don’t have any code to share…
I do use the “WordPress Integration” option to create a new WP user with a default role of “subscriber”, but I’d like to have each product be allowed to be assigned a different role (product A is “subscriber”, and product B is “contributor” – or something like that).
Simple Press Forum already understands (and in fact expects) WP roles to be used, which makes integration on that end a breeze….
I think it’s just a matter of allowing each product to specify which role to use when it creates the WP user….
or I could be wrong
I think that others would benefit from this (again, I could be wrong), so I was envisioning a drop down in the product creation that would search the current roles in place (so that Role Manager plugin could be used), and allow the new users to be assigned that role when created….
I don’t know if this is a eStore or eMember modification though…
If you don’t have time to look into this, a few hints on where to look would be helpful as well.
MattJanuary 25, 2010 at 8:31 am #17505
I checked into this further, and came up with some pseudo-code that should make this fairly simple for you to integrate…If this isn’t what you were looking for for code, let me know.
The code is obviously vague & generic, but you should see how it fits into your store plugin…
1. Display Dropdown
$roles = array_keys($wp_roles->role_names)
foreach($roles as $index=>$role)
2. On Save – Set per product option
$storeoption['prodnum']['role'] = $_POST['role_option'];
3. On User Create
$user = new WP_User($id);
Things to consider:
if a user exists (for another product perhaps?), then the highest role should be used.
If a product role changes (not a good idea, I know), then there should be an option to either change all users, or to set the new role from this point forward. (Or just pick one, and we can all live with it )
I hope that’s a bit more informative of what I’m looking for, and how you could implement it in your plugin.
If you intend to implement this, please let me know. Otherwise I’ll make plans to make due with a single membership forum.
MattJanuary 25, 2010 at 8:51 am #17506
One more quick thing… (tr. A few more last minute thoughts)
I just noticed that your store doesn’t set a user at all, but your membership plugin does (and hard-codes with builtin WP roles)….
Would it be easier/better for me to create a user/role on successful return from PayPal?
Is there a way to create roles from your membership levels, or use existing roles as membership levels with your plugin?
Thanks for taking the time to look at this….
Regardless of what solutions I’ve come up with, just remember that my problem is getting seamless integration of your plugin with a support forum.
MattJanuary 25, 2010 at 10:03 am #17507
The WP eStore does not do anything with WordPress user. I don’t plan to give eStore the knowledge of WordPress user’s Role management as it falls under the realm of Membership plugin.
As I have mentioned before you can add this functionality with manual tweaks. Basically in the post payment processing script you will have to add in a bit of code that handles this wordpress user creation with the proper Role settings.
The eMember plugin can now be configured so each different membership level can have a default WordPress Role settings. Then when a member signs up in that membership level he/she will have that WordPress Role assigned to him. I have sent you an updated version of eMember so You can see this functionality.January 25, 2010 at 10:12 am #17508
Wow, that’s awesome…
The only thing that would need to be updated is to query for new roles, and not just the defaults that WP uses… ( so that custom roles with Role Manager can be used)
Thanks for updating this (and so quickly)
You guys rock….
MattAugust 30, 2010 at 2:27 pm #17509pilotjoeMember
Hey everyone.. I know this thread is a bit old.. but I just installed eMember and noticed a problem with eMember and simple press. It seems, that on certain platforms… the eMember register button does not work while simple press is activated.
I checked multiple different browsers, firefox, i.e. and chrome.. all behave the same way. I had several visitor tell me that they could not register as well as my wife (lol). the good news I was able to test with her laptop and found that it was simple press causing the issue.
I believe it maybe a jquery issue? I’m no expert, but I think the registration form is checking to see if the user name is available and hangs with simple press loaded. Now, I am syncing the eMember DB and WordPress DB (not sure if this matter, simple press uses the WP DB).
Anyway, I was just curious if anyone had seen this behavior. I have disabled the forum for now until I can get the two plugins to play nice with each other.
JoeSeptember 26, 2010 at 12:44 pm #17510IMGIGClubMember
Referring back a few posts on this page:
The eMember plugin can now be configured so each different membership level can have a default WordPress Role settings. Then when a member signs up in that membership level he/she will have that WordPress Role assigned to him. I have sent you an updated version of eMember so You can see this functionality.
My eMember is not setting the custom WordPress role, although it has the field on the admin screens – and I have configured it. When I have a new user purchase, their role is set to ‘subscriber’ and not to the custom setting for their membership.
Is there something I might be doing wrong using this? How do I check if I’ve got the proper version of eMember where this is implemented?
VERY much looking forward to automatically getting people into a particular forum inside my Simple:Press forum based on their role!
TimSeptember 27, 2010 at 7:26 am #17511
If you customize the “Role Names” then I will have to checkup on that. I will send you an email.September 27, 2010 at 9:06 am #17512IMGIGClubMember
Looking forward to it, Amin! It will be really nice to have users automatically getting access to particular forums based on eStore / eMember sales.
I have two systems that I want to do this on so far. One will have a role named like “videos”, and the other will have a role called “private-coaching”. Once those are working, I’ve got more planned.
- You must be logged in to reply to this topic.