Zen Cart Logo
Forums / Managing Customers and Orders / How to remove phone/fax number from registration form...?

How to remove phone/fax number from registration form...?

Locked

Views: 19,656

Results 21 to 22 of 22
This thread is locked. New replies are disabled.
4 Mar 2009, 6:34 PM
#21
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

How to remove phone/fax number from registration form...?

Well ... a search via the Tools ... Developers Tool Kit ... on the word:
phone

Showed me a number of files and one referenced the size ...

Peeking at:
/includes/modules/create_account.php

around lines 230 - 233 I found:

  if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
    $error = true;
    $messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);
  }

To trim that, as well as test the size, I would change the code to:

  if (strlen(trim($telephone)) < ENTRY_TELEPHONE_MIN_LENGTH) {
    $error = true;
    $messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);
  }

NOTE: be sure to use your templates and overrides for this change ... :smile:

4 Mar 2009, 9:30 PM
#22
eljay avatar

eljay

New Zenner

Join Date:
Nov 2008
Posts:
9
Plugin Contributions:
0

Re: How to remove phone/fax number from registration form...?

Ajeh:

Well ... a search via the Tools ... Developers Tool Kit ... on the word:
phone

Showed me a number of files and one referenced the size ...

Peeking at:
/includes/modules/create_account.php

around lines 230 - 233 I found:

if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
$error = true;
$messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);
}

> 
> To trim that, as well as test the size, I would change the code to:
> ```
  if (strlen(trim($telephone)) < ENTRY_TELEPHONE_MIN_LENGTH) {
    $error = true;
    $messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR);
  }

NOTE: be sure to use your templates and overrides for this change ... :smile:

Thanks Ajeh, that worked. I appreciate your help. Unfortunately I cannot stop ppl from putting all zeros in this field if they do not want to give out a phone number:smile: