Forums / Bug Reports / [Done v1.5] Telephone number len = 0, ok for customer registration, not for admin

[Done v1.5] Telephone number len = 0, ok for customer registration, not for admin

Views: 1,000

Results 1 to 3 of 3
13 Aug 2011, 6:41 AM
#1
stevenheintz avatar

stevenheintz

New Zenner

Join Date:
Aug 2011
Posts:
3
Plugin Contributions:
0

[Done v1.5] Telephone number len = 0, ok for customer registration, not for admin

Have been kicking the tires on 1.5.0BETA

Noticed that we can set the telephone number min length to zero, and this makes the field not required for customer registration

However when viewing the record in the admin app, anytime you hit update, an error comes up:

  • The 'Telephone Number' entry must have at least 0 characters.

you can't proceed unless you put something (junk) in the telephone number field

13 Aug 2011, 1:39 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: [Done v1.5] Telephone number len = 0, ok for customer registration, not for admin

Try editing the file:
/admin/customers.php

and change line 229:

      if ((int)ENTRY_TELEPHONE_MIN_LENGTH > 0 && strlen($customers_telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {

and change line 462:

  if ((int)ENTRY_TELEPHONE_MIN_LENGTH > 0 && customers_telephone.length < <?php echo (int)ENTRY_TELEPHONE_MIN_LENGTH; ?>) {

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Aug 2011, 10:46 PM
#3
stevenheintz avatar

stevenheintz

New Zenner

Join Date:
Aug 2011
Posts:
3
Plugin Contributions:
0

Re: [Done v1.5] Telephone number len = 0, ok for customer registration, not for admin

Thanks - I'll try this (and your suggestion for the customer deletion issue too)

I assume this means that someone is catching the issues to roll into mainline as well? (so everyone doesn't have to do this manual edits)

-Steve

Ajeh:

Try editing the file:
/admin/customers.php

and change line 229:

  if ((int)ENTRY_TELEPHONE_MIN_LENGTH > 0 && strlen($customers_telephone) < ENTRY_TELEPHONE_MIN_LENGTH) {
> 
> and change line 462:
> ```
  if ((int)ENTRY_TELEPHONE_MIN_LENGTH > 0 && customers_telephone.length < <?php echo (int)ENTRY_TELEPHONE_MIN_LENGTH; ?>) {