Hi all,

Has anyone done subscription-based access or other e-commerce modules?

I'm not looking at anything sophisticated. I'm doing an online games site where there will be a play for cash area and a subscribers only area. What I'm looking for is examples of other people doing similiar things that I can use as a base to build on.

Patrick

Comments

dries’s picture

I don't think anyone made such module yet, but it should be fairly easy given the fact Drupal supports both (a) user permissions and (b) user roles.

moshe weitzman’s picture

i did some experimenting with this type of feature. i didn't have much luck ... first, some assumptions.

a site has different classes of users on the site. a user sees only the content which is available to his class. content means forums, images, stories, etc. for simplicity, assume we have only paid and unpaid members.

on the user side, it isn't hard to imagine a function which changes the role of a user to 'paid' once he submits a certain form or whatever. no problem so far.

but we still have a problem with access control. we cannot assign access on a story by story basis. the unpaid role either has access to the node type 'story' or doesn't. one way around this is to create another node type called story_paid. then rename the module and its all of its functions, and finally assign permission to that story type only to role=paid. now repeat that renaming process for every node type that requires multiple levels of access. if you later ad a new level of access called 'premium paid', you have to create a new set of modules again. this is clearly an ugly hack.

furthermore, if you want to reclassify a story from 'paid' to 'unpaid' you have to change its content type which feels pretty hackish.

the new node API will help solve this problem. i don't suggest anyone try this on the current codebase. instead, look at the upcoming node API in Kjartan's sandbox. the _access() hook is just the thing for managing this.

joe lombardo’s picture

Here's my summary understanding of the situation... did i get it right?

Is the access hook somehow going to make it possible for an administrator to classify posts of any node type into different permission groups? If so, this is pretty cool.

Using the current api and codebase, an administrator could change a user's access level upon form submission. This might be sufficient for many sites. The administrator could use a node type of 'site page' to create public content, and reserve the node type of 'blog' for paying users.

Using the current codebase and APIs, a developer could write a module that checks a user's security level and make decisions on what to display. Thus supporting simple business rules like, "freeloaders can only see posts from the last 10 days" or "freeloaders can only see posts from the administrator".


Joe Lombardo | joe@familytimes.com | FamilyTimes Online Journals
inerte@inerciasensorial.com.br’s picture

And wants to have/build a "billing" module, drop me a message. I need this kind of feature for the advertisement module... Perhaps we can talk and come with some ideas.

pkirk25’s picture

Plz try me on patrick at kirks.net

JoeCotellese’s picture

Hello,

I'm following up on some earlier postings. Has anyone made any progress on a subscription system using the new node API? Is the new node API adequate to begin implementing such a system? If not, has anyone found an alternative?

Regards,
Joe Cotellese
www.clearstatic.org

moshe weitzman’s picture

the nodeapi("access") hook isn't committed yet because we couldn't make it always render a reliable number of nodes per page for users who were denied access.

you could use gerhard's groups.module to accomplish this. see the downloads page.

greatbananas’s picture

Has there been any news on this thus far? :) thanks.

moshe weitzman’s picture

4.5 has node permissions which make this sort of feature rather easy.

greatbananas’s picture

phew ok. I have been messing around with e-commerce package and I am not able to add this feature into there (not that great of a programmer). I'm trying to have a way for someone to purchase a membership account so that they can have access to parts of the site.

Either they create an account and then purchase access
or
purchase an account so they can access so they can see membership stuff.
(Because for me there's no need for an account if they did not puchase the membership but either ways works.)

This is what the a previous poster talked about. I hope a contributor is interested in such a project. :)

fx-1’s picture

I am writing a subscription/paid content module for 4.5.x.

Tentative release date is some time in March.

pkirk25’s picture

Well its less than 3 years since I posted the question so I can wait another couple of weeks - thanks for doing this as I still need it.

matt westgate’s picture

For Drupal 4.6, the ecommerce package does subscriptions and recurring payments. You can even choose which roles users automatically assigned to after they purchase a recurring payment item.

pkirk25’s picture

Please send an email to pjkirk at cleardragon dot com if you provide consulting and development services based on this.

Thanks.

nvpradhan’s picture

Can you direct me to some documentation/demo that helps explain how the subscription/recurring payment module works using PayPal? Specifically how is it integrated with a) account registration b) creating private/remium areas on the web site?

pkirk25’s picture

www.cleardragon.com

Its a great module.

Patrick

Diplomacy is the art of saying "Nice doggie" until you find a suitable rock.