Hi All,
Merging UberCart and Drupal User Registration.
I have to create a paid user registration feature using UberCart and Drupal's standard user registration feature. The registration process would be a two step
process as follows
Step 1: The User enters his registration details in Drupal's Standard User Registration form. On submission however, the data would not stored in the database but
in a session.
Step 2: The submitting his user details, the registration response page would display a link for the user to proceed to checkout (using UberCart) and pay for the registration. Only after a sucessful payment is made
would the user details be saved in the database and the user account created.
I would be grateful for any tips on how this functionality can be implemented. I specially want to know how user registration details can be saved in the session rather than the database in step 1. Any pointers would do.
Thanking you in anticipation
Comments
I like to know too
I am very interested in doing the samething for one of my sites. If I find anything I let you know and be interested to see if works.
Me three
---
Check out
Check out this,
http://www.ubercart.org/docs/user/3366/selling_site_access_role_promotions
I was able to add a subscription role implementing ubercart using drupal 6, ubercart 2. I have them separate, however. Meaning, I register the user in one area, and ask them to subscribe in another. Then I use permissions and advanced front page to limit a non-subscriber's interaction with the site.
Any of that help?
Further to this . . .
Perhaps you could skip Drupal's standard registration altogether, by changing the User Settings to "Only site administrators can create new user accounts". Then use Ubercart to sell the Authenticated User role (Ubercart allows you to sell any role to unregistered users). You might want to customise (or replace) the standard user login block to include a link to the subscription page too -- check out http://drupal.org/search/apachesolr_search/custom%20login.
It looks like Ubercart also
It looks like Ubercart also has it's own webform for users to fill out, I was thinking if a user creates an account that's one form and then if he has to fil out another form for Ubercart that's a lot of form completing. I also have another webform they need to fill out that would make three forms. It would be nice if there were a way to merge webforms, user registration and ubercart all in one shot.
Yes but . . .
Yes, but Ubercart allows you to sell the Authenticated User role (or any other role) to unregistered users, so why not bypass Drupal's standard registration altogether as I suggested above?
Re your additional web form, I'd be looking to add to Ubercart's checkout form. A quick search revealed this: http://www.ubercart.org/forum/development/3321/how_add_new_field_addres, but you might find other ideas on http://ubercart.org too.
Helllo, I need the same thing
Helllo,
I need the same thing for my website.
Can anyone please help. I tried using selling roles, but when user signup on the website , authorized users which is default role automatically assign to that member and when i try to shift to "member" role which i created, it doesn't ask for membership fee means i tested with myself this process.
Thanks
How I handled this issue
Here's what I did (in my broken tech-speak):
1. User fills out registration that includes many of the same fields that the ubercart checkout process would use -- name, address, etc. -- these things get created via the profile module -- pretty basic.
2. They press submit
3. They are instantly logged in because of the "Immediate Login" option in Logintoboggan module (I suppose you could do this via hook_form_alter() -- I don't really use that module for anything else).
4. I have previously established that the role "Authenticated User" really has no more rights than an unauthenticated user except that they can now use the ubercart product and checkout, upon completion they'll get the "member" role associated with a product, etc.
5. I create an action via hook_action_info(), assigned to the trigger "After a user has logged in" which uses the ubercart cart links to do the following:
http://www.mrlinuxhead.com/?q=node/4 -- not a bad explanation of uc_cart_links
if($logged_in && [code to check if user is not already a member]){
drupal_goto('cart/add/e-p62_q1-imembership_registration','destination=cart/checkout');
}
//Obviously the above link is only what I had on my site, read the link above for an explanation for the proper values for
// you to use
6. Finally, they are logged in, they are looking at the checkout which has the new membership product added. They can't really do anything else because they don't have the proper role yet. They checkout, I get paid, they get assigned a new role and they're redirected to a welcome page (whatever) that they previously did not have access to.
Comments??
Ubercart Addresses
I found the Ubercart Addresses module very useful for a similar but different use case:
http://drupal.org/project/uc_addresses
Just in terms of getting the registration form merged
Ubercart Drupal registration - prepopulate fields
I am using a custom content_profile module user profile (CCK) for site registration. The form is divided into two groups, basic and full. Basic user information just includes name and email, and limits access to non-Ubercart functions. The Full user information would technically require Ubercart registration information such as PayPal, credit card numbers etc.
Is this possible currently? If the only way for this to work would be the user to register twice, once for Drupal and once for UberCart, would it be possible to prepopulate duplicate fields in the Ubercart registration form. It would make the registration much more user friendly. Perhaps also include a checkbox for "Use basic user information" that would populate the UberCart fields.
Ideally, I would like for users to be able to register for both using one form and eliminate duplicate/redundant fields if possible.
Suggestions or feedback appreciated
Instead of "5. Action via
Instead of "5. Action via hook_action_info()" you may use "Redirect path on registration:" parameter for LoginToboggan.
RE: How I handled this issue
Doing it in this way, would the customer have to fill in information twice? On registration and checkout? Or did you find a way to reuse the information?
Otherwise it seems like a pretty simple solution. The only other useful information i found was this : http://www.ubercart.org/forum/selling_services/11503/new_ubercart_how_do... adrian's solution.
i am surprised that there isn't a module that does subscription registrations? I am trying to implement a similar service, i would like to do it all on the registration page to make it simpler for users, but this seems like the most "do-able" solution given my time constraints.
This is working solution for membership
This is working solution for membership (Updated. Previously posted by macinnir on August 13, 2010):
1. User fills out the registration/membership form and press submit button. "Content Profile" module used instead of standard registration. Also "Ubercart Addresses" module used that allows to include many of the same fields that the ubercart checkout process will reuse - name, address, etc.
2. They are instantly logged in and redirected to the page to choose their membership level (HTML page with different membership product urls listed). "Immediate Login" and "Redirect path on registration" options in Logintoboggan module were used. Set "Non-authenticated role" to "authenticated user".
3. They choose their membership level and go through the checkout, get assigned a new "member" role and they're redirected to a welcome page of the "Members Section" that they previously did not have access to.
Create "member" role that will provide access to the "Members Section". Use "UC Recurring Payments and Subscriptions" module to create different membership products with 1 year recurring period. To use it with PayPal WPS: check "Paypal website payments standard (paypal_wps)" on the /admin/store/settings/payment/edit/recurring page.
Checkout process could be a bit streamlined using "Cart Links" module - turn it on under "Ubercart - extra", use "Display the cart link product action when you add a product to your cart" option and it will help you to code it. You can make one-page checkout (skipping two pages: Product and Cart) using Cart Link like this one: "/cart/add/p35_q1_a1o1_m0?destination=cart/checkout"
Otherwise I just tested it and everything went well. Will keep updating this post with additional things when implemented.
Thanks,
Gennady
This is a great
This is a great combination.
One brief comment: you could also use the Rules module to handle the redirects rather than Logintoboggan. This opens up a number of new options, like:
-setting system messages between stages
-sending out emails (reminders to finish incomplete registrations, notifying admins, etc)
-setting roles
-flagging users
-etc
Thank you Matt, Never used
Thank you Matt,
Never used Rules module before so will learn/try it one day :)
hook_uc_node_checkout saved me
I was able to do this with a little code in hook_uc_checkout_complete, grabbing the billing info and creating/completing a minimal content_profile node (called 'member' in my example) from the user's checkout info. my setup has the user automatically logged in when completing checkout, haven't tested it without that, but can't imagine it matters since UC is assigning your $order->uid when checkout is complete. ANyway, here it is, hope this helps someone.
Merci!!! macinnir, what a
Merci!!! macinnir, what a great solution!
There is one problem with the
There is one problem with the solution posted by macinnir on August 13, 2010 that I can see, and that is if the user logs out and then back in again - the user will have multiple products depending upon how many times they log in and out / how long items are stored in the cart.
There needs to be a check before adding the product that the user's cart is empty.
_
I am using rules to trigger my actions. I have created a new condition using 'Execute custom PHP code':
or use a module
there is also a module called UC Add to Cart Tweaks that can clear your cart everytime you add something to it.
Wrong Forum
Hi,
This forum is for folks who have already decided to extend Drupal's functionality by writing custom modules.
From the moderator:
The whole discussion about concerns "using" and "configuring" existing functionality. That's fine, except that discussion belongs in the "Post Installation" forum or in the issue queue of one the specific modules, not here :)
Please be courteous and move your question to to appropriate forum Post Installation :)