Send a user to the payment plans or log him off

  • x-bit
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 3 months ago #149039 by x-bit
Hello!
I'm sure this is possible but I can't get it to work.
With our previous membership component, we sent users with state "expired" to the payment plans for extending their membership. If they didn't extend, they got logged of (so it wasn't possible to browse the site in state "registered" without a valid payment plan). This was useful as we depend the possibility to download documents just over the fact that somebody is successfully logged in and can browse to the download page.

Please let me know how I can get this to work with Membership Pro... thanks!
 

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

More
2 years 3 months ago #149043 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Send a user to the payment plans or log him off
Hello

We do not have this feature available, unfortunately. I would suggest you to use a different setup:

1. Assign subscriber of your plans to a new user group such as Paid Members. Handle that via Joomla Groups plugin membershipprodoc.joomservices.com/joomla-groups-integration

2. Only allow users of that Paid Members user group to access to your resources (for example, download documents) instead of allow Registered users to access to these resources

That is how it should setup in Membership Pro

Regards,

Tuan

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

More
2 years 3 months ago - 2 years 3 months ago #149048 by Jeff Stone
Replied by Jeff Stone on topic Send a user to the payment plans or log him off
When you create a plan, you need to create a custom User Group in Joomla and then a Custom Viewing Access Level for that new User Group - when a user joins a plan, assign them to that group - you also need to use the Membership Pro - Joomla Groups plugin, and then you will have the Joomla Group Settings tab on the Plan Manager - Edit Subscription Plan where you can set what User Group they will be in, and what Group they will be removed from when they register and reverse when they expire:

When Subscription Active
Assign To Joomla Groups
- - - Members Only
Remove From Joomla Groups
- Registered

When Subscription Expired
Remove From Joomla Groups
- - - Members Only
Assign To Joomla Groups
- Registered

So, when they are Subscribed they have access to content that is set to "Members Only" that "Registered" users don't/wont have access to - and when expired, they will no longer have access to "Members Only" content, just "Registered" level content until they renew their subscription. 

There is also a plugin that you can restrict access to portions of Joomla Article content by using the Content - Membership Restriction plugin and adding the following code inside your articles that want to be restricted:
Code:
Regular, Unrestricted content available to everyone will be visible {mprestriction ids="1,2"} Joomla article content that you want to be hidden from everyone (Public, Guest...) except for your paid Subscribers "Members Only" as in this example... ids="1,2,3" where 1,2,3 are your plan ID's{/mprestriction} you can also modify your Emails & Messages to include a link <a href="[SUBSCRIPTION_URL]"><strong>click here</strong></a> to your Paid plan.{/mprestriction] Regular, Unrestricted content available to everyone will be visible


Hope that helps
Last edit: 2 years 3 months ago by Jeff Stone.

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

  • x-bit
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 3 months ago - 2 years 3 months ago #149062 by x-bit
Thank you both, Jeff and Tuan, for your appreciated answers!

I understand what I have to do, but I'm not clear how to do it.

Thinking about it I would have to, after migrating the users from our previous subscription component, assign those with an active status to a special group. As we have about 23.000 profiles in our database, I'm asking myself how could I do that in an automated way? Manually this task wouldn't be possible.

Any ideas how I could batch change active users in Membership Pro to a group would be highly appreciated.

EDIT:
As we were using the same user group for all users, the only distinction would be if a user has an active plan. The migration has been doing this correctly, so looking at Membership Pro it shows me the correct status of the users (active / expired).
The question remains: How could I change the users with status "active" in Membership Pro to an other group by batch? All other statuses can be ignored as they aren't active at the moment.


 
Last edit: 2 years 3 months ago by x-bit.

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

More
2 years 2 months ago #149181 by Jeff Stone
Replied by Jeff Stone on topic Send a user to the payment plans or log him off
There is the ability in Joomla's Manage Users to "Batch" Add/Delete/Set to a user Group. Use the Search drop-down to filter by the group of users you want to move - select all (I wouldn't recommend doing more than 100 at a time within the Joomla User Manager - if you have any experience with the Joomla database and PHPMyAdmin, you could probably run a sql command to process this faster) and click on the batch button in the upper toolbar - Select the Group you want to move them to, and select the "Set to Group" and whether or not you want to require they reset their password on next logon... you will have to repeat these steps until you have moved all of your users to the Group you want them in.
   

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

More
2 years 2 months ago #149186 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Send a user to the payment plans or log him off
In latest version, we can trigger Joomla groups plugin for active subscribers and they will be assigned to the expected user group. To trigger that process, we just need to run this url:

domain.com/administrator/index.php?optio...&plugin=joomlagroups

However, since you are using old version, I might have to adjust the code on your old installation abit before it could be used with that large number of subscribers

Regards,

Tuan

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

  • x-bit
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
2 years 2 months ago - 2 years 2 months ago #149194 by x-bit
Thank you Jeff for your ongoing help.

Yeah, I'm aware of Joomla's batch functionality but this won't help me in this case as all the users are on Joomla's status 'Registered', those with active memebership and those with different status (cancelled, expired and so on).

So I would have to change the user group only for those which are marked 'active' in Membership Pro, otherwise I would re-activate even expired users and that isn't possible with Joomla... At least I'm not aware of any possibility to to this.

Tuan, I'm grateful for your help and for your support. I understand that we are really asking a lot from you guys but we have to get through this so we can update in the future. I can't thank you enough!
Last edit: 2 years 2 months ago by x-bit.

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