Auto select eligible membership plan

8 replies [Last post]
bkbetts
Offline
Joined: 03/29/2010
Status: 
Answered

I have several memberships created with MS MembershipSuite. I have a few types of membership, such as full membership, student membership, etc. I also have types of membership that are differently priced based on country. It would be nice if the user selects a membership type, e.g., Student, then they fill out the Country form field, which I have added via content_profile, and then the system automatically selects the Student/North America membership.

I'm currently thinking about how to do this, but thought I'd bring up a use case that might be helpful for others, and would be useful to have by default in MS MembershipSuite.

-Brian

Leighton Whiting
Offline
Joined: 06/02/2009
Brian, I'm reluctant to

Brian,
I'm reluctant to provide integration with specific modules and unique use cases like this out of the box, mainly because it will clutter up the code and won't benefit the majority of the users, and may even confuse some people.

I'm not a fan of Content Profile either, and haven't used it much, so I'm not sure exactly how the workflow goes, but from what I've seen, it doesn't work when trying to use both Content Profile and other Registration modifiers like Membership Suite on the same User Registration form.

One thing that you can do is add a reminder on every page until the user has created their applicable Content Profile, by checking if they have made one in a hook_init() function, and if they haven't, then display a message and a link asking them to create their profile using drupal_set_message($message) in the hook_init() function. This would require a custom module. I always make a custom module to do custom things like this and hook_form_alter and other things specific to a site, whenever I build a drupal site.

Sincerely,
Leighton Whiting

vector84
Offline
Joined: 04/01/2010
I'll actually be looking to

I'll actually be looking to do something very similar to this at some point in the future, and spent some time thinking on the subject...

Given the current feature set, I've come up with, essentially, two potential methods I was thinking of using to accomplish this:

1) Assign a user role based on the country field that defines, in essence, a "regional pricing group" - only that user role is allowed to purchase memberships in a given price group
The Rules module should be able to do this without too much trouble, I think?

2) Running a Drupal Multi-Site with mostly shared tables, but separate prefixed tables for membership plans (and several supporting tables, I'm sure) to support a variety of regional payment groups

My hangup with the first method, which is, obviously, considerably simpler to implement, is that it might prove fairly difficult to sure up security holes if you're looking to prevent malicious users from paying less than intended...
Not to mention that IP based validation of the profile field seems messy (can't edit your profile while travelling abroad for example?), but you might be able to do something along the same lines based on their actual IP to assign the user role, though I'm honestly not sure how at the moment.

As for the second method... I admit I'm just not all that versed in Drupal MultiSite - so while I'm reasonably sure it *could* be done, I'm definitely not sure if it's a *good* way to go about things, though it would probably be a fairly easy way to implement this...

Barring either some javascript (incredibly messy imo?) or adding to the user registration process workflow (fairly complex?) I can't really see many other ways to get a truly automated selection to happen on the user registration page.
A two step process, registration and then membership purchase, shouldn't be too complicated, but on the actual user registration form all together could become rather a mess.

PS: I figure I should also point out, I'm running both Content Profile and MoneyScripts (Memberships and Affiliates) and have no trouble at all...

No problems at all on the User Registration page when I had both enabled...
At least not in sandbox testing.
(I actually turned off MS Membership because in my use case I don't feel it makes a great deal of sense, but it did work fine in sandbox mode and CP and MS Affiliates are working together quite nicely on my User Registration forms)

I admit freely that I am not running 'stable' versions of a great deal of modules, a big one being CCK3 (and thus a rather large potential to effect things like this), so my system is not necessarily indicative of what will usually work ;)

Heck, I might even be forgetting direct patches to Content Profile I made that enabled this... suffice to say though that it CAN be made to work - I wouldn't count on a great deal of support though - fixing someone else's failure of Best Practices is a bit outside the realm of a reasonable support issue :p

bkbetts
Offline
Joined: 03/29/2010
Okay. I think I'll do one of

Okay. I think I'll do one of two things:

1) Multi-form registration, where the 2nd part applies the country selected from part 1 to filter/display the appropriate membership. Not sure how this will work with Membership Suite yet, but I have some ideas. Would definitely go in a custom module.

2) Just show the whole list of memberships, with descriptions, and let the user decide which plan is for them, having someone from my client's group receiving the payment double-check the details.

For what it's worth, content_profile isn't giving me any trouble so far. Perhaps there's something I'm missing that could be an issue, though.

Leighton Whiting
Offline
Joined: 06/02/2009
Content Profile itself isn't

Content Profile itself isn't a problem, I have many people who use that along with Membership Suite. The problem is when you use Content Profile on the Registration page AND Membership Suite on the registration page. Ideally you should use one or the other for user signup, and then once the user has signed up, have them either fill out their content profile or purchase membership.

Sincerely,
Leighton Whiting

bkbetts
Offline
Joined: 03/29/2010
I should've been more clear.

I should've been more clear. I use content_profile and Membership Suite without an issue on the same user registration form. I don't try to mix them and pull data from each into an email or anything.

Leighton Whiting
Offline
Joined: 06/02/2009
Bkbetts, Can you elaborate on

Bkbetts,
Can you elaborate on how your workflow goes? Or post a screenshot or two? It's very interesting...

Sincerely,
Leighton Whiting

bkbetts
Offline
Joined: 03/29/2010
Sure thing. I have emailed

Sure thing. I have emailed you the process.

I just realized I don't even use content_profiles anymore. I had tried it, then realized I could extend the user form through /admin/user/profile and checking the option to show the field on the user registration page. Sorry about the confusion.

Leighton Whiting
Offline
Joined: 06/02/2009
Just wanted to follow up on

Just wanted to follow up on this thread. There is a new 'Fix Content Profile' feature that will allow Content Profile and Membership Suite to work together on the same Registration form. There is also a new Special URLs feature in Membership Suite that will allow certain plans to only show on certain URLs. The plans will also be selected by default if they are the only one on the page.

Sincerely,
Leighton Whiting

Twitter Feed