Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2012
    Posts
    151
    Plugin Contributions
    0

    Default how to make zone dropdown?

    for example
    i select country USA,
    the the state will appear dropdown list for usa areas.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: how to make zone dropdown?

    You could go to Locations / Taxes ... Zones ... and add them, or look in the Plugins and search on:
    Zones

    and find numerous Zones that can be added ...
    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!

  3. #3
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: how to make zone dropdown?

    If you are referring to CREATE ACCOUNT, I get your point... right now, the COUNTRY selector is BELOW the STATE selector... meaning that you need to SKIP OVER the state selector, choose the country, then go BACK to the state selector...

    I fixed this some years ago by CHANGING THE POSITIONS of the fieldsets in the tpl_modules_create_account.php:

    ORIGINAL ORDER OF FIELDSETS:

    PHP Code:
    <?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"');
        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"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' ENTRY_POST_CODE_TEXT '</span>'''); ?>
    <br class="clearBoth" />

    <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" />
    </fieldset>
    MY CHANGES
    PHP Code:
    <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" />
    </fieldset>
    <?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"');
        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"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="alert">' ENTRY_POST_CODE_TEXT '</span>'''); ?>
    <br class="clearBoth" />
    Similar treatment can be given to the change-address functions.

  4. #4
    Join Date
    Apr 2012
    Posts
    151
    Plugin Contributions
    0

    Default Re: how to make zone dropdown?

    very good, thank you for your answer

 

 

Similar Threads

  1. Zone rates & MZMT shipping modules, how to make it work properly?
    By langtu123 in forum Addon Shipping Modules
    Replies: 14
    Last Post: 13 May 2011, 09:47 AM
  2. Lower 48 States Zone on checkout form dropdown
    By zepher in forum Managing Customers and Orders
    Replies: 4
    Last Post: 28 Jan 2010, 08:59 PM
  3. Make a Dropdown instead of Input field ?
    By J#xx in forum General Questions
    Replies: 6
    Last Post: 27 Mar 2009, 09:01 AM
  4. How can I make my product sell by country zone?
    By balonglong78 in forum General Questions
    Replies: 2
    Last Post: 22 May 2008, 11:11 AM
  5. Zone DropDown Problem
    By fun4less in forum Managing Customers and Orders
    Replies: 3
    Last Post: 9 Oct 2006, 11:15 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR