If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / I feel really stupid here, customer phone number question

I feel really stupid here, customer phone number question

Locked

Started by ripper on 3 Nov 2006, 5:20 PM · Views: 3,265

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
3 Nov 2006, 5:20 PM
#1
ripper avatar

ripper

Zen Follower

Join Date:
Jul 2005
Posts:
295
Plugin Contributions:
0

Post #1 by ripper

I have one cart owner who would like to remove the mandatory customer phone number field. I cannot find it in the admin panel. Am I missing it completely or is this something I need to do within the code?

Ripper
Oz Website Services
https://www.oz-web.net

3 Nov 2006, 6:58 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

To have the telephone-number field available but not required,

  1. Set the telephone "minimum value" to 0
  2. Edit the english.php language file and remove the * from the ENTRY_TELEPHONE_NUMBER_TEXT setting

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Nov 2006, 7:22 PM
#3
ripper avatar

ripper

Zen Follower

Join Date:
Jul 2005
Posts:
295
Plugin Contributions:
0

Post #3 by ripper

Thanks for that second part, that was the one I really needed. I figured out the change to zero on my own. I guess I still have a few grey cells left after all.....

Ripper
Oz Website Services
https://www.oz-web.net

12 Nov 2006, 4:33 PM
#4
essexuk avatar

essexuk

New Zenner

Join Date:
Nov 2006
Posts:
1
Plugin Contributions:
0

Post #4 by essexuk

Hi I am new here so my first post.

If you want to remove the boxes from showing. set the fax and telepnone to false or 0.

In the directory
Includes>templates>template_default>templates find the file called
tpl_modules_create_account.php

Remove the following code

<fieldset>
<legend><?php echo TABLE_HEADING_PHONE_FAX_DETAILS; ?></legend>
<label class="inputLabel" for="telephone"><?php echo ENTRY_TELEPHONE_NUMBER; ?></label>
<?php echo zen_draw_input_field('telephone', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_telephone', '40') . ' id="telephone"') . (zen_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?>
<?php
  if (ACCOUNT_FAX_NUMBER == 'true') {
?>
<br class="clearBoth" />
<label class="inputLabel" for="fax"><?php echo ENTRY_FAX_NUMBER; ?></label>
<?php echo zen_draw_input_field('fax', '', 'id="fax"') . (zen_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>
<?php
  }
?>
</fieldset>

In the same directory find the file called
tpl_account_edit_default.php

Remove the code

<label class="inputLabel" for="telephone"><?php echo ENTRY_TELEPHONE_NUMBER; ?></label>
<?php echo zen_draw_input_field('telephone', $account->fields['customers_telephone'], 'id="telephone"') . (zen_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<label class="inputLabel" for="fax"><?php echo ENTRY_FAX_NUMBER; ?></label>
<?php echo zen_draw_input_field('fax', $account->fields['customers_fax'], 'id="fax"') . (zen_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>
<br class="clearBoth" />

This then removes the boxes from showing at all.

Remember to take a back up of the originals first.

12 Nov 2006, 4:55 PM
#5
ajeh avatar

ajeh

Oba-san

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

Post #5 by ajeh

Note: if you copy the tpl_ files to your templates and overrides directory and edit the files then those files will run vs touching the original files ...

That is what the templates and overrides is all about ... :smile:

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!

28 Nov 2006, 2:53 PM
#6
enigma777 avatar

enigma777

New Zenner

Join Date:
Oct 2006
Posts:
55
Plugin Contributions:
0

Post #6 by enigma777

How come when I set the min value for postal code I still get the asterisks and the jscript pops up?

21 Mar 2007, 6:37 AM
#7
dizzie avatar

dizzie

Zen Follower

Join Date:
Jan 2006
Posts:
152
Plugin Contributions:
0

Post #7 by dizzie

Thanks EssexUK...editing those 2 files worked for me!!
I changed the phone number required minimum to "0" and removed the * from the english.php file and then edited those 2 files and Viola, there's no phone number box on the account creation page...thanks for the Tip!