<![CDATA[ Login and/or SubscribeMe? - MODX Community Forums]]> https://forums.modx.com/thread/?thread=102450 <![CDATA[Login and/or SubscribeMe?]]> https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552022 Thanks.]]> zinturis Jun 24, 2017, 10:28 PM https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552022 <![CDATA[Re: Login and/or SubscribeMe?]]> https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552085 markh Jun 27, 2017, 05:23 PM https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552085 <![CDATA[Re: Login and/or SubscribeMe?]]> https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552064 ClassExtender extra to extend the modUser Object and add your fields. They would go in a separate table, but still could appear on the Create/Edit User form in the Manager. I would use Subscribe (and Notify if you need to send messages to your users). I think a postHook on the Register snippet could save the user data from the Register form to the extended user fields (and record user preferences if you need them for Subscribe -- e.g., email preferences).

I'd separate the PayPal process to a separate page with a snippet or processor that would get the information back from PayPal and set the appropriate extended user fields, and forward the user to a welcome page with a link, or links to where they might want to go.

I'd also put a simple snippet on the protected pages (or in their template) that checked the custom table to see if the user had a current paid subscription, and if not, forwarded them to the PayPal page, perhaps with a $_POST or $_GET variable indicating if they were new (never paid) or needed to renew.

Another approach (still using Subscribe and the general techniques above) would be to shoehorn your user data into unused fields in the modUser or modUserProfile objects:

modUser:

remote_key (string)
remote_data (json)
hash_class (string)
createdon (timestamp)

modUserProfile:

mobilephone (string)
dob (integer)
gender (integer)
address (string)
country (string)
city (string)
state (string)
zip (string)
fax (string)
photo (string)
comment (string)
website (string)
extended (json)

That would avoid extending the modUser object, but would require some messing with the Lexicon strings used for the field captions, and you'd have to remember which field held which data, since the field names wouldn't tell you. You'd also need check the field lengths in the DB to make sure your data would fit.

Hope this helps. smiley

]]>
BobRay Jun 27, 2017, 05:54 AM https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552064
<![CDATA[Re: Login and/or SubscribeMe?]]> https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552056 So, which one is better in this case? I saw Bob you are a developer of the Subscribe add-on so probably you know this one better than anyone else.
It would be great to have one big serious module for ModX instead of few small ones for full registration functionality: free and paid registrations, usual members and subscriptions with and without expiration, optional custom fields for DB to store site specific info about users.]]>
zinturis Jun 26, 2017, 09:29 PM https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552056
<![CDATA[Re: Login and/or SubscribeMe?]]> https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552034 zinturis Jun 25, 2017, 10:14 PM https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552034 <![CDATA[Re: Login and/or SubscribeMe?]]> https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552024 modx.com/extras. That doesn't mean that it won't work, but it wouldn't be too surprising if it didn't work with the current version of MODX.

The Subscribe extra (not to be confused with SubscribeMe) is an option, but it doesn't do payments. It might be possible to combine it with a PayPal platform, but I've never tried it.

Another option would be the Register snippet (part of the Login package) combined with mhPayPal. It will gather information in a form will and run other snippets as "postHooks". I think it might also be possible to have an mhPayPal snippet tag and a Register snippet tag (or a tag for a modified version of the Register snippet) on the same page that processed selected information in the same form.

Since Subscribe uses the Register snippet, you could also add Register postHooks there too. Subscribe is really helpful if you want to let users manage their preferences (like tags/interests) or user group memberships.



]]>
BobRay Jun 24, 2017, 11:02 PM https://forums.modx.com/thread/102450/login-and-or-subscribeme#dis-post-552024