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?
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?
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.
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.....
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
In the same directory find the file calledCode:<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>
tpl_account_edit_default.php
Remove the code
This then removes the boxes from showing at all.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" />
Remember to take a back up of the originals first.
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 ...
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: v1.5.5]
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!
How come when I set the min value for postal code I still get the asterisks and the jscript pops up?
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!
Bookmarks