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