We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51020
    • 670 Posts
    Hi there,

    I need to create a site where certain pages are for paid members only.
    Ideally the members would pay via a credit card, but otherwise I would be happy to use Stripe/Paypal.
    I'm just not sure where to start. It would be a monthly subscription, so i need to know payments have been made in order for the user to gain access.

    A steer in the right direction would be really helpful.

    Thanks
    Andy
      • 17301
      • 932 Posts
      Take a look a the SubscribeMe extra

      https://docs.modx.com/extras/revo/subscribeme

        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 51020
        • 670 Posts
        Quote from: lkfranklin at Aug 07, 2018, 03:45 PM
        Take a look a the SubscribeMe extra

        https://docs.modx.com/extras/revo/subscribeme


        OK thanks will take a look - hadn't seen that one on my travels.

          • 51020
          • 670 Posts
          Quote from: lkfranklin at Aug 07, 2018, 03:45 PM
          Take a look a the SubscribeMe extra

          https://docs.modx.com/extras/revo/subscribeme


          Unfortunately it seems as though this is no longer supported - there is a message from the Author saying 'don't use it' on the github page.

          https://github.com/Mark-H/SubscribeMe#readme

          Shame, as it sounds good.
          • Yeah, don't use SubscribeMe. Hasn't been supported for years (literally).

            Commerce + User Group Shipment can help with paid members' areas, but that only supports one-time payments currently, not subscriptions. Eventually I'd like to add subscriptions to Commerce, but that's long term thinking and will be a huge undertaking...
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 51020
              • 670 Posts
              Quote from: markh at Aug 08, 2018, 03:06 PM
              Yeah, don't use SubscribeMe. Hasn't been supported for years (literally).

              Commerce + User Group Shipment can help with paid members' areas, but that only supports one-time payments currently, not subscriptions. Eventually I'd like to add subscriptions to Commerce, but that's long term thinking and will be a huge undertaking...

              Thanks Mark. Unfortunately it needs to be a monthly subscription.
                • 46886
                • 1,154 Posts
                I am working on a site similar to this, with slightly longer subscription period. I haven't got all the pieces figured out, but here's what I do have:

                Personalize snippet to hide members-only content

                mhPaypal for payment through paypal (although it seems like you just need a bit of code from paypal for the button to do this well enough)

                Subscribe (not SubscribeMe) for registrations, which I just started to mess with as my login snippet stopped working for some reason.

                For the period issue, you will need to be sure that the registration date is logged, and then you are going to need I suppose a custom snippet that grabs your user database and searches for subscriptions that are perhaps 21 days old, and send out a notification to the user. Also the tool would disable accounts that haven't been paid up. This isn't super tough as its just grabbing the db and sorting.

                Perhaps another way would be like a token for the user based on registration date that counts the time down? I haven't solved this issue yet.

                You may also need to think about whether to activate the user on registration or require them to confirm their email. It could be important as customers may come back and say that they couldn't get in or whatever.

                I also had to worry about people that wont confirm quickly and also wanted to prevent accounts from being deleted due to not being confirmed. So I put this in my login

                    &activationttl = `900`
                    &removeExpiredRegistrations=`0`


                I was messing with the ttl to make it as long as possible, that seems to be when things broke, I haven't been back to fix it yet.

                There are other concerns but I think I got the main ones. I do think the checker to know when accounts expire is an issue, and I realize now that you are going to need a special payment system for returning users, so that the username is fixed and the data about the payment is logged, if you follow my thinking.

                Last but not least I expect to have someone make a tool for automatic registrations upon payment. I've asked some questions about the general concept here over the last few months. For my site, I didn't want to get any user info or anything, just pay and I will use that email for the registration. The payment will trigger email notifications, and I plan to grab that payment data, somehow find the user's email, and then push that into the register snippet.
                  • 51020
                  • 670 Posts
                  Quote from: nuan88 at Aug 08, 2018, 09:53 PM
                  I am working on a site similar to this, with slightly longer subscription period. I haven't got all the pieces figured out, but here's what I do have:

                  Personalize snippet to hide members-only content

                  mhPaypal for payment through paypal (although it seems like you just need a bit of code from paypal for the button to do this well enough)

                  Subscribe (not SubscribeMe) for registrations, which I just started to mess with as my login snippet stopped working for some reason.

                  For the period issue, you will need to be sure that the registration date is logged, and then you are going to need I suppose a custom snippet that grabs your user database and searches for subscriptions that are perhaps 21 days old, and send out a notification to the user. Also the tool would disable accounts that haven't been paid up. This isn't super tough as its just grabbing the db and sorting.

                  Perhaps another way would be like a token for the user based on registration date that counts the time down? I haven't solved this issue yet.

                  You may also need to think about whether to activate the user on registration or require them to confirm their email. It could be important as customers may come back and say that they couldn't get in or whatever.

                  I also had to worry about people that wont confirm quickly and also wanted to prevent accounts from being deleted due to not being confirmed. So I put this in my login

                      &activationttl = `900`
                      &removeExpiredRegistrations=`0`


                  I was messing with the ttl to make it as long as possible, that seems to be when things broke, I haven't been back to fix it yet.

                  There are other concerns but I think I got the main ones. I do think the checker to know when accounts expire is an issue, and I realize now that you are going to need a special payment system for returning users, so that the username is fixed and the data about the payment is logged, if you follow my thinking.

                  Last but not least I expect to have someone make a tool for automatic registrations upon payment. I've asked some questions about the general concept here over the last few months. For my site, I didn't want to get any user info or anything, just pay and I will use that email for the registration. The payment will trigger email notifications, and I plan to grab that payment data, somehow find the user's email, and then push that into the register snippet.

                  Wow thank you for taking the time to explain your process. Looks pretty good!
                  It seems that the ongoing subscriptions is trickier than I thought.

                  If I find anything that helps the issues you mentioned I’ll be sure to post them here.

                  Thanks again
                  Andy
                    • 46886
                    • 1,154 Posts
                    Thanks Andy, no problem on the info HTH.

                    I don't think its that tough, but it would be a custom snippet. Someone who is good with php can probably whip it up fairly quickly. I know not everyone can find a good resource, I've been lucky at times.

                    It might be tough on your db if you have a lot of users, the programmer can figure out how to optimize.

                    Again, it just trolls your user db for older accounts...you could let it run once per day, but the functionality of informing users of the expiry would normally be important, not always i guess. Then a custom page for payment, again it will be different to top off an account rather than make a new one, but that could be seamless (it would just have a slightly different payment code) if say any personal info is gathered in the first stage but then that step doesn't exist at the second. Actually that's a good time to sell more, or have special offers.

                    And then of course the functionality of disabling accounts, you want that part to work well.

                    Thinking about it, I almost feel like it might be better to make like a token, rather than using Modx's createdon date. Just a placeholder value, which has a time stamp, and then the tool would calculate how old the placeholder is...

                    This reminds me of a potentially bigger issue: if you are going to be checking your user db for values, and you have other user data, you might look at ClassExtender which lets you have a lot of custom values for the users and lets you put all your user data in one place.

                    The reason I mention it is, if you will at least be going through your users' data once per day, you might prefer to use CE because it will be easier to access the data, I believe.

                    Modx core is supposed to be the most basic level system, without any bells and whistles which will lead to bloat. So user-management isn't robust. If you need to have user data then CE is probably a very good way to go. You can consider it sort of a Users module