Automatically register someone after he has filled out a form without sending him to the register page?
Posted: 19 August 2007 01:55 PM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  198
Joined  03-31-2006

Hello all,

is there a way to automatically register someone by having that person fill out a form without sending the person to the register page?


What I need to do is allow someone to fill out a form on a basic page (e.g. template by the name of order), say mysite.com/order/

Here is a form that the user fills out. Upon having filled out the form, he is redirected to 2Checkout. Upon returning to the site from 2checkout, he is automatically registered on the site.

Is this possible? I have everything figured out except for how I can make the form into a sort of hidden registration form so that, upon hitting the submit button, a person is automatically signed up.

Any pointers would be greatly appreciated.

Thanks!

 Signature 

Elegant webstandards based design - Rockatee

Profile
 
 
Posted: 19 August 2007 07:38 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
RankRank
Total Posts:  119
Joined  01-03-2003
maleika - 19 August 2007 01:55 PM

Hello all,

is there a way to automatically register someone by having that person fill out a form without sending the person to the register page?

Here is a form that the user fills out. Upon having filled out the form, he is redirected to 2Checkout. Upon returning to the site from 2checkout, he is automatically registered on the site.

Thanks!

Hi,

EDIT: When I first answered, I didn’t see that the form you were using was generated by EE. The solution I describe below requires PHP knowledge.


I “rolled my own” solution for a client that used EE and 2Checkout. The site had membership tables for 4 or 5 other programs, so creating our own program was easier than hacking EE. (This was done before Extensions were available.) We also did this because we wanted different signup emails sent out. Different groups were sent different instructions.

To do this we set up the process as you described above. The person fills in a form.  the information is added to the EE membership table with a pending status. We also added data to the exp_member_data tables. Then they are redirected to 2CO for payment. After successful payment, they are returned to the site and their membership group is changed.

IIRC, the only thing that we had to be careful about was the password and the unique id. They have to be encoded the way EE expects them.

HTH,

Jer

Profile
 
 
Posted: 19 August 2007 11:59 PM   [ Ignore ]   [ # 2 ]  
Lab Assistant
RankRank
Total Posts:  198
Joined  03-31-2006

Thank you very much for your help. :D

The problem is, I do not know PHP to the point where I could safely say this is something I can create. :(

If there are any alternate takes on how to approach this issue, I’d be very interested.

Thanks again

 Signature 

Elegant webstandards based design - Rockatee

Profile
 
 
Posted: 07 January 2008 01:36 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  199
Joined  11-19-2007
Jeri Letman - 19 August 2007 07:38 PM

IIRC, the only thing that we had to be careful about was the password and the unique id. They have to be encoded the way EE expects them.

hi,

I was able to achieve the same application form. However I am not sure how to create the `unique_id`.

I have encode the password like this:

FNS->hash($pwd);

But I am not sure where the unique_id comes from. Could you please give me some advice?

Thanks

 Signature 

http://www.bbook.com

Profile
 
 
Posted: 07 January 2008 03:22 PM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  199
Joined  11-19-2007

found it:

$data = array(
                    
"username"        => $username,
                    
"screen_name"     => $first_name,
                    
"password"        => $FNS->hash($pwd),
                    
"unique_id"       => $FNS->random('encrypt')
);
 Signature 

http://www.bbook.com

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 77560 Total Logged-in Users: 42
Total Topics: 101554 Total Anonymous Users: 30
Total Replies: 544388 Total Guests: 264
Total Posts: 645942    
Members ( View Memberlist )