Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Added field in registration

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 12-01-2003, 05:21 AM
 
Kanyon71 Kanyon71 is offline
 

Senior Member
  
Join Date: Oct 2002
Location: Lutz, FL
Posts: 128
 

Default

I am not quite sure what your asking here. Are you talking about you do not have this field in the .tpl file? If thats the case it won't exist in there you're adding it. If you mean the .php file looking at the file you pasted in it's not super different, just have to find the correct place to add the variables to it. I am just now starting on a 3.5.0 store for a customer who's using an older version and this is one of the things I will be adding for him. So once I get to the point if you're not up and running I will post any changes I had to make here.
__________________
Kanyon71
http://www.web-wizards.com
For hosting solutions that fully support X-Cart!
Mention the forums for a discounted package!
Reply With Quote
  #12  
Old 12-28-2003, 08:20 PM
  escott's Avatar 
escott escott is offline
 

Advanced Member
  
Join Date: May 2003
Location: Tampa, FL
Posts: 93
 

Default

Ok, I followed everything in here, mods on the php's mods to the tpl's and still I don't see it in the registration form. I am using the latest version 3.5.1 and I can not get it to work. When I look at a customers information I see it there but it looks like it's the last page he clicked on before he checked out. I am trying to get the drop down to work in the customer area. If anyone has figured this out with this version please let me know.
__________________
-Eric
www.saltwatersportswear.com
-----------------------------------
X-Cart 3.5.6 (or 3.5.9 not sure) testing 4.0.0
Redhat Linux 9
Dual Pentium 2600mhz
1.2 gig ram, 200 gig hd
Reply With Quote
  #13  
Old 12-28-2003, 08:37 PM
  escott's Avatar 
escott escott is offline
 

Advanced Member
  
Join Date: May 2003
Location: Tampa, FL
Posts: 93
 

Default

Ok, I figured it out in 3.5.1 you must make the changes to File: /main/register_personal_info.tpl not the mailn/register.tpl also if you did the first mod then switched to the drop down mod, make sure you change your label name.
__________________
-Eric
www.saltwatersportswear.com
-----------------------------------
X-Cart 3.5.6 (or 3.5.9 not sure) testing 4.0.0
Redhat Linux 9
Dual Pentium 2600mhz
1.2 gig ram, 200 gig hd
Reply With Quote
  #14  
Old 05-21-2010, 03:33 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Added field in registration

Quote:
Originally Posted by Kanyon71
Well I added a How did you hear about us to the registration process. Used some code I had found in other posts, I also added fields to my email's for siginin and modify for users. This is pretty much what I did:

First: Added the new field to the database using myphpadmin

Code:
ALTER TABLE `xcart_customers` ADD `referred` VARCHAR(255) NOT NULL;

Next: I added a new label - lbl_referrer

Next: I modified my include/register.php

