Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

phone number not required


nat2zxd

Recommended Posts

Hello, how do i remove the requirement that phone number is a REQUIRED field in the login setup for a new user? I don't need phone number and think it prevents sales.

 

Hello

You need to edit the file catalog/create_account.php

 

 

Around line 47

Find

$telephone = tep_db_prepare_input($HTTP_POST_VARS['telephone']);

 

change it to

//$telephone = tep_db_prepare_input($HTTP_POST_VARS['telephone']);

 

Around line 153

Find

if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {

$error = true;

 

$messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);

 

Change it to

// if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {

// $error = true;

 

// $messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);

 

 

Around line 174

Find

'customers_telephone' => $telephone,

 

Change it to

//'customers_telephone' => $telephone,

 

Around line 250

find

}

 

change it to

//}

 

 

 

Around line 472

Find

 

<td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>

<td class="main"><?php echo tep_draw_input_field('telephone') . ' ' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_FAX_NUMBER; ?></td>

<td class="main"><?php echo tep_draw_input_field('fax') . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?></td>

 

and change it to

 

<td class="main"><?php //echo ENTRY_TELEPHONE_NUMBER; ?></td>

<td class="main"><?php //echo tep_draw_input_field('telephone') . ' ' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?></td>

</tr>

<tr>

<td class="main"><?php //echo ENTRY_FAX_NUMBER; ?></td>

<td class="main"><?php //echo tep_draw_input_field('fax') . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?></td>

 

 

That should do it.

 

F5

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...