Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2010
    Posts
    25
    Plugin Contributions
    0

    Default How do I remove the Country field from the Create Account Form?

    Hi again.

    Got one problem sorted out, now I have another challenge!

    Can anyone please tell me how to remove the country field from the Create Account Form? I have figured out how to alter the field names, but I'm not sure how to remove a field?

    We only ship within the UK, so the country field isn't required.

    Thanks.

  2. #2
    Join Date
    Jun 2009
    Posts
    80
    Plugin Contributions
    0

    Default Re: How do I remove the Country field from the Create Account Form?

    I have made a country called UK and then added zones for England,Scotland etc...

    you can then set it so that the country is UK by default

    that solves the problem of people not being able to order because of country issues...

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: How do I remove the Country field from the Create Account Form?

    I had a similar challenge, but because a lot of UK shippers divide the UK into REGIONS, it helps to retain the FUNCTIONALITY of the "country" element.

    What I did was this:

    1. Change the LABEL (define) for "country" to "region".
    2. Delete ALL Countries from the "countries" table in the database.
    3. Add NEW "countries":-
    • UK Mainland
    • UK Scottish Highlands
    • UK Scottish Islands
    • UK Northern Ireland
    • UK Islands
    • UK Channel Islands


    Then, to add the UK COUNTIES to these "regions", you need to add them as ZONES

    EG:-
    • UK Mainland
    • - Avon
    • - Bedfordshire
    • - Berkshire
    • - City of Bristol
    • - Buckinghamshire
    • - Cambridgeshire
    • - Cambridgeshire and Isle of Ely
    • - Cheshire
    • - Cleveland
    • - Cornwall
    • - Cumberland
    • - Cumbria
    • - Derbyshire
    • - Devon
    • - Dorset
    • - Durham
    • - East Suffolk
    • - East Sussex
    • - ... ETC
    • UK Scottish Highlands
    • - Caithness
    • - Sutherland
    • - Ross and Cromarty
    • - Nairn
    • - Invernesshire

    ... and so on for all REGIONS.

    You will have to "invent" ISO 2 and 3 digit codes of your own, as there are no ISO codes of this kind for these "customized" countries. This will only be an issue if you use 3rd party shipping mods that call to a remote server (eg: fedEx, UPS) where the ISO is a key identifier.

    I made all these changes via phpMyAdmin, using SQL commands to truncate the relevant tables and to insert new data.

    if you use this method, then the following tables are relevant.

    countries
    geo_zones
    zones
    zones_to_geo_zones

    See an example HERE
    (Slightly different from above, but the same principle)
    Last edited by schoolboy; 21 Jan 2010 at 10:34 AM.
    20 years a Zencart User

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: How do I remove the Country field from the Create Account Form?

    ... and yes... LVT LTD is correct. You HAVE to retain the countries function because the checkout process is dependant on it... NO COUNTRIES = NO CHECKOUT POSSIBLE

    PS: In my example site, you will also see that I have REVERSED the position / order of the REGIONS and COUNTY/PROVINCE fields...

    ... this enables the correct display of counties, dependant on the region selected.
    20 years a Zencart User

  5. #5
    Join Date
    Jun 2009
    Posts
    80
    Plugin Contributions
    0

    Default Re: How do I remove the Country field from the Create Account Form?

    School boy can you please state the file and code used to reverse the fields?

    I would love to do that...

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: How do I remove the Country field from the Create Account Form?

    Quote Originally Posted by LVT LTD View Post
    School boy can you please state the file and code used to reverse the fields?

    I would love to do that...


    I'll make a note of this and get back to it.

    PM me in a day or two to nudge me about this...
    20 years a Zencart User

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: How do I remove the Country field from the Create Account Form?

    OK... found them...

    TWO FILES...

    FIRST...

    includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php


    Below is the full code of my tpl_modules_create_account.php

    Before you copy & paste, please note that I also have a bit of javascript in there that FORCES the field inputs to be Name Case, and in the POSTCODE field, it FORCES UPPER CASE.

    When people fill these forms in, many use CAPS LOCK, or just type everything in lower case. When they tab to a new field, the contents of the field they are moving from will be forced into the proper format.

    So if they enter:

    jimmy smith or JIMMY SMITH

    into the Names Fields, it will automatically change it to:

    Jimmy Smith (proper Name Case lettering).

    And if they enter postcode cb1 4gt it will change to CB1 4GT

    PHP Code:
    <?php
    /**
     * Page Template
     *
     * Loaded automatically by index.php?main_page=create_account.<br />
     * Displays Create Account form.
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_modules_create_account.php 4822 2006-10-23 11:11:36Z drbyte $
     */
    ?>

    <?php if ($messageStack->size('create_account') > 0) echo $messageStack->output('create_account'); ?>

    <script type="text/javascript">

    function capitalize(f,m) {

    if (m) /*cap words*/ {
        var temp, tempC, pre, post, strlen;
        temp = f.value.toLowerCase();
        stringLen = temp.length;
          if (stringLen > 0) {
            for (i = 0; i < stringLen; i++) {
              if (i == 0) {
                tempC = temp.substring(0,1).toUpperCase();
                post = temp.substring(1,stringLen);
                temp = tempC + post;
              } else {
                tempC = temp.substring(i,i+1);
                if (tempC == " " && i < (stringLen-1)) {
                tempC = temp.substring(i+1,i+2).toUpperCase();
                pre = temp.substring(0,i+1);
                post = temp.substring(i+2,stringLen);
                temp = pre + tempC + post;
              }
            }
          }
        }
      } else /*cap all*/ {
        var temp = f.value.toUpperCase();
      }
      f.value = temp;
    };

    </script>

    <div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION?></div>
    <br class="clearBoth" />

    <?php
      
    if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
    ?>
    <fieldset>
    <legend><?php echo TABLE_HEADING_PRIVACY_CONDITIONS?></legend>
    <div class="information"><?php echo TEXT_PRIVACY_CONDITIONS_DESCRIPTION;?></div>
    <?php echo zen_draw_checkbox_field('privacy_conditions''1'false'id="privacy"');?>
    <label class="checkboxLabel" for="privacy"><?php echo TEXT_PRIVACY_CONDITIONS_CONFIRM;?></label>
    </fieldset>
    <?php
      
    }
    ?>

    <?php
      
    if (ACCOUNT_COMPANY == 'true') {
    ?>
    <fieldset>
    <legend><?php echo CATEGORY_COMPANY?></legend>
    <div><?php echo ESTABLISHMENT_REQUIREMENTS?></div>
    <label class="inputLabel" for="company"><?php echo ENTRY_COMPANY?></label>
    <?php echo zen_draw_input_field('company'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_company''40') . ' id="company" onchange="capitalize(this,1);"') . (zen_not_null(ENTRY_COMPANY_TEXT) ? '<span class="alert">' ENTRY_COMPANY_TEXT '</span>'''); ?>
    </fieldset>
    <?php
      
    }
    ?>

    <fieldset>
    <legend><?php echo TABLE_HEADING_ADDRESS_DETAILS?></legend>
    <div><?php echo ADDRESS_REQUIREMENTS?></div>
    <?php
      
    if (ACCOUNT_GENDER == 'true') {
    ?>
    <?php 
    echo zen_draw_radio_field('gender''m''''id="gender-male"') . '<label class="radioButtonLabel" for="gender-male">' MALE '</label>' zen_draw_radio_field('gender''f''''id="gender-female"') . '<label class="radioButtonLabel" for="gender-female">' FEMALE '</label>' . (zen_not_null(ENTRY_GENDER_TEXT) ? '<span class="alert">' ENTRY_GENDER_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php
      
    }
    ?>

    <label class="inputLabel" for="firstname"><?php echo ENTRY_FIRST_NAME?></label>
    <?php echo zen_draw_input_field('firstname'''zen_set_field_length(TABLE_CUSTOMERS'customers_firstname''40') . ' id="firstname" onchange="capitalize(this,1);"') . (zen_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="alert">' ENTRY_FIRST_NAME_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="lastname"><?php echo ENTRY_LAST_NAME?></label>
    <?php echo zen_draw_input_field('lastname'''zen_set_field_length(TABLE_CUSTOMERS'customers_lastname''40') . ' id="lastname" onchange="capitalize(this,1);"') . (zen_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="alert">' ENTRY_LAST_NAME_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="street-address"><?php echo ENTRY_STREET_ADDRESS?></label>
      <?php echo zen_draw_input_field('street_address'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_street_address''40') . ' id="street-address" onchange="capitalize(this,1);"') . (zen_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="alert">' ENTRY_STREET_ADDRESS_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <?php
      
    if (ACCOUNT_SUBURB == 'true') {
    ?>
    <label class="inputLabel" for="suburb"><?php echo ENTRY_SUBURB?></label>
    <?php echo zen_draw_input_field('suburb'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_suburb''40') . ' id="suburb" onchange="capitalize(this,1);"') . (zen_not_null(ENTRY_SUBURB_TEXT) ? '<span class="alert">' ENTRY_SUBURB_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php
      
    }
    ?>

    <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" onchange="capitalize(this,1);"') . (zen_not_null(ENTRY_CITY_TEXT) ? '<span class="alert">' ENTRY_CITY_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <!-- GP1206 Begin. This has been moved ABOVE the county/state dropdown, so that Country choice defaults the county choice -->
    <label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY?></label>
    <?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>'''); ?>
    <br class="clearBoth" />
    <!-- GP1206 End -->

    <?php
      
    if (ACCOUNT_STATE == 'true') {
        if (
    $flag_show_pulldown_states == true) {
    ?>
    <label class="inputLabel" for="stateZone" id="zoneLabel"><?php echo ENTRY_STATE?></label>
    <?php
          
    echo zen_draw_pull_down_menu('zone_id'zen_prepare_country_zones_pull_down($selected_country), $zone_id'id="stateZone"');
          if (
    zen_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="alert">' ENTRY_STATE_TEXT '</span>'
        }
    ?>

    <?php if ($flag_show_pulldown_states == true) { ?>
    <br class="clearBoth" id="stBreak" />
    <?php ?>
    <label class="inputLabel" for="state" id="stateLabel"><?php echo $state_field_label?></label>
    <?php
        
    echo zen_draw_input_field('state'''zen_set_field_length(TABLE_ADDRESS_BOOK'entry_state''40') . ' id="state" onchange="capitalize(this,1)');
        if (
    zen_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="alert" id="stText">' ENTRY_STATE_TEXT '</span>';
        if (
    $flag_show_pulldown_states == false) {
          echo 
    zen_draw_hidden_field('zone_id'$zone_name' ');
        }
    ?>
    <br class="clearBoth" />
    <?php
      
    }
    ?>

    <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" onchange="capitalize(this,0);"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' ENTRY_POST_CODE_TEXT '</span>'''); ?>
    <br class="clearBoth" />


    </fieldset>

    <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>

    <?php
      
    if (ACCOUNT_DOB == 'true') {
    ?>
    <fieldset>
    <legend><?php echo TABLE_HEADING_DATE_OF_BIRTH?></legend>
    <label class="inputLabel" for="dob"><?php echo ENTRY_DATE_OF_BIRTH?></label>
    <?php echo zen_draw_input_field('dob','''id="dob"') . (zen_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="alert">' ENTRY_DATE_OF_BIRTH_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    </fieldset>
    <?php
      
    }
    ?>

    <fieldset>
    <legend><?php echo TABLE_HEADING_LOGIN_DETAILS?></legend>
    <label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL_ADDRESS?></label>
    <?php echo zen_draw_input_field('email_address'''zen_set_field_length(TABLE_CUSTOMERS'customers_email_address''40') . ' id="email-address"') . (zen_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="alert">' ENTRY_EMAIL_ADDRESS_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <?php
      
    if ($phpBB->phpBB['installed'] == true) {
    ?>
    <label class="inputLabel" for="nickname"><?php echo ENTRY_NICK?></label>
    <?php echo zen_draw_input_field('nick','','id="nickname"') . (zen_not_null(ENTRY_NICK_TEXT) ? '<span class="alert">' ENTRY_NICK_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php
      
    }
    ?>

    <label class="inputLabel" for="password-new"><?php echo ENTRY_PASSWORD?></label>
    <?php echo zen_draw_password_field('password'''zen_set_field_length(TABLE_CUSTOMERS'customers_password''20') . ' id="password-new"') . (zen_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="alert">' ENTRY_PASSWORD_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="password-confirm"><?php echo ENTRY_PASSWORD_CONFIRMATION?></label>
    <?php echo zen_draw_password_field('confirmation'''zen_set_field_length(TABLE_CUSTOMERS'customers_password''20') . ' id="password-confirm"') . (zen_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="alert">' ENTRY_PASSWORD_CONFIRMATION_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    </fieldset>

    <fieldset>
    <legend><?php echo ENTRY_EMAIL_PREFERENCE?></legend>
    <?php
      
    if (ACCOUNT_NEWSLETTER_STATUS != 0) {
    ?>
    <?php 
    echo zen_draw_checkbox_field('newsletter''1'$newsletter'id="newsletter-checkbox"') . '<label class="checkboxLabel" for="newsletter-checkbox">' ENTRY_NEWSLETTER '</label>' . (zen_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="alert">' ENTRY_NEWSLETTER_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php ?>
    <?php 
    echo zen_draw_radio_field('email_format''HTML', ($email_format == 'HTML' true false),'id="email-format-html"') . '<label class="radioButtonLabel" for="email-format-html">' ENTRY_EMAIL_HTML_DISPLAY '</label>' .  zen_draw_radio_field('email_format''TEXT', ($email_format == 'TEXT' true false), 'id="email-format-text"') . '<label class="radioButtonLabel" for="email-format-text">' ENTRY_EMAIL_TEXT_DISPLAY '</label>'?>
    <br class="clearBoth" />
    </fieldset>

    <?php
      
    if (CUSTOMERS_REFERRAL_STATUS == 2) {
    ?>
    <fieldset>

    <legend><?php echo TABLE_HEADING_REFERRAL_DETAILS?></legend>
    <label class="inputLabel" for="customers_referral"><?php echo ENTRY_CUSTOMERS_REFERRAL?></label>
    <?php echo zen_draw_input_field('customers_referral'''zen_set_field_length(TABLE_CUSTOMERS'customers_referral''15') . ' id="customers_referral"'); ?>
    <br class="clearBoth" />
    </fieldset>
    <?php ?>
    SECOND


    includes/templates/YOUR_TEMPLATE/templates/tpl_modules_address_book_details.php


    Below is the full code of my tpl_modules_address_book_details.php

    PHP Code:
    <?php
    /**
     * Module Template
     *
     * Displays address-book details/selection
     *
     * @package templateSystem
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_modules_address_book_details.php 5924 2007-02-28 08:25:15Z drbyte $
     */
    ?>
    <fieldset>
    <legend><?php echo HEADING_TITLE?></legend>
    <div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION?></div>
    <br class="clearBoth" />

    <?php
      
    if (ACCOUNT_GENDER == 'true') {
        if (isset(
    $gender)) {
          
    $male = ($gender == 'm') ? true false;
        } else {
          
    $male = ($entry->fields['entry_gender'] == 'm') ? true false;
        }
        
    $female = !$male;
    ?>
    <?php 
    echo zen_draw_radio_field('gender''m'$male'id="gender-male"') . '<label class="radioButtonLabel" for="gender-male">' MALE '</label>' zen_draw_radio_field('gender''f'$female'id="gender-female"') . '<label class="radioButtonLabel" for="gender-female">' FEMALE '</label>' . (zen_not_null(ENTRY_GENDER_TEXT) ? '<span class="alert">' ENTRY_GENDER_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <?php
      
    }
    ?>
    <label class="inputLabel" for="firstname"><?php echo ENTRY_FIRST_NAME?></label>
    <?php echo zen_draw_input_field('firstname'$entry->fields['entry_firstname'], zen_set_field_length(TABLE_CUSTOMERS'customers_firstname''40') . ' id="firstname"') . (zen_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="alert">' ENTRY_FIRST_NAME_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <label class="inputLabel" for="lastname"><?php echo ENTRY_LAST_NAME?></label>
    <?php echo zen_draw_input_field('lastname'$entry->fields['entry_lastname'], zen_set_field_length(TABLE_CUSTOMERS'customers_lastname''40') . ' id="lastname"') . (zen_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="alert">' ENTRY_LAST_NAME_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <?php
      
    if (ACCOUNT_COMPANY == 'true') {
    ?>
    <label class="inputLabel" for="company"><?php echo ENTRY_COMPANY?></label>
    <?php echo zen_draw_input_field('company'$entry->fields['entry_company'], zen_set_field_length(TABLE_ADDRESS_BOOK'entry_company''40') . ' id="company"') . (zen_not_null(ENTRY_COMPANY_TEXT) ? '<span class="alert">' ENTRY_COMPANY_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php
      
    }
    ?>

    <label class="inputLabel" for="street-address"><?php echo ENTRY_STREET_ADDRESS?></label>
    <?php echo zen_draw_input_field('street_address'$entry->fields['entry_street_address'], zen_set_field_length(TABLE_ADDRESS_BOOK'entry_street_address''40') . ' id="street-address"') . (zen_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="alert">' ENTRY_STREET_ADDRESS_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php
      
    if (ACCOUNT_SUBURB == 'true') {
    ?>
    <label class="inputLabel" for="suburb"><?php echo ENTRY_SUBURB?></label>
    <?php echo zen_draw_input_field('suburb'$entry->fields['entry_suburb'], zen_set_field_length(TABLE_ADDRESS_BOOK'entry_suburb''40') . ' id="suburb"') . (zen_not_null(ENTRY_SUBURB_TEXT) ? '<span class="alert">' ENTRY_SUBURB_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    <?php
      
    }
    ?>

    <label class="inputLabel" for="city"><?php echo ENTRY_CITY?></label>
    <?php echo zen_draw_input_field('city'$entry->fields['entry_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" />

    <label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY?></label>
    <?php echo zen_get_country_list('zone_country_id'$entry->fields['entry_country_id'], '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>'''); ?>
    <br class="clearBoth" />

    <?php
      
    if (ACCOUNT_STATE == 'true') {
        if (
    $flag_show_pulldown_states == true) {
    ?>
    <label class="inputLabel" for="stateZone" id="zoneLabel"><?php echo ENTRY_STATE?></label>
    <?php
          
    echo zen_draw_pull_down_menu('zone_id'zen_prepare_country_zones_pull_down($selected_country), $zone_id'id="stateZone"');
          if (
    zen_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="alert">' ENTRY_STATE_TEXT '</span>';
        }
    ?>
    <br class="clearBoth" />

    <?php if ($flag_show_pulldown_states == true) { ?>
    <br class="clearBoth" id="stBreak" />
    <?php ?>
    <label class="inputLabel" for="state" id="stateLabel"><?php echo $state_field_label?></label>
    <?php
        
    echo zen_draw_input_field('state'zen_get_zone_name($entry->fields['entry_country_id'], $entry->fields['entry_zone_id'], $entry->fields['entry_state']), zen_set_field_length(TABLE_ADDRESS_BOOK'entry_state''40') . ' id="state"');
        if (
    zen_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="alert" id="stText">' ENTRY_STATE_TEXT '</span>';
        if (
    $flag_show_pulldown_states == false) {
          echo 
    zen_draw_hidden_field('zone_id'$zone_name' ');
        }
    ?>
    <br class="clearBoth" />
    <?php
      
    }
    ?>

    <label class="inputLabel" for="postcode"><?php echo ENTRY_POST_CODE?></label>
    <?php echo zen_draw_input_field('postcode'$entry->fields['entry_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" />



    <?php
      
    if ((isset($_GET['edit']) && ($_SESSION['customer_default_address_id'] != $_GET['edit'])) || (isset($_GET['edit']) == false) ) {
    ?>
    <?php 
    echo zen_draw_checkbox_field('primary''on'false'id="primary"') . ' <label class="checkboxLabel" for="primary">' SET_AS_PRIMARY '</label>'?>
    <?php
      
    }
    ?>
    </fieldset>
    DO NOT overwrite the CORE files in /template_default/

    These are customized and must therefore be saved into your custom template folder (as shown in my path examples above).

    You should also set "Always show state as pulldown" to be "TRUE" - in your admin panel ... configuration ... customer details
    Last edited by schoolboy; 22 Jan 2010 at 12:45 AM.
    20 years a Zencart User

  8. #8
    Join Date
    Jun 2009
    Posts
    80
    Plugin Contributions
    0

    Default Re: How do I remove the Country field from the Create Account Form?

    Brilliant thank you

  9. #9

    Default Re: How do I remove the Country field from the Create Account Form?

    schoolboy: Thanks for the javascript; it works great!

    I was wondering if you know of a way to not change capitalized letters in the middle of a name such as McDonald?

    Thanks again.

 

 

Similar Threads

  1. v139g Remove Some of the Countries from Create Account Drop Down Menu
    By clriding in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 15 Oct 2013, 08:58 PM
  2. How do I make Address line 2 compulsory in the create account form?
    By Liamv in forum Customization from the Admin
    Replies: 3
    Last Post: 3 Mar 2010, 09:12 PM
  3. Replies: 6
    Last Post: 20 Nov 2007, 02:04 AM
  4. Modifying the account create to include form field hints
    By davidhwalker in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 May 2007, 03:43 AM
  5. How can I remove the New Customer Profile Form from the Login Page?
    By jaxbakers in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 7 Oct 2006, 06:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg