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

Reorder fields in main/register_billing_address.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-03-2006, 07:30 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Reorder fields in main/register_billing_address.tpl

I want to re-order the fields (as displayed) in main/register_billing_address.tpl

I tried "simply" moving things around - but there is some method to the madness... and it appears that the country is tied to state and postal code...

The default order for this tpl is:
What I want is for the customer input to look like this:
note - the country is the last field...

I tried swapping these paragraphs...
Code:
{if $default_fields.b_country.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_country}</TD> <TD>{if $default_fields.b_country.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD> <TD nowrap> <SELECT name="b_country" id="b_country" onChange="check_zip_code()"> {section name=country_idx loop=$countries} <OPTION value="{$countries[country_idx].country_code}"{if $userinfo.b_country eq $countries[country_idx].country_code} selected{elseif $countries[country_idx].country_code eq $config.General.default_country and $userinfo.b_country eq ""} selected{/if}>{$countries[country_idx].country}</OPTION> {/section} </SELECT> {if $reg_error ne "" and $userinfo.b_country eq "" and $default_fields.b_country.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {/if} {/if} {if $default_fields.b_zipcode.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_zip_code}</TD> <TD>{if $default_fields.b_zipcode.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD> <TD nowrap> <INPUT type="text" id="b_zipcode" name="b_zipcode" size="10" maxlength="10" value="{$userinfo.b_zipcode}" onChange="check_zip_code()" > {if $reg_error ne "" and $userinfo.b_zipcode eq "" and $default_fields.b_zipcode.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {/if}

Zip code disappeared

Anyone know how to do this?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #2  
Old 08-04-2006, 02:29 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

You sure you grabbed all the if statements when you swapped them?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 08-04-2006, 03:32 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default

Quote:
Originally Posted by balinor
You sure you grabbed all the if statements when you swapped them?

Yes.

Here's the code with line numbers:
If I grab lines 114-126, and insert it after line 139, I get a 2nd country field.

If I grab lines 131-139 and simply insert it before line 114, the zip/postal code field disappears.

Hmm...

I just looked at about 20 x-cart stores, it appears nobody has changed this! I can live with this, but it's not "customary" for my country... postal code typically comes before "country". Now, if country were the first entry, I would understand... ok, let me try that...

Ok -- I moved the country paragraph to the top (which I like) - but there is STILL the extra country field...

I think this is related to the "county" code:
Code:
{if $default_fields.b_state.avail eq 'Y' && $default_fields.b_country.avail eq 'Y' && $js_enabled eq 'Y' && $config.General.use_js_states eq 'Y'} {include file="main/register_states.tpl" state_name="b_state" country_name="b_country" country=$userinfo.b_country state=$userinfo.b_state|default:$config.General.default_state full_state=$userinfo.b_statename county_name="b_county" default_county=$userinfo.b_countyname default_countyid=$userinfo.b_county form_name="registerform" zipcode_name="b_zipcode"} {else} {if $default_fields.b_county.avail eq 'Y' and $config.General.use_counties eq "Y"} <TR> <TD align="right">{$lng.lbl_county}</TD> <TD>{if $default_fields.b_county.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD> <TD nowrap> {include file="main/counties.tpl" counties=$counties name="b_county" default=$userinfo.b_county country_name="b_country"} {if ($reg_error ne "" and $userinfo.b_county eq "" and $default_fields.b_county.required eq 'Y') or $error eq "b_county"}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {/if}

I can't figure out what's going on in there... I am not using counties - but if I comment this paragraph out, there's an error...

Can someone try to swap these paragraphs and are your results the same?

Thanks,

Jeremy

PS -- putting the country field on top doesn't work -- since the STATES and country are linked ina way -- I only have 2 countries enabled right now (US & Canada) and when Canada is selected, there is a pull down list of provinces. When US is selected, there is a pulldown list of states.

SO -- the design of this input box really should have country before anything, since states (and even counties) are all dependent on the country input. The flaw in the interface design is the customer has to jump around... instead of a linear flow, next, next, next, etc... the customer has to jump down, input country, then they get more options... bad design, IMO.

How are others getting around this? (well, I haven't seen anyone get around it yet -- in all of the xcart "live" demo stores).
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
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 02:50 PM.

   

 
X-Cart forums © 2001-2020