Page 1 of 1

Subscriptions and serial keys / access to special content

Posted: Fri Nov 05, 2010 11:03 am
by rpb3
Just looking for any advice or suggestions anyone may have regarding this situation.

We have created a special section of our site that we want user to pay to access. I currently have it set that only logged in users with admin rights can access that content.

We'd like to create a product on our site that the user could buy and the access the paid for area. Any ideas? Can i create some kind of digital product with a subscription and then check to see if the logged in user had purchased that subscription?

Or should I create a digital product with serial keys and have them enter the serial key to gain access to the area?

Or am I making it too hard? Do you think I could just have them buy a digital product and then go to a special verification page where I could check their order history to see if they have purchased the product? I could store that "verification" in a custom table so they would only have to do it one time.

Thoughts? Advice? Anything?

Thanks in advance...
Rick

Re: Subscriptions and serial keys / access to special content

Posted: Tue Nov 09, 2010 9:19 am
by JaminLeather
When you set up a subscription, you can associate one or more groups with that subscription.

Once you create a new group for the premium content, it is easy to check if a user belongs to that group. Use somethings like the following in Page_Load for your new page(s).

Code: Select all

int premiumContentGroup = 999; //Group ID Number
User user = Token.Instance.User;
if (!user.IsInGroup(premiumContentGroup))
{
  //Redirect user to product page to purchase Premium Content?
}
There are other ways to accomplish what you want to do, but this is probably the easiest.