18 replies [Last post]
rajasekharan's picture
Offline
Joined: 06/17/2008
Juice: 5
Was this information Helpful?

Hi,

I am trying to create a membership website using drupal. How do I create recurring subscription to a particular role using ubercart?

Thanks in advance,
Raja Sekharan

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
You'll need to start here in

You'll need to start here in the documentation, but an unfortunate drawback of the recurring fee system as is is that it can't be connected to a role promotion like you're asking. You'll have to do some custom code to handle this.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Ryan, I'm approaching this

Ryan,

I'm approaching this same solution, but I'm wondering why you say it won't work. It is possible to attach both a Generic Subscription to a product, as well as a Role. What I've done on our site (in testing) is created a "subscription" product which when purchased, adds the "subscriber" role to a user's account. This is done using uc_role I think. (Or uc_roles? I think I had both of them at one point...)

So theoretically this should work; there are Workflow_ng conditions and actions to manage it. However I'm still in testing and haven't gotten it to work. But, it looks like we are on the right path, as long as you can attach a subscription to a product that also adds a role to a user. Any thoughts?

--
Help directly fund development: Donate via PayPal!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Ryan, I'm approaching this

Well, you can set these things up individually, but there is no explicit link between a role and a recurring fee. So, you can setup a role promotion to last for a year and set up a recurring fee to charge $xx for 11 months following checkout, but if the recurring fee were to be canceled or fail there is no way for it to automatically cancel a role promotion. I imagine this would just take a little module to glue the two pieces together... of course, little modules always take the longest to write. Evil

paulcouture's picture
Offline
Joined: 04/03/2008
Juice: 42
Re: Re: Ryan, I'm approaching this

That is exactly what we do at www.horseracegame.com - our VIP subscribers get a role feature, then we manually account the recurring fees - if they fail, the user loses their role.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Ryan, I'm approaching this

Okay ... I think I'm getting the picture. We are going to need automated recurring fees and auto-renewing subscriber roles. So it appears the module I need to write is one that links a recurring fee with a role? Is that what you're saying? Maybe I'm not quite seeing the big picture... but it's something we need done in the next couple months so I have no problem taking on the project, which of course I'll put out to the community when it's done.

Any pointers on where to start or how to go about this? I want to keep it open so that people can use their payment method of choice; unfortunately I haven't much gotten into the uc_recurring stuff yet.

Let me know and perhaps I can get to work this week Smiling

EDIT: I think I see, the recurring fees work fine with renewing roles, but not with canceling them? That does sound like an interesting scenario to watch for... might take some digging... hmmm..

--
Help directly fund development: Donate via PayPal!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: Ryan, I'm approaching this

Well, a recurring fee won't affect a role either. So, this scenario is possible:

Customer purchases product with features that:
1. Grants the "special" role for 12 months.
2. Charges the fee 11 more times for a total of 12 payments.

But this isn't:

Customer purchases product with features that:
1. Grants the "special" role for 1 months.
2. Charges the fee 11 more times for a total of 12 payments.
3. Adds another month to the role's expiration each charge.

There simply isn't any linking between the two features right now, though there really ought to be. Shocked

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: Re: Re: Re: Ryan, I'm approaching this

Okay interesting. Ryan, have you looked at the Subscriptions contrib yet? I thought that module would be doing this exact thing... if not maybe that's a feature that can be added to it.

