The Man Can!
Testers

Posts: 282
|
 |
« on: Oct 19, 2007, 02:31 AM » |
|
This is an auto-generated support/comment thread for FoxyCart Webuser Paid Subsciptions. Use this forum to post any comments about this addition or any questions you have regarding its use. Brief Description:Paid webuser subscriptions for MODx. Allows you to use FoxyCart subscriptions to manage webuser permissions. Useful for creating a paid members only section, paid blog subscriptions, paid premium content subscription, etc. Could be modified to use a non-subscription product as well (one-time payment for unlimited access). NOTES:This is working on one site so far, but we're assuming there are going to be issues with it, so please post comments on this thread so we can tighten it up. Also worth noting is that Joey (Tilted Symmetry) authored this package.
|
|
|
|
« Last Edit: Oct 19, 2007, 02:40 AM by The Man Can! »
|
Logged
|
|
|
|
cuervo-gold
Jr. Member

Posts: 11
|
 |
« Reply #1 on: Nov 26, 2007, 04:52 PM » |
|
Great addition! The only issue I am having is that the WebUser needs to log out and back in order for their new group to take effect. Do you know of any way around this?
I guess modx doesn't query the webuser's permissions on each page load...there should be a way to force it though.
Thanks for the great snippets and plugins!
John
|
|
|
|
|
Logged
|
|
|
|
The Man Can!
Testers

Posts: 282
|
 |
« Reply #2 on: Nov 26, 2007, 04:56 PM » |
|
Glad you like it, John. We actually just added some functionality that should make it possible to (effectively) share passwords between FoxyCart and MODx, so we could actually streamline the process a bit, since it is a little awkward currently. If you're interested let me know. If you have enough PHP / MySQL experience to help it'd be even better 
|
|
|
|
|
Logged
|
|
|
|
cuervo-gold
Jr. Member

Posts: 11
|
 |
« Reply #3 on: Nov 26, 2007, 05:08 PM » |
|
I am definitely interested in any shared password streamlining. We are handling it a little differently since the site will have two access levels, one for free memberships and one for paid. What I am doing is having a standard link to the signup for the free membership and then if they have the free membership, pushing them to upgrade. I am relatively new to the MODx platform and an intermediate (or is that remedial?) PHP/MySQL developer. I basically know enough to be dangerous!
|
|
|
|
|
Logged
|
|
|
|
danthach6
Jr. Member

Posts: 15
|
 |
« Reply #4 on: Jul 07, 2008, 04:40 PM » |
|
Hi, I just installed this snippet. I am trying to understand the directions. I have been using Modx for a couple months, and have just started using foxy cart.
I have created TVs for "code" and "webGroup". I'm not sure how they are used by the subscription manager though. I uploaded the foxycart_webuser_subscriptions folder to my server. I created the snippet - FoxyCart_Subscription_Manager, entered the parameters: Datafeed Key Phrase: mydatafeedphrase Product ID TV Name: Subscribe895 Web Group TV Name: Join Ranch Pride Log File (optional): I created a blank page with the snippet call "[!FoxyCart_Subscription_Manager!]" and made sure my data feed key were identical on the snippet and my foxycart admin. I create the chunk for RegistrationLink, and changed the id to my product page's id. I created the chunk for SubscriptionLink, and changed all the variables to my variable, however i dont know what to change "userID=[+userID+]" to. I created the snippet "FoxyCart_Subscription_Link". I created the plugin - FoxyCart_Subscription_Manager. I edited the variables "$tvCode", "$webGroup", "$grace" to my variables in plugin.FoxyCart_Subscription_Manager.ph p. I created a product page and added this call "[!FoxyCart_Subscription_Link? &subLinkTpl=`ChunkName` ®LinkTpl=`RegLinkChunkName` &pageID=`56` &URLproductName=`longtitle`!]", I changed ChunkName to SubscriptionLink, and changed RegLinkChunkName to RegistrationLink, and changed the '56' to the product's pageID. I put "Subscribe895" in the code field, and "Join Ranch Pride" in the webGroup field.
I still receive this error "error: no post data" on my subscription manager document. Could someone tell me what I do wrong please? Thanks
|
|
|
|
« Last Edit: Jul 07, 2008, 04:49 PM by danthach6 »
|
Logged
|
|
|
|
The Man Can!
Testers