Code:
Original code: # # Update/Insert user info # if ($mode=="update") { $intershipper_recalc = "Y"; db_query("update $sql_tbl[customers] set password='$crypted', password_hint='$password_hint', password_hint_answer='$password_hint_answer', title='$title', firstname='$firstname', lastname='$lastname', company='$company', b_address='$b_address', b_city='$b_city', b_state='$b_state', b_country='$b_country', b_zipcode='$b_zipcode', s_address='$s_address', s_city='$s_city', s_state='$s_state', s_country='$s_country', s_zipcode='$s_zipcode', phone='$phone', email='$email', fax='$fax', url='$url', card_name='$card_name', card_type='$card_type', card_number='".text_crypt($card_number)."', card_expire='$card_expire', card_cvv2='$card_cvv2', pending_membership='$pending_membership', ssn='$ssn' where login='$login' and usertype='$login_type'"); New Code: # # Update/Insert user info # if ($mode=="update") { $intershipper_recalc = "Y"; db_query("update $sql_tbl[customers] set password='$crypted', password_hint='$password_hint', password_hint_answer='$password_hint_answer', title='$title', firstname='$firstname', lastname='$lastname', company='$company', b_address='$b_address', b_city='$b_city', b_state='$b_state', b_country='$b_country', b_zipcode='$b_zipcode', s_address='$s_address', s_city='$s_city', s_state='$s_state', s_country='$s_country', s_zipcode='$s_zipcode', phone='$phone', email='$email', fax='$fax', url='$url', card_name='$card_name', card_type='$card_type', card_number='".text_crypt($card_number)."', card_expire='$card_expire', card_cvv2='$card_cvv2', pending_membership='$pending_membership', referred='$referred', ssn='$ssn' where login='$login' and usertype='$login_type'"); Next Change: Old Code: # # Add new person to customers table # $intershipper_recalc = "Y"; db_query("insert into $sql_tbl[customers] (login,usertype,membership,password,password_hint,password_hint_answer,title,firstname,lastname,company,b_address,b_city,b_state,b_country,b_zipcode,s_address,s_city,s_state,s_country,s_zipcode,phone,email,fax,url,card_name,card_type,card_number,card_expire,card_cvv2,first_login,status,referer,pending_membership,ssn) values ('$uname','$usertype','$membership','$crypted','$password_hint','$password_hint_answer','$title','$firstname','$lastname','$company','$b_address','$b_city','$b_state','$b_country','$b_zipcode','$s_address','$s_city','$s_state','$s_country','$s_zipcode','$phone','$email','$fax','$url','$card_name','$card_type','".text_crypt($card_number)."','$card_expire','$card_cvv2','".time()."','Y','$RefererCookie','$pending_membership','$ssn')"); New Code: # # Add new person to customers table # $intershipper_recalc = "Y"; db_query("insert into $sql_tbl[customers] (login,usertype,membership,password,password_hint,password_hint_answer,title,firstname,lastname,company,b_address,b_city,b_state,b_country,b_zipcode,s_address,s_city,s_state,s_country,s_zipcode,phone,email,fax,url,referred,card_name,card_type,card_number,card_expire,card_cvv2,first_login,status,referer,pending_membership,ssn) values ('$uname','$usertype','$membership','$crypted','$password_hint','$password_hint_answer','$title','$firstname','$lastname','$company','$b_address','$b_city','$b_state','$b_country','$b_zipcode','$s_address','$s_city','$s_state','$s_country','$s_zipcode','$phone','$email','$fax','$url','$referred','$card_name','$card_type','".text_crypt($card_number)."','$card_expire','$card_cvv2','".time()."','Y','$RefererCookie','$pending_membership','$ssn')"); Final Change in this file is adding a field towards the bottom of the file: $userinfo[referred]=stripslashes($referred); I added this after company.

Next: I modified skin/main/register.tpl
Following was added after company once again.

Code:
<tr valign=middle> <td align=right>{$lng.lbl_referer}</td> <td></td> <td nowrap> <input type=text name=referred value="{$userinfo.referred}"> </td> </tr>

Next: I modified skin1/mail/signin_notification.tpl and skin1/mail/profile_admin_modified.tpl

The following code was added to the bottom of the file.

Code:
{$lng.lbl_referer}: {$userinfo.referred}

The
is in the there as I have all of my emails in HTML (well some of them far more html then others)

Thanks to all those whose code I found, hope someone gets some use out of this. Took me a while of playing around to get the sql to work right and the fields to store correctly and display correctly.

I know that it is old post but I want to add Date of birth (D-M-Y ) and Date of anniversary (D-M-Y) in registration page.How to add it ? It will be better if we add a calender options.

How to do it?

Can you help me?

Thanks to all.
__________________
4.6.1 Platinum


Reply With Quote
  #15  
Old 12-20-2010, 01:33 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Added field in registration

How to achieve this??
__________________
4.6.1 Platinum


Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:21 AM.

   

 
X-Cart forums © 2001-2020