View Single Post
  #5  
Old 09-01-2009, 09:34 AM
 
presson83 presson83 is offline
 

Senior Member
  
Join Date: Sep 2008
Posts: 143
 

Default Re: Weird States Dropdown Problem

Here's my states.tpl:

HTML Code:
{* $Id: states.tpl,v 1.15 2008/08/21 09:52:51 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} {if $states ne ""} <select name="{$name}" id="{$name|replace:"[":"_"|replace:"]":""}" {$style}> {if $required eq "N"} <option value="">[{$lng.lbl_please_select_one}]</option> {/if} <option value="{if $value_for_other ne "no"}Other{/if}"{if $default eq "Other"} selected="selected"{/if}>{$lng.lbl_other}</option> {section name=state_idx loop=$states} {if $config.General.default_country eq $states[state_idx].country_code || $country_name eq '' || $default_fields.$country_name.avail eq 'Y'} <option value="{$states[state_idx].state_code|escape}"{if $default eq $states[state_idx].state_code && (!$default_country || $default_country eq $states[state_idx].country_code)} selected="selected"{/if}>{$states[state_idx].country_code}: {$states[state_idx].state|amp}</option> {/if} {/section} </select> {else} <input type="text"{if $name ne ''} id="{$name|replace:"[":"_"|replace:"]":""}"{/if} size="32" maxlength="65" name="{$name}" value="{$default|escape}" /> {/if}

And here's my register_states.tpl:

HTML Code:
{* $Id: register_states.tpl,v 1.15 2008/11/17 12:47:42 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} {if $country_id eq ''} {assign var="country_id" value=$country_name} {/if} <script type="text/javascript"> <!-- init_js_states(document.getElementById('{$country_id}'), '{$state_name}', '{$county_name}', '{$state_value|wm_remove|escape:javascript}', '{$county_value|wm_remove|escape:javascript}'); --> </script>

I don't think I've touched either of those (although when I installed xcart I did forget to add the states table so I had to add it later to my DB.. perhaps something happened when i created it, but I definitley make the table exactly as it is in my other stores via a mysql import.)

Thanks so much for your help on this.
__________________
v 4.1.11, v 4.2
Reply With Quote