Otherwise it would almost seem like a plugin for uc_recurring, maybe uc_recurring_role - which would link the recurring fees to the "special" role in another table, using Cron to update the role expiration before a given threshold? (Again, there is an "action" to do this in the Subscriptions contrib, but I have tested it and it's not quite working yet, it seems...)

--
Help directly fund development: Donate via PayPal!

rajasekharan's picture
Offline
Joined: 06/17/2008
Juice: 5
Hi Dalton & Ryan, Quote:We

Hi Dalton & Ryan,

Quote:

We are going to need automated recurring fees and auto-renewing subscriber roles. So it appears the module I need to write is one that links a recurring fee with a role? Is that what you're saying?

That's pretty much what I had in mind.

But with one more addition - In most ecommerce type modules the membership is listed as a product. That wouldn't work very well if your site was to have only one membership subscription.

My concern is, although the functionality for creating a recurring subscription may be created. The UI isn't always usable from the subscriber's side. The ecommerce modules requires people to add to cart THEN check out even if the site has only one subscription why the cart?

I was hoping we could have a subscription interface like here:
http://www.amember.com/demo/signup.php

A 'cart' based system I feel is not ideal for a subscription website.

The 'Payment System' field could be PayPal (necessarily), Authorize.net, etc etc.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Hi Dalton & Ryan, Quote:We

Well, utilizing the cart system is the way to go, IMO. The thing about the aMember software is it looks to be its own payment processor. To which I would say, "Why reinvent the wheel?" I don't think adding a subscription to a cart is a huge usability issue. Perhaps setting up a cart link that immediately brings the user to the checkout screen would be easier than viewing it in your cart? Then the only usability issue would be losing items already in your cart (if you setup the Cart Link to remove all products).. not sure at this point. It's something worth looking into, if streamlining the process is a concern.

--
Help directly fund development: Donate via PayPal!

catch@drupal.org's picture
Offline
Joined: 07/14/2008
Juice: 7
Re: Re: Hi Dalton & Ryan, Quote:We

I've also been looking at this. It can be done with the contributed subscriptions module (+ paypal buttons), although it ought to be a lot cleaner using uc_role and a bit of glue code.

mr.andrey's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2008
Juice: 153
Re: Re: Re: Hi Dalton & Ryan, Quote:We

We're also looking to get this going. We have a monthly video subscription product (for yoga videos) that we would like to auto-renew every month.

I'll look into Subscriptions contrib.

Any more updates or ideas on this?

Best,
Andrey.

ChrisOPeterson's picture
Offline
Joined: 07/17/2008
Juice: 36
Interesting

This is interesting because I am doing almost exactly the same sort of thing. Recurring billing with roles for a membership site.

The complication this could bring up for me is that there are multiple levels of membership. If the user is at role one then upgrades to role 2 they would have to pay the full price for role 2 and they would still be billed for role 1.

Is there any way to cancel billing within ubercart when an upgrade happens automatically?

Now that I am looking at all these holdups it would almost be easier to just work the system manually.

mr.andrey's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2008
Juice: 153
Re: Interesting

Actually, I think the recurring billing does auto-renew the roles. It seems to at least with uc_cim. Here are the order logs:

09/04/2008
11:03:05 AM 1 Credit card charged: $1.00
09/04/2008
11:03:06 AM 1 Customer user role [-] Subscribed To Crib Live! renewed.
09/04/2008
11:03:06 AM - Recurring fee 1 added to order.
09/04/2008
11:03:07 AM - Order created through website.
09/05/2008
1:40:32 PM 1 Credit card charged: $1.00
09/05/2008
1:40:32 PM 1 Customer user role [-] Subscribed To Crib Live! renewed.
09/05/2008
1:40:32 PM - $10.00 recurring fee collected for 0001. (ID: 1)

Seems like all the pieces are in place. No need for Subscription module in our case.

Am I correct on this?

Thanks,
Andrey.

tonyhrx's picture
Offline
Joined: 09/18/2008
Juice: 4
Update on recurrent fee / role expiry issues

Would appreciate anyone with an update on these issues. There seem to be 2.

Is it the case that recurrent fees and role expiry are still not linked. If not linked I will write an tiny tiny module that makes it work.

and

It is the case that Authorize.Net is the only payment method that accepts recurrent fees

Ta!

mr.andrey's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2008
Juice: 153
Re: Update on recurrent fee / role expiry issues

We got this working with Authorize.net CIM module. Recurring fees renew the membership, and all seems to work well. I'm not sure if this extends beyond the contrib module into other payment modules.

Best,
Andrey.

stockli's picture
Offline
Joined: 12/03/2008
Juice: 55
which module combination?

Which module combination are you using? I'm trying to find the "magic combination", as it were, and it seems that the consensus is that uc_recurring and uc_roles don't work together correctly. Your post seems to suggest that you got them working, though... I tried using uc_cim (with a developer test account), uc_roles, and uc_recurring, and while the recurring fee was processed correctly it failed to renew the role. Are you using uc_subscriptions + uc_cim + workflow_ng instead? Or if you're successfully using uc_recurring + uc_cim + uc_roles, could you detail your setup?

Thanks!

ryanschmidt's picture
Offline
Joined: 11/17/2008
Juice: 235
mr.andrey wrote:We got this
mr.andrey wrote:

We got this working with Authorize.net CIM module. Recurring fees renew the membership, and all seems to work well. I'm not sure if this extends beyond the contrib module into other payment modules.

Best,
Andrey.

Yes, please detail your setup!

mr.andrey's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 08/12/2008
Juice: 153
Re: mr.andrey wrote:We got this

Just for reference:

http://www.ubercart.org/forum/development/7970/recurring_billing_authori...

I talked ryanschmidt through it, and he got it to work as well.

Best,
Andrey.