X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Country Code in States Dropdown (https://forum.x-cart.com/showthread.php?t=9069)

mffowler 08-24-2004 10:47 PM

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

lyncca 08-25-2004 06:15 AM

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

Emerson 08-25-2004 06:42 AM

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

mffowler 08-25-2004 06:59 AM

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

Emerson 08-25-2004 07:04 AM

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


All times are GMT -8. The time now is 05:56 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.