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

country before state

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 06-14-2005, 07:53 PM
  echidna's Avatar 
echidna echidna is offline
 

Member
  
Join Date: Jan 2005
Posts: 11
 

Default

Quote:
Originally Posted by cybrgman
Ok I got it and it works

The only other thing I had to do was to also reverse the country and state fields in the register_states.tpl

Works like a charm

Thanks guys for your help .... excellent

Where does register_states.tpl get rendered? I can't find it's output in the checkout process.

The state before country thing is amazingly poor design, as is the requirement to enter names repeatedly

I've got to get the checkout form reformed. Any advise would be cherished
__________________
Confidence is what you have before you understand the problem.
I and I are administering both;
X-Cart 4.0.12 * FreeBSD * Apache * PHP 4.3.10
&
X-Cart 4.0.9 * Linux * Apache * PHP 4.3.10
Reply With Quote
  #12  
Old 07-08-2005, 05:00 AM
 
Mary Jo Robins Mary Jo Robins is offline
 

Advanced Member
  
Join Date: Aug 2003
Location: Virginia Beach, VA 23462
Posts: 87
 

Default please explain more

cybrgman

can you please explain this a little better for me ? Does this move the country before the state in the registration form?

Quote:
The only other thing I had to do was to also reverse the country and state fields in the register_states.tpl

can you show your file so that I can ensure mine is correct.
__________________
X-Cart version 4.0.14
Sales-n-Stats 1.1 build 36
PHP 5.0.5
MySQL server 4.1.22-Standard
Perl 5.008
Reply With Quote
  #13  
Old 09-28-2005, 08:33 PM
 
tracey_ccishop tracey_ccishop is offline
 

Advanced Member
  
Join Date: Aug 2005
Posts: 55
 

Default

I also had a similar issue and got this code back from tech support. It changes the customer registration form so that the user has to enter the country they are in first and then a drop down box appears with the list of states for that country.
Hope it helps


Please perform following steps:
>
> 1. Open '<xcart_root_dir>/skin1/main/register_states.tpl' template.
>
> 2. Replace :
>
> ---
> <SELECT name="{$country_name}" id="{$country_name}"
> onChange="check_zip_code_field(document.forms['{$form_name}'].{$country_n
> ame}, document.forms['{$form_name}'].{$zipcode_name});
> change_states(document.getElementById('{$country_n ame}'),
> '{$state_name}', '{$county_name}', '{$lng.lbl_state|replace:"'":"\'"}',
> '{$state|replace:"'":"\'"}', '{$is_no_input}',
> '{$full_state|replace:"'":"\'"}',
> '','{$userinfo.$county_name|replace:"'":"\'"}','{$ userinfo.$county_name|r
> eplace:"'":"\'"}'); change_counties('{$county_name}',
> document.getElementById('_{$state_name}'),
> document.getElementById('{$country_name}'),
> '{$userinfo.$county_name}','{$userinfo.$county_nam e}');">
> {foreach from=$countries item=v}
> <OPTION value="{$v.country_code}"{if $country eq $v.country_code}
> selected{elseif $v.country_code eq $config.General.default_country and
> $country eq ""}selected{/if}>{$v.country}</OPTION>
> {/foreach}
> </SELECT>
> ---
>
> with
>
> ---
> <SELECT name="{$country_name}" id="{$country_name}"
> onChange="check_zip_code_field(document.forms['{$form_name}'].{$country_n
> ame}, document.forms['{$form_name}'].{$zipcode_name});
> change_states(document.getElementById('{$country_n ame}'),
> '{$state_name}', '{$county_name}', '{$lng.lbl_state|replace:"'":"\'"}',
> '{$state|replace:"'":"\'"}', '{$is_no_input}',
> '{$full_state|replace:"'":"\'"}',
> '','{$userinfo.$county_name|replace:"'":"\'"}','{$ userinfo.$county_name|r
> eplace:"'":"\'"}'); change_counties('{$county_name}',
> document.getElementById('_{$state_name}'),
> document.getElementById('{$country_name}'),
> '{$userinfo.$county_name}','{$userinfo.$county_nam e}');">
> <OPTION value="" selected>Please select country...</OPTION>
>
> {foreach from=$countries item=v}
> <OPTION value="{$v.country_code}"{if $country eq $v.country_code}
> selected{/if}>{$v.country}</OPTION>
> {/foreach}
> </SELECT>
> ---
>
> After that your customers will see 'Please select country...' option in
> 'Country' drop-down box first.
__________________
Thanks,
www.ccishop.com
X-Cart Gold v4.0.14
Reply With Quote
  #14  
Old 12-01-2006, 01:17 PM
 
dcorwin dcorwin is offline
 

Advanced Member
  
Join Date: May 2004
Location: Hollywood, CA
Posts: 33
 

Default Re: country before state

This seems to have changed in version 4.1. Any ideas how I might implement this little mod?

Thanks!
__________________
Dave Polcino
Sampledump.com
Noise & Vision
XCart Pro 4.1.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 11:01 AM.

   

 
X-Cart forums © 2001-2020