New Zenner
- Join Date:
- Oct 2006
- Posts:
- 25
- Plugin Contributions:
- 0
How can I Make certain Customer Registration fields optional?
But how to disable showing gender (mr. / ms.) selection? I can't find that anywhere and really want to take it away.
Views: 36,632
New Zenner
But how to disable showing gender (mr. / ms.) selection? I can't find that anywhere and really want to take it away.
New Zenner
Ajeh:
You could also do this by just changing the settings in the Minimum Values for the Telephone number or Post Code to blank, not 0, but blank as in edit and make the input box blank and hit update ...
Then, change the language file for the Required for the field(s) to be '' vs '*' and you will not see the red asterisk ...
Hi Ajey:
I realize that this is an old post, but hope you can help me out here.
The only change that I want to make to my site right now is have it so that the telephone number is not a required field. I followed the first half of your advice, the easy part by chaning the minimum field for the phone number to blank.
It's the second part that I'm not quite understanding. If I go into my languages folder...what file am I looking for with the phone number in it? I still very inexperience so I don't want to play with things that I shouldn't be touching. Could you please give me a little more direction for changing the required field and getting rid of the red * on the phone number.
All of my products are downloadable so I don't see the need for the phone number.
Thanks so much.
New Zenner
-M-:
But how to disable showing gender (mr. / ms.) selection? I can't find that anywhere and really want to take it away.
From one new Zenner to another. I just did this tonight. You go into your store , click on "Configuration" , then click on "Customer Details". The very first line will say "Email Salutation" change that value to "false". I did this and it removed the Mr and Ms option.
Worked for me, I hope it does for you to.:smile:
New Zenner
Hi Micki
May I respectfully refer you to the post I made earlier
http://www.zen-cart.com/forum/showpost.php?p=835594&postcount=35
This contains detailed instructions on how to slimline the process. I also deal only in download products, hence the steamlined process.
Hope it helps. Yell if you need any further help :cool:
John Chadwick
Resell Rights Shop
John Chadwick Blog
New Zenner
resellrightsshop:
Hi Micki
May I respectfully refer you to the post I made earlier
http://www.zen-cart.com/forum/showpost.php?p=835594&postcount=35
This contains detailed instructions on how to slimline the process. I also deal only in download products, hence the steamlined process.
Hope it helps. Yell if you need any further help :cool:
Thanks John for referring me to you earlier post. I will read through it thoroughly and try to make some changes.
The only thing that I really want to accomplish is making the phone number optional instead of mandatory. I think that I've done that, but have to get rid of the "*".
New Zenner
Hi Micki
This is the file you need to edit. Make sure you have made a template file (your_template).......
your domain name/shop directory (if required)/includes/languages/YOURTEMPLATE/english.php
define('ENTRY_TELEPHONE_NUMBER_TEXT', '*'); Remove * (removes the required *)
Remove the star (i.e. delete it) but ensure you keep the two apostrophe's otherwise you will get errors or a page no load.
It was around line 242 in the english.php file.
Hope this helps
John
John Chadwick
Resell Rights Shop
John Chadwick Blog
Totally Zenned
I am having the exact opposite problem, the telephone info field is no longer on my login/create account page. I have looked through all of the files and can't seem to find what is wrong.
any idea?
New Zenner
savage:
OK after much prodding and trial and error, I have found that the following files need to be changed to hide any mandatory fields...
modules/[your mod]/create_account.php
modules/pages/create_account/jscript_form_check.php
templates/[your mod]/templates/tpl_modules_create_account.phpNow on our site, only the Salutation, First & Last Name, Email Address and Password are mandatory and are the only fields that appear.
It would be nice to have all these fields turn-off and onable via the admin screens.
Also it would be nice if modules/pages/ and the various sub-directories also adhered to the excellent mod override features as the only way I could fix the Javascript validation was to change the default file directly, which is not ideal, considering a new version of Zen-Cart has just been released.I hope this helps someone else.
This helped me a lot in solving my issue.... Thanks a lot...:D
New Zenner
aditya369:
This helped me a lot in solving my issue.... Thanks a lot...:D
If someone wants to skip few registration fields like Address, City, State, Zip code and Country at the time of registration, then there will be a problem at the time of checkout process. So you need to take care of that part by customizing the code at the time of checkout process. I have followed the below steps.
add the following code in "includes/templates/[YOUR TEMP]/templates/tpl_checkout_shipping_default.php" and in
"includes/templates/[YOUR TEMP]/templates/tpl_checkout_payment_default.php"
in tpl_checkout_payment_default.php file, replace $_SESSION['sendto'] with $_SESSION['billto']
<!-- Custome code to validate the address --> <?php $host = DB_SERVER; $dbun = DB_SERVER_USERNAME; $dbpwd = DB_SERVER_PASSWORD; $dbsel = DB_DATABASE; $os_conn = mysql_connect($host,$dbun,$dbpwd); mysql_select_db($dbsel); $os_qry = mysql_query("SELECT * FROM zen_address_book WHERE address_book_id = '". $_SESSION['sendto']."'"); while($os_row = mysql_fetch_array($os_qry)){ $os_street_address = $os_row['entry_street_address']; $os_city = $os_row['entry_city']; $os_state = $os_row['entry_state']; $os_country_id = $os_row['entry_country_id']; } mysql_close($os_conn); //if( ($os_street_address !='') && ($os_city !='') && ($os_state !='') && ($os_country_id !='')){}else{ if($os_street_address !=''){}else{ $os_error = 'Please change the Shipping address'; ?> <!--<script type="text/javascript"> alert("Please change the Shipping address"); </script>;--> <?php echo '<span style="color: #CC0200; font-size: 15px; font-weight: bold; margin: 0 0 0 210px; text-align: center;">'.$os_error.'</span>'; } ?> <!-- Custome code to validate the address Ends -->New Zenner
helpme:
I am having the exact opposite problem, the telephone info field is no longer on my login/create account page. I have looked through all of the files and can't seem to find what is wrong.
any idea?
I noticed that If my customers use the express Paypal Checkout shortcut they don't have to fill in the phone number details. You can turn this shortcut off in the payment module for Express Checkout if you want to always require the phone number.
New Zenner
I'd like to add a couple of new fields - [username (forum)] [forum (name of forum)] this will allow us to quickly check for support enquiries on the forums we frequent. Is that possible?
New Zenner
Hello,
this is an old post, problem are similar.
I have running zencart 150 and FEC on it. Problem with registration form and country selection. I have a single country I trade in. Default country set up on it. FEC hides automatically country selection field when you have only one country to select. Was everything ok several month, but probably after some updates on hosting company suddenly stopped working properly and registration form asks to select country.
Added second country, actually same country, so I could see at least country selection for registration but this is not solid solution.
tryed * thing,
tryed
<span style="display: none;">
<label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>
nothing works, registration forms still prompts to select country.
Any more ideas for my problem to solve?
New Zenner
Abomni:
Hello,
this is an old post, problem are similar.
<?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" ' . ($flag_show_pulldown_states == true ? 'onchange="update_zone(this.form);"' : '')) . (zen_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="alert">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?> </span>
I have running zencart 150 and FEC on it. Problem with registration form and country selection. I have a single country I trade in. Default country set up on it. FEC hides automatically country selection field when you have only one country to select. Was everything ok several month, but probably after some updates on hosting company suddenly stopped working properly and registration form asks to select country.
Added second country, actually same country, so I could see at least country selection for registration but this is not solid solution.
tryed * thing,
tryed
<span style="display: none;">
<label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>nothing works, registration forms still prompts to select country.
Any more ideas for my problem to solve?
Problem solved.
According to Numinix the only change is to download the new version of header_php.php to includes/modules/pages/login/ - this worked for me on 2 sites.
New Zenner
resellrightsshop:
b) <label class="inputLabel" for="city"><?php echo ENTRY_CITY; ?></label>
<?php echo zen_draw_input_field('city', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_city', '40') . ' id="city"') . (zen_not_null(ENTRY_CITY_TEXT) ? '<span class="alert">' . ENTRY_CITY_TEXT . '</span>': ''); ?><br class="clearBoth" /> Commented out (<!--....-->) (removes City Field)
c) <label class="inputLabel" for="postcode"><?php echo ENTRY_POST_CODE; ?></label>
<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?><br class="clearBoth" /> Commented out (<!--....-->) (Removes Post Code Field)
d) <legend><?php echo TABLE_HEADING_PHONE_FAX_DETAILS; ?></legend> Commented out (<!--....-->) (Removed the phone and fax table)
<?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>': ''); ?> **Commented out (<!--....-->)** (Removed Telephone Field)
e) <label class="inputLabel" for="telephone"><?php echo ENTRY_TELEPHONE_NUMBER; ?></label>**Step 5 - ** Your_store_folder/includes/languages/english/your_template/create_account_success.php
define('PRIMARY_ADDRESS_TITLE', 'Your Name and Country'); (Altered from Your Address just so things made a little sense on the account success page).Not sure if there is any set order of the above but the order written is the order I did it in (checking at each stage). I have checked the ADMIN, Customer and all seems fine as does the SQL Address_book and Customer tables.
If it helps someone then it was worth it! Now I can get on with uploading all the juicy products!
Or I could of if my hosting company hadn't just (literally as I post) suspended my account due to a server overload! I must get a lot more traffic than I thought. Not bad for a shop with no products!!
When I am back up and running I will post a link to this thread so that you can check it works.
Go figure!!
Please help. I have done the previous steps , all good, but I am failing at trying to comment out the post code and city. Can you tell me exactly what I need to type to coment it out? php may as well be chinese as I don't speak the lingo!
Administrator
DeeL, what fields are you trying to keep on the account registration page? If your store only sells virtual products so you don't need the customer's full address, you could give a look to "Minimum Customer Account Information" (http://www.zen-cart.com/downloads.php?do=file&id=1465).
Zen Follower
spidersilk:
I think I just solved my own problem. :)
I set the minimum length for province/state and postal code to 0, then (after some poking around to figure out what needed editing) opened up tpl_modules_create_account.php and saved a copy of it in my custom template folder, and commented out line 99:
// if (zen_not_null(ENTRY_STATE_TEXT)) echo '##<span class="alert" id="stText">' . ENTRY_STATE_TEXT . '</span>';
> And part of line 110 as follows:
> ```
<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"');
// (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' . ENTRY_POST_CODE_TEXT . '</span>': '');
(remembering to put a semicolon at the point where I broke the line.
I saved the file, went to the create account form, and ta-da! No more "required" asterisk next to those fields. I filled in the form to create a test account, leaving those fields blank, and expecting to still get tripped up by some kind of Javascript verification, and to my astonishment nothing went wrong -- it accepted the form, with no state or postal code. :clap:
So I guess it doesn't use Javascript validation for those specific fields, or at least not if they've already been set to 0 in the Minimum Values area of the admin.
So... For anyone else who's wanting to make some customer fields optional, apparently this is how you do it.
this doesn't work for country code however.. even though i commented out the php code, i still get country code invalid on registration - even though country does not even show up on the form.
Zen Follower
Abomni:
Problem solved.
According to Numinix the only change is to download the new version of header_php.php to includes/modules/pages/login/ - this worked for me on 2 sites.
can you be more specific on this as i'm having the same problem.. what is 'numinix' and where do you download the new version from as i'm using the latest zen cart just downloaded last month.
Totally Zenned
Let's stay with one thread, can we? You've hijacked a three-year-old thread and many who posted may no longer be active.
AND... any info here is suggesting code that may not work EVER with 1.5.5.
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com
Zen Follower
dbltoe:
Let's stay with one thread, can we? You've hijacked a three-year-old thread and many who posted may no longer be active.
AND... any info here is suggesting code that may not work EVER with 1.5.5.
Sorry about that. Thought i would get more exposure for my problem if i joined in on other threads.
Tell staff why this post should be reviewed.