I'm not sure that type of thing is easy out-of-the-box .. but I could see it being done with the following steps, in a custom module (for a custom product type).
- Create the custom product type
- Hook into hook_product_info and set the access variable to a module-specific access level. Something like "can purchase subscriptions" - this access level is made available for only the subscriber role. (In other words, when you purchase the subscriber role, this role and permission is added to the user)
- Limiting one subscription in the cart at a time is easy enough to do (search for it on Ubercart.org)
- It's also easy to disable the "amount" field in the Cart Review page (/cart)
So I think with all the things combined, you could make it so that:
a) Only your regular authenticated users can buy the subscriptions
b) Only one subscription allowed in a cart at a time (you could make different levels unique products or options)
c) Once the subscriber role is purchased, set it in your user Access Control area that the Subscriber role does not have the permission "can purchase subscriptions"
This is just some ideas I have, I haven't actually tried it. But it sounds good in theory.
(Spitballing ideas is my specialty!)
My only real question mark remains in how the permission is inherited, if at all; since the subscriber role is really a child role of Authenticated user... unless the idea of "unchecking that permission for that custom role" doesn't work in practice...



Joined: 08/14/2007