We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29181
    • 480 Posts
    Hi there,
    I’m looking for a little advice in reference to the subject title, allow me to outline my requirements.

    1: I need to setup a website with a protected area (that bit will be easy enough.)

    2: There are already a list of existing users which I will need to populate the correct table with. (Currently they are in Excel, so I don’t see too many difficulties getting that into a CSV file which I can hopefully use in conjunction with PHPmyAdmin.)

    3: To gain access to said protected area the user not only needs to register, they also need to purchase a subscription.

    4: After they have purchased a subscription they will be given a unique Number which will act as their login / user name.

    5: They will be able to access their own details and change them (apart from the unique ID). I’m hoping PPP will be OK for this.

    6: I need some way of storing when they first subscribed, so that I can cancel their access when their subscription runs out. Something else that will probably need implementation is an email a week in advance warning them

    So for 3 & 4, does anyone have any idea as to how I can implement the subscription purchase? I’ve read about foxycart which seems like a possibility, but is there any way for me to automate the process? The user purchases a subscription and can then directly access the protected area? Am I going to have to have someone receive an email and then manually login and update that users group? Another thought was maybe to use Kiwieecommerce, because then I’m already in ModX and can possibly automagically update that users group?

    For 6, I have heard about cronjobs, but have never used them in before. Would they be an option, check thru the table once a day and either kick them or send an email if it’s a week before expiry?

    That is currently about all the information I have (The client is the other side of the pond)

    I’ll look forward to any suggestions, in particular if anyone has had to do something similar in the past.

    Thanks for listening,
    Taff

      Adrian Lawley: www.adrianlawley.com
      • 727
      • 502 Posts
      For 6 you can run a php script as a cron job. For example write a PHP script that uses the MODxapi.php file (forgot the exact name, but it is in the resources) and you can then access the tables using $modx->db->... Next create a cronjob that runs http://www.foo.com/updatesubs.php (for example).

      For the others I am sure they are all possible somehow. I’ve only used PayPal and with the IPN (instant payment notification) PayPal calls a script on your webserver to let you know immediately of a purchase. You can use that script to update the tables, send out emails, etc. PayPal also supports subscriptions.

      Andy
        • 29181
        • 480 Posts
        Andy,
        firstly thanks for answering. I was hoping to get a reply of that quality smiley

        Maybe I can talk the client into solely using Paypal to pay for a subscription. It sounds like that would be a good way of attacking the problem judging by what you wrote. So you’ve used paypal to setup something similar to this in the past? If so, any other info, links or pointers would be a great boost. (They want the project done by the end of the month, and up until now all I’ve seen is a PSD. )

        As to cronjobs...that sounds so simple even I will have trouble breaking it.

        Thanks again,
        Taff
          Adrian Lawley: www.adrianlawley.com
          • 29635
          • 361 Posts
          A little late to the party (and past your deadline), but we made an automated solution for paid user subscriptions with FoxyCart + MODx:
          http://wiki.foxycart.com/integration:modx:usersubscriptions
          http://www.modxcms.com/FoxyCart-Webuser-Paid-Subsciptions-1682.html

          I’m bummed it came too late for you. Maybe next time wink
            Need MODx Ecommerce? Try FoxyCart!
            • 29181
            • 480 Posts
            Thanks for the answer Brent. Actually the client has been dragging their feet no end. The website is live but we have not installed any shopping cart solution as yet. They couldn’t tell me what exactly they wanted to sell etc. and what quantity they expected to sell...

            All the normal things that slow down development once a client has to make a decision.

            Thanks again.
              Adrian Lawley: www.adrianlawley.com
            • Greetings Taff,

              As Brett pointed out, Foxy Cart can handle the paid membership access of your site. I’ve just launched a website that has a paid membership component using Foxy Cart: http://www.bosufitness.com

              It works great!
                Precision Web Development ... SmashStack.com