Posts: 282
|
 |
« Reply #5 on: Jul 07, 2008, 04:59 PM » |
|
If you load that page in your browser, that's what you should get, since you're loading it and there isn't any post data. In other words, if you just load the page, there's no XML to parse, right? So that's the correct error response. When you set FoxyCart to send the XML to your page, that's when it'll function. There should be some instructions in there for how to set up your FoxyCart XML datafeed. If you want to test a little easier, use these two scripts. Send the XML (in the FoxyCart admin) to the "write to file" script, so you can get a copy of exactly what's being sent. Then use the second script to post that XML to your MODx document to make sure things are working as expected. That can be much easier than placing a bunch of orders and waiting to see if it worked. (Though that'll of course work too.) If I've totally missed your question, I apologize. This snippet's a bit tricky to set up, and the documentation's long, so if you need more help just ask.
|
|
|
|
|
Logged
|
|
|
|
danthach6
Jr. Member

Posts: 15
|
 |
« Reply #6 on: Jul 07, 2008, 05:18 PM » |
|
Hey thanks for the quick reply. I am also new to XML also  . So would I need to process some kind of transaction to see the results of these 2 snippets? I just read the datafeed wiki, okay I answered my question. I'll try this out later tonight. Thanks!
|
|
|
|
« Last Edit: Jul 07, 2008, 05:20 PM by danthach6 »
|
Logged
|
|
|
|
bob1000
Member
 
Posts: 71
|
 |
« Reply #7 on: Jul 07, 2008, 05:21 PM » |
|
When you view your product page, do you see either the subscription link or the registration link appearing?
If you do, do both these links work?
You don't need to change "userID=[+userID+]" to anything. The placeholder will be replaced by value of the user ID if you are logged in and be used to add the subscription to that user account.
|
|
|
|
|
Logged
|
|
|
|
danthach6
Jr. Member

Posts: 15
|
 |
« Reply #8 on: Jul 08, 2008, 10:47 AM » |
|
bob1000, you are correct. I only see the RegistrationLink chunk not the SubscriptionLink chunk. I was confused about the "RegistrationLink" chunk. The directions say: <a href="[~555~]">Register to Subscribe</a> <!-- '555' should be replaced with the ID of the page that contains your subscription form --> Is this subscription form my product page? If so, should my product page call the RegistrationLink which is just the product page?: [!FoxyCart_Subscription_Link? &subLinkTpl=`SubscriptionLink` ®LinkTpl=`RegistrationLink` &pageID=`77` &URLproductName=`longtitle`!] Is the pageID, my product page? Sorry, I am so lost on how all these parts tie into each other, and just trying to understand how exactly this snippet works. Oh and lastly, for the "SubscriptionLink" chunk, I should only leave the userID as a placeholder and replace the other placeholders, correct? <a href="http://yourdomain.foxycart.com/cart?code=[+product_code+]&name=[+URLproductName+]&price=[+product_price+]&sub_frequency=[+product_sub_frequency+]&amp;userID=[+userID+]" class="foxycart">Subscribe</a> And what do those TVs "code" and "webGroup" do in this whole process? Thanks for your help bob1000 and the man can! The good news, is the snippets to read the XML data feed works for me, so I am almost there! 
|
|
|
|
« Last Edit: Jul 08, 2008, 11:04 AM by danthach6 »
|
Logged
|
|
|
|
The Man Can!
Testers

Posts: 282
|
 |
« Reply #9 on: Jul 08, 2008, 12:42 PM » |
|
The code is important and needs to be unique, as that's how the snippet recognizes the subscription in the XML.
The webGroup is the webGroup you want to add your users to when they subscribe. The directions say to make it a TV, but if you only have one group you care about you could just as easily hardcode it into the chunk. (If it's a TV you could conceivably use the same snippet/chunk combo to have many products like "regular membership" and "premium membership" or etc.
The confusion between the registration and subscription bits is totally understandable, and there's actually a different (arguably better) way to handle the whole process. As is, you can't add a subscription unless you're a logged in webuser. So the Subscription_Link snippet checks to see whether or not the user is logged in. If they are, they can buy the subscription. If they're not, they need to register first, then come back to subscribe.
(That could be modified to allow subscription if they're _not_ logged in, and just have MODx create a webuser automatically with a synched password to what they just entered in FoxyCart. That'd be a better way, I think.)
Does that make more sense?
|
|
|
|
|
Logged
|
|
|
|
bob1000
Member
 
Posts: 71
|
 |
« Reply #10 on: Jul 08, 2008, 04:26 PM » |
|
Brett, That would be a great modification to the snippet if it could auto generate a MODx user account.The more subscription options the better. I use a modified version of the subscription_link snippet myself. It's called from the user profile page and displays a subscription link if the user hasn't yet subscribed or if it has expired and displays the expiry date if the subscription is active.
Danthach6, I think Brett explains the subscription_link snippet well but just to confirm. The snippet checks to see whether the user is logged in or not. If they are, the subLinkTpl chunk is displayed, if not, the regLinkTpl chunk is displayed.
For your "SubscriptionLink" chunk, you need to leave the userID placeholder as a placeholder so that it picks up the ID of the logged in user and adds the subscription to the right account. If you only have one type of subscription, you can hard code all the other values into the chunk. Otherwise, you will have to create a TV for each of the values and apply those to the template your product page uses. So a TV called product_code, one called product_price etc. If you have more than one type of subscription you're better off creating the TVs and leaving the placeholders in.
If you need more help, I've written some documentation on this. It's not completely finished but it might help.
|
|
|
|
|
Logged
|
|
|
|
danthach6
Jr. Member

Posts: 15
|
 |
« Reply #11 on: Jul 09, 2008, 09:27 AM » |
|
Bob1000, I would greatly like to read your documentation. Thanks for the help!
|
|
|
|
|
Logged
|
|
|
|
leapy
Jr. Member

Posts: 49
|
 |
« Reply #12 on: Jul 09, 2008, 10:37 AM » |
|
Forgive my ignorance.
I have just stumbled upon this Foxycart integration - which is a terrific idea and may be perfect for what I need.
Bob1000, if your documentation would bring me up to speed rapidly, I may be able to contribute in some small way to the coding effort in addition to getting a working subscription system up and running.
Lee
|
|
|
|
|
Logged
|
|
|
|
|
s9
|
 |
« Reply #13 on: Sep 06, 2008, 10:57 PM » |
|
We have a scenario where there are three levels. Guests can see a certain amount of material we'll call Area A. Most people choose to register for free (using just MODx registration) and then get access to more material (lets call it Area B) and get enrolled in a newsletter. Only about 10-20% will upgrade to the extended content area (Area C) and special newsletters (an additional segmentation of the newsletter).
Should Area C people's monthly subscription lapse, will they still fall back to being a registered user and have access to Area B?
Okay, I feel like I just wrote one of those "if the train to Portsmouth is going 40 miles an hour" logic problems, haha.
Also (not necessarily a question for Luke or Brett although you guys might have some thoughts on this) what is the best newsletter software to use for this implementation? I like MailChimp's features, but also have seen that Campaign Monitor / MailBuild might have some integration history with Foxy/MODx. Any suggestions on how to structure the setup of the two newsletter segments?
Thanks!
John
|
|
|
|
|
Logged
|
|
|
|
The Man Can!
Testers

Posts: 282
|
 |
« Reply #14 on: Sep 07, 2008, 12:34 AM » |
|
This snippet could do that but would take just a smidgen of modification, but FoxyBack would likely be a more solid solution. Fwiw, I think a look at FoxyBack might be better than this snippet, but it's a bit more involved (but it'll handle more functionality like MailChimp integration). (The "expiration" functionality isn't built into FoxyBack yet though, so it wouldn't work right now, but it'll likely show up in FoxyBack soon (or sooner if you want to contribute it  .) MailChimp's super solid, as is Campaign Monitor (or MailBuild). They're all supported with FoxyCart at http://wiki.foxycart.com/integration, but I know that Ryan's a big fan of MailChimp so if any MODx tie-ins come they'll likely come for MailChimp before anything else.
|
|
|
|
|
Logged
|
|
|
|
|