Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Making the Telephone number NOT required, how?


Sarah_h

Recommended Posts

I saw a post about this some weeks ago. Of course no amount of searching has turned it up. Is anyone able to point me in the right direction as to how to make it so the telephone number is NOT a required field when creating an account.

 

Thanks

 

Sarah

Link to comment
Share on other sites

I saw a post about this some weeks ago. Of course no amount of searching has turned it up. Is anyone able to point me in the right direction as to how to make it so the telephone number is NOT a required field when creating an account.

 

Thanks

 

Sarah

 

 

Anyone got any ideas on this?

Link to comment
Share on other sites

by coincidence i've been doing just this today..

 

 

I'm just commenting out the code I don't want, so its easy to put back if the client changes their mind

 

go into the create_account.php file and take out the php checking at form the top of the document for the corresponding input

 

 ? /* if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
? ? ?$error = true;

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

 

to disable the javascript and the red star, find where the inputs get written in the body of the page

 

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

 

that should do it, hopefully that makes sense to you

 

simelar things also need doing in account_edit.php and admin/customers.php

Link to comment
Share on other sites

by coincidence i've been doing just this today..

I'm just commenting out the code I don't want, so its easy to put back if the client changes their mind

 

go into the create_account.php file and take out the php checking at form the top of the document for the corresponding input

 

 ? /* if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
? ? ?$error = true;

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

 

to disable the javascript and the red star, find where the inputs get written in the body of the page

 

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

 

that should do it, hopefully that makes sense to you

 

simelar things also need doing in account_edit.php and admin/customers.php

 

Thanks for this. I was looking through that code just now.

 

I'll have a go and see what happens.

 

Thanks

 

Sarah

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...