Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2009
    Posts
    86
    Plugin Contributions
    0

    help question states/provinces not drop down

    on my create account page, i choose the country from country drop-down box, but the states/provinces field doesn't show drop-down but only shows "Type a choice below",
    even i choose country USA (the usa zones are installed automaticaly with zencart 1.38a), but still no states drop-down.

    my setting in admin is:
    States - true
    States - Always shown on list? - true

    PS: on my shopping cart page, for the shipping estimate, i can see the dropdown states

    i don't know why the dropdown doesn't show on create account page. any ideas?

  2. #2
    Join Date
    Jul 2009
    Posts
    234
    Plugin Contributions
    1

    Default Re: states/provinces not drop down

    Go to Admin -Configuration - Customer Details and set State - Always display as pulldown? to true

    That should make it a drop down list :) hope that helps

  3. #3
    Join Date
    Jul 2009
    Posts
    86
    Plugin Contributions
    0

    help question Re: states/provinces not drop down

    Quote Originally Posted by Ooba_Scott View Post
    Go to Admin -Configuration - Customer Details and set State - Always display as pulldown? to true

    That should make it a drop down list :) hope that helps
    yes i did.
    in my admin i set
    State - true
    State - Always display as pulldown? - ture

    from the browser, i get an error says:
    update_zone is not defined

    in this line:
    <body id="createaccountBody" onload="update_zone(document.create_account);">

    what that means?

  4. #4
    Join Date
    Jul 2009
    Posts
    234
    Plugin Contributions
    1

    Default Re: states/provinces not drop down

    hmm, have you got an url to your website?

    It helps when trying to decifer problems

  5. #5
    Join Date
    Jul 2009
    Posts
    86
    Plugin Contributions
    0

    help question Re: states/provinces not drop down

    hi, i found what the problem is,
    but i have no idea what do i fix the problem

    because i put a modified html_header.php in my template folder:
    /includes/templates/myowntemplate/common/html_header.php

    the modified html_header.php is:
    PHP Code:
    <?php?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS?>>
    <head>
    <title><?php echo META_TAG_TITLE?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET?>" />
    <meta name="keywords" content="<?php echo META_TAG_KEYWORDS?>" />
    <meta name="description" content="<?php echo META_TAG_DESCRIPTION?>" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="author" content="The Zen Cart&trade; Team and others" />
    <meta name="generator" content="shopping cart program by Zen Cart&trade;, http://www.zen-cart.com eCommerce" />
    <?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance' || $robotsNoIndex === true) { ?>
    <meta name="robots" content="noindex, nofollow" />
    <?php ?>
    <?php 
    if (defined('FAVICON')) { ?>
    <link rel="icon" href="<?php echo FAVICON?>" type="image/x-icon" />
    <link rel="shortcut icon" href="<?php echo FAVICON?>" type="image/x-icon" />
    <?php //endif FAVICON ?>

    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER DIR_WS_HTTPS_CATALOG HTTP_SERVER DIR_WS_CATALOG ); ?>" />

    <?php
        $jscript_files_to_load 
    $css_files_to_load = array();
    /**
     * load all template-specific stylesheets, named like "style*.css", alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css'), '/^style/''.css');
      while(list (
    $key$value) = each($directory_array)) {
        
    $css_files_to_load[$value] = -300;
      }
    /**
     * load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza.
     */
      
    $manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : '';
      
    $tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : '';
      
    $tmp_pagename = ($this_is_home_page) ? 'index_home' $current_page_base;
      
    $sheets_array = array('/' $_SESSION['language'] . '_stylesheet'
                            
    '/' $tmp_pagename
                            
    '/' $_SESSION['language'] . '_' $tmp_pagename
                            
    '/c_' $cPath,
                            
    '/' $_SESSION['language'] . '_c_' $cPath,
                            
    '/m_' $manufacturers_id,
                            
    '/' $_SESSION['language'] . '_m_' . (int)$manufacturers_id
                            
    '/p_' $tmp_products_id,
                            
    '/' $_SESSION['language'] . '_p_' $tmp_products_id
                            
    );
      while(list (
    $key$value) = each($sheets_array)) {
        
    //echo "<!--looking for: $value-->\n";
        
    $perpagefile $template->get_template_dir('.css'DIR_WS_TEMPLATE$current_page_base'css') . $value '.css';
        if (
    file_exists($perpagefile)) $css_files_to_load[trim($value'/').'.css'] = -200;
      }

    /**
     * load printer-friendly stylesheets -- named like "print*.css", alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css'), '/^print/''.css');
      
    sort($directory_array);
      while(list (
    $key$value) = each($directory_array)) {
        echo 
    '<link rel="stylesheet" type="text/css" media="print" href="' $template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css') . '/' $value '" />'."\n";
      }
      
      if (
    file_exists(DIR_WS_CLASSES 'browser.php')) {
        include_once(
    DIR_WS_CLASSES 'browser.php');
        
    $browser = new browser();
        
    $browser_name strtolower($browser->Name);
        if ((
    $browser_name == 'msie') && $browser->Version <= 6) {
          
    $directory_array $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css'), '/^ie6-/''.css');
          
    $js_directory_array $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE$current_page_base,'js'), '/^ie6-/''.js');
        } if ((
    $browser_name == 'msie') && $browser->Version >= 7) {
          
    $directory_array $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css'), '/^ie7-/''.css');
          
    $js_directory_array $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE$current_page_base,'js'), '/^ie7-/''.js');
        } elseif (
    $browser_name == 'firefox') {
          
    $directory_array $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css'), '/^ff-/''.css');
          
    $js_directory_array $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE$current_page_base,'js'), '/^ff-/''.js');
        } elseif (
    $browser_name == 'safari') {
          
    $directory_array $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css'), '/^safari-/''.css');
          
    $js_directory_array $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE$current_page_base,'js'), '/^safari-/''.js');
        } elseif (
    $browser_name == 'chrome') {
          
    $directory_array $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css'), '/^chrome-/''.css');
          
    $js_directory_array $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE$current_page_base,'js'), '/^chrome-/''.js');
        }
        while(list (
    $key$value) = each($directory_array )) {
          
    $css_files_to_load[$value] = -100;                                    
        }
        while(list (
    $key$value) = each($js_directory_array )) {
            
    $js_files_to_load[$value] = -500;                
        }    
      }

    /**
     * load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE$current_page_base,'jscript'), '/^jscript_/''.js');
      while(list (
    $key$value) = each($directory_array)) {
        
    $jscript_files_to_load[$value] = -400;
      }                            

    /**
     * load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically
     */
      
    $directory_array $template->get_template_part($page_directory'/^jscript_/''.js');
      while(list (
    $key$value) = each($directory_array)) {
        
    $jscript_files_to_load[$value] = -300;
      }

    /**
     * load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE$current_page_base,'jscript'), '/^jscript_/''.php');
      while(list (
    $key$value) = each($directory_array)) {
    /**
     * include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
     * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
     */
        
    $jscript_files_to_load[$value] = -200;
      }
    /**
     * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
     */
      
    $directory_array $template->get_template_part($page_directory'/^jscript_/');
      while(list (
    $key$value) = each($directory_array)) {
    /**
     * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
     * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
     */
        
    $jscript_files_to_load[$value] = -100;
      }

      
    $files loadCssJsFiles($css_files_to_load$jscript_files_to_load);
      foreach(
    $files['css'] as $file)
          if(
    $file['include']) include($file['string']);
          else echo 
    $file['string'];
          
      foreach(
    $files['js'] as $file)
          if(
    $file['include']) include($file['string']);
          else echo 
    $file['string'];
      
    //DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
    ?>
    </head>
    <?php // NOTE: Blank line following is intended: ?>

    the origin html_header.php is:
    PHP Code:
    <?php
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS?>>
    <head>
    <title><?php echo META_TAG_TITLE?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET?>" />
    <meta name="keywords" content="<?php echo META_TAG_KEYWORDS?>" />
    <meta name="description" content="<?php echo META_TAG_DESCRIPTION?>" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="author" content="The Zen Cart&trade; Team and others" />
    <meta name="generator" content="shopping cart program by Zen Cart&trade;, http://www.zen-cart.com eCommerce" />
    <?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance' || $robotsNoIndex === true) { ?>
    <meta name="robots" content="noindex, nofollow" />
    <?php ?>
    <?php 
    if (defined('FAVICON')) { ?>
    <link rel="icon" href="<?php echo FAVICON?>" type="image/x-icon" />
    <link rel="shortcut icon" href="<?php echo FAVICON?>" type="image/x-icon" />
    <?php //endif FAVICON ?>

    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER DIR_WS_HTTPS_CATALOG HTTP_SERVER DIR_WS_CATALOG ); ?>" />

    <?php

    /**
     * load all template-specific stylesheets, named like "style*.css", alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css'), '/^style/''.css');
      while(list (
    $key$value) = each($directory_array)) {
        echo 
    '<link rel="stylesheet" type="text/css" href="' $template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css') . '/' $value '" />'."\n";
      }
    /**
     * load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza.
     */
      
    $manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : '';
      
    $tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : '';
      
    $tmp_pagename = ($this_is_home_page) ? 'index_home' $current_page_base;
      
    $sheets_array = array('/' $_SESSION['language'] . '_stylesheet'
                            
    '/' $tmp_pagename
                            
    '/' $_SESSION['language'] . '_' $tmp_pagename
                            
    '/c_' $cPath,
                            
    '/' $_SESSION['language'] . '_c_' $cPath,
                            
    '/m_' $manufacturers_id,
                            
    '/' $_SESSION['language'] . '_m_' . (int)$manufacturers_id
                            
    '/p_' $tmp_products_id,
                            
    '/' $_SESSION['language'] . '_p_' $tmp_products_id
                            
    );
      while(list (
    $key$value) = each($sheets_array)) {
        
    //echo "<!--looking for: $value-->\n";
        
    $perpagefile $template->get_template_dir('.css'DIR_WS_TEMPLATE$current_page_base'css') . $value '.css';
        if (
    file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' $perpagefile .'" />'."\n";
      }

    /**
     * load printer-friendly stylesheets -- named like "print*.css", alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css'), '/^print/''.css');
      
    sort($directory_array);
      while(list (
    $key$value) = each($directory_array)) {
        echo 
    '<link rel="stylesheet" type="text/css" media="print" href="' $template->get_template_dir('.css',DIR_WS_TEMPLATE$current_page_base,'css') . '/' $value '" />'."\n";
      }

    /**
     * load all site-wide jscript_*.js files from includes/templates/YOURTEMPLATE/jscript, alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE$current_page_base,'jscript'), '/^jscript_/''.js');
      while(list (
    $key$value) = each($directory_array)) {
        echo 
    '<script type="text/javascript" src="' .  $template->get_template_dir('.js',DIR_WS_TEMPLATE$current_page_base,'jscript') . '/' $value '"></script>'."\n";
      }

    /**
     * load all page-specific jscript_*.js files from includes/modules/pages/PAGENAME, alphabetically
     */
      
    $directory_array $template->get_template_part($page_directory'/^jscript_/''.js');
      while(list (
    $key$value) = each($directory_array)) {
        echo 
    '<script type="text/javascript" src="' $page_directory '/' $value '"></script>' "\n";
      }

    /**
     * load all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically
     */
      
    $directory_array $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE$current_page_base,'jscript'), '/^jscript_/''.php');
      while(list (
    $key$value) = each($directory_array)) {
    /**
     * include content from all site-wide jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
     * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
     */
        
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE$current_page_base,'jscript') . '/' $value); echo "\n";
      }
    /**
     * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
     */
      
    $directory_array $template->get_template_part($page_directory'/^jscript_/');
      while(list (
    $key$value) = each($directory_array)) {
    /**
     * include content from all page-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
     * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
     */
        
    require($page_directory '/' $value); echo "\n";
      }

    //DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
    ?>
    </head>
    <?php // NOTE: Blank line following is intended: ?>

    after i put that modified html_header.php, i get the errors on zone dropdown and page popup:
    update_zone is not defined
    session_win is not defined

    but i need that modified html_header.php, what do i fix those two errors then?

    thanks in advance

  6. #6
    Join Date
    Jul 2009
    Posts
    234
    Plugin Contributions
    1

    Default Re: states/provinces not drop down

    By the looks of it you ahve quite heavily modded that file.

    Looks like your doing browser checks and pulling in new files etc....it might be that there is an mistake or an error in one of those new files.

    Or there is still some redundant code left in that file that is not needed as you have modded it

    Sorry i dont think i am going to be much help from here. Its not something i am going to be able to debug easily


    Maybe mod that file a bit by bit and keep testing it until you pin point which bit is causing it to break......it may be something simple as a missing comma or quote mark etc.....


    Good luck

 

 

Similar Threads

  1. setting up states in drop down
    By pbean in forum General Questions
    Replies: 0
    Last Post: 21 Jul 2010, 05:18 PM
  2. Drop-down file for states
    By EZorb in forum Managing Customers and Orders
    Replies: 3
    Last Post: 3 Apr 2010, 06:47 AM
  3. Country States/provinces/prefectures
    By medman in forum PayPal Website Payments Pro support
    Replies: 1
    Last Post: 10 Jun 2008, 07:52 AM

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