Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Country Code in States Dropdown

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-24-2004, 10:47 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default Country Code in States Dropdown

How can I get rid of the country code in the states dropdown?

Right now the states are shown as:

US: Alabama

When I only want Alabama.

We only sell in the US, so having this is not necessary and prevents users from using a keyboard to select a state easily. I wish there were better ways to display states and countries, especially if I'd rather not have a "United States" dropdown when that is the only option ..

mike.//
__________________
4.1.9
Reply With Quote
  #2  
Old 08-25-2004, 06:15 AM
  lyncca's Avatar 
lyncca lyncca is offline
 

X-Adept
  
Join Date: Nov 2003
Location: Fort Worth, Texas
Posts: 455
 

Default

I know you can change this as ours is the way you would like it. Have you put US as your default country? That may do it. I'm sure someone else will know the answer to this if that isn't it
Reply With Quote
  #3  
Old 08-25-2004, 06:42 AM
 
Emerson Emerson is offline
 

X-Man
  
Join Date: Mar 2004
Location: Atlanta, GA
Posts: 2,209
 

Default

In /skin1/main/states.tpl find:

Code:
<option value="{$states[state_idx].state_code}"{if $default eq $states[state_idx].state_code and $default_country eq $states[state_idx].country_code} selected{/if}>{$states[state_idx].country_code}: {$states[state_idx].state}</option>

and replace it with:
Code:
<option value="{$states[state_idx].state_code}"{if $default eq $states[state_idx].state_code and $default_country eq $states[state_idx].country_code} selected{/if}>{$states[state_idx].state}</option>

In other words, just remove the {$states[state_idx].country_code}: from that line of code.


HTH
__________________
Emerson
Total Server Solutions LLC- Quality X-Cart Hosting
Recommended X-Cart Hosting Provider - US and UK servers
Does your host backup your site? We do EVERY HOUR!!!
Shared Hosting | Managed Cloud | Dedicated Servers
Reply With Quote
  #4  
Old 08-25-2004, 06:59 AM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

Thanks Emerson.

Had to be in states.tpl. Searching for this in the forum, there are loads of problems with states and countries. I hope that this will be included in future development, just the ability to add/take out required options for the contact and registration forms in XC's latest version.

Thanks,

mike.//
__________________
4.1.9
Reply With Quote
  #5  
Old 08-25-2004, 07:04 AM
 
Emerson Emerson is offline
 

X-Man
  
Join Date: Mar 2004
Location: Atlanta, GA
Posts: 2,209
 

Default

Quote:
Originally Posted by mffowler
I hope that this will be included in future development, just the ability to add/take out required options for the contact and registration forms in XC's latest version....

I beleive those are already in place in the 4.x branch
__________________
Emerson
Total Server Solutions LLC- Quality X-Cart Hosting
Recommended X-Cart Hosting Provider - US and UK servers
Does your host backup your site? We do EVERY HOUR!!!
Shared Hosting | Managed Cloud | Dedicated Servers
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:26 PM.

   

 
X-Cart forums © 2001-2020