Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding fields in Customer Registration form


mat123slade

Recommended Posts

Posted

Hello,

 

I've just spent 9 hours on end trying to add 8 fields to the registration form, anf finally I'm giving up on trying different things, so I've come for some help !

 

I've added the fields I want in the Mysql database in the Adress_book table.

I've duplicated all info to do with the company field as follows :

 

 

 if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($HTTP_POST_VARS['company']);

So I've added :

if (ACCOUNT_CONTACT == 'true') $contact = tep_db_prepare_input($HTTP_POST_VARS['contact']);

 

Also, I've duplicated the following adapting it to my new field

if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company;
 

So I've added :

if (ACCOUNT_CONTACT == 'true') $sql_data_array['entry_contact'] = $contact;

 

And adding the following for it to show up on the page :

 <tr>
               <td class="main"><?php echo ENTRY_CONTACT; ?></td>
               <td class="main"><?php echo tep_draw_input_field('contact') . ' ' . (tep_not_null(ENTRY_CONTACT_TEXT) ? '<span class="inputRequirement">' . ENTRY_CONTACT_TEXT . '</span>': ''); ?></td>
             </tr>

 

So I believe it should work, obviously I've added all text in English.php and other languages I have, and had no problems to adding the info in the admin part of the site so when I edit the details of a customer, I have all fields, and I know that works because I tried adding info into the mysql database and that shows up there. So the problem comes from adding info into the database...

 

Is there another file than create_account.php at the catalog root I should be concentrating on, or should it all be there ? If so, any idea what I am doing wrong ?

 

Thanx in advance

All The Best

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...