X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   check box for "same as billing address" (https://forum.x-cart.com/showthread.php?t=9160)

usiripakdi 04-19-2005 09:27 AM

I can't get anything to work. When I click on "Use Billing Address as Shipping Address" I get "Error on Page"

Here is the code. Somebody Help!!

copybilling.js

Code:

function InitSaveVariables_shipping(form){
s_address = form.s_address.value;
s_address_2 = form.s_address_2.value;
s_city = form.s_city.value;
s_state = form.s_state.value;
_s_state = form._s_state.value;
s_country = form.s_country.value;
s_zipcode = form.s_zipcode.value;
}

function copybilling(form){
if (form.copyb.checked){
InitSaveVariables_shipping(form);
form.s_address.value = form.b_address.value;
form.s_address_2.value = form.b_address_2.value;
form.s_city.value = form.b_city.value;
form.s_state.value = form.b_state.value;
form._s_state.value = form._b_state.value;
form.s_country.value = form.b_country.value;
form.s_zipcode.value = form.b_zipcode.value;
}

else {
form.s_address.value = "";
form.s_address_2.value = "";
form.s_city.value = "";
form.s_state.value = form.b_state.value;
form._s_state.value = "";
form.s_country.value = form.b_country.value;
form.s_zipcode.value = "";
}
}



home.tpl
Code:

{* $Id: home.tpl,v 1.67.2.6 2004/12/01 15:15:48 mclap Exp $ *}
{if $printable ne ''}
{include file="customer/home_printable.tpl"}
{else}
{config_load file="$skin_config"}
<HTML>
<HEAD>
<TITLE>
{if $config.SEO.page_title_format eq "A"}
{section name=position loop=$location}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{else}
{section name=position loop=$location step=-1}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{/if}
</TITLE>
{ include file="meta.tpl" }
<LINK rel="stylesheet" href="{$SkinDir}/{#CSSFile#}">
<script language=JavaScript1.3 src="{$SkinDir}/copybilling.js"></script>

</HEAD>
<BODY leftmargin="0" topmargin="0" rightmargin="0" bottomargin="0" marginwidth="0" marginheight="0">
{ include file="rectangle_top.tpl" }
{ include file="head.tpl" }
{if $active_modules.SnS_connector}
{include file="modules/SnS_connector/header.tpl"}
{/if}

<TABLE border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
<TR>
<TD class="left" width="170" valign="top">
{if $categories ne "" and ($active_modules.Fancy_Categories ne "" or $config.General.root_categories eq "Y" or $subcategories ne "")}
{ include file="customer/categories.tpl" }
{/if}
{if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu eq "Y"}
{ include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}
{if $active_modules.Manufacturers ne "" and $config.Modules.manufacturers_menu eq "Y"}
{ include file="modules/Manufacturers/menu_manufacturers.tpl" }
{/if}
{include file="customer/special.tpl"}
{ include file="help.tpl" }
[img]{$ImagesDir}/spacer.gif[/img]
</TD>
<TD width="20"></TD>
<TD valign="top">



{include file="dialog_message.tpl"}
{if $active_modules.Special_Offers ne ""}
{include file="modules/Special_Offers/customer/new_offers_message.tpl"}
{/if}
{include file="customer/home_main.tpl"}


</TD>
<TD width="20"></TD>
<TD class="right" width="170" valign="top">
{if $active_modules.SnS_connector}
{include file="modules/SnS_connector/button.tpl"}

{/if}
{if $active_modules.Feature_Comparison ne "" && $comparison_products ne ''}
{ include file="modules/Feature_Comparison/product_list.tpl" }
{/if}
{if $active_modules.Users_online ne ""}
{ include file="modules/Users_online/menu_users_online.tpl" }
{/if}
{ include file="customer/menu_cart.tpl" }
{if $login eq "" }
{ include file="auth.tpl" }
{else}
{ include file="authbox.tpl" }
{/if}
{ include file="news.tpl" }
{if $active_modules.Interneka ne ""}
{ include file="modules/Interneka/menu_interneka.tpl" }
{/if}
{ include file="poweredby.tpl" }
[img]{$ImagesDir}/spacer.gif[/img]
</TD>
</TR>
</TABLE>
{ include file="rectangle_bottom.tpl" }
</BODY>
</HTML>
{/if}


register_billing_address.tpl

Code:

{* $Id: register_billing_address.tpl,v 1.15.2.4 2005/03/09 11:44:27 max Exp $ *}
{if $default_fields.b_state.avail eq 'Y' && $default_fields.b_country.avail eq 'Y' && $js_enabled eq 'Y' && $config.Adaptives.isJS eq 'Y' && $config.General.use_js_states eq 'Y' && $config.Adaptives.isDOM eq 'Y'}{include file="change_states_js.tpl"}{/if}
{if $is_areas.B eq 'Y'}
{if $hide_header eq ""}
<TR>
<TD height="20" colspan="3">{$lng.lbl_billing_address}<HR size="1" noshade></TD>
</TR>
{/if}

{if $action eq "cart"}
<INPUT type="hidden" name="action" value="cart">
<INPUT type="hidden" name="paymentid" value="{$paymentid}">

{if $default_fields.title.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_title}</TD>
<TD>{if $default_fields.title.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<SELECT name="b_title">
{section name=title loop=$name_titles}
<OPTION {if $userinfo.b_title eq $name_titles[title]}selected{/if}>{$name_titles[title]}</OPTION>
{/section}
</SELECT>
</TD>
</TR>
{/if}

{if $default_fields.firstname.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_first_name}</TD>
<TD>{if $default_fields.firstname.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" name="b_firstname" size="32" maxlength="32" value="{$userinfo.b_firstname}">
{if $reg_error ne "" and $userinfo.b_firstname eq "" && $default_fields.firstname.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

{if $default_fields.lastname.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_last_name}</TD>
<TD>{if $default_fields.lastname.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" name="b_lastname" size="32" maxlength="32" value="{$userinfo.b_lastname}">
{if $reg_error ne "" and $userinfo.b_lastname eq "" && $default_fields.lastname.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}
{/if}

{if $default_fields.b_address.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_address}</TD>
<TD>{if $default_fields.b_address.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" id="b_address" name="b_address" size="32" maxlength="64" value="{$userinfo.b_address}">
{if $reg_error ne "" and $userinfo.b_address eq "" and $default_fields.b_address.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

{if $default_fields.b_address_2.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_address_2}</TD>
<TD>{if $default_fields.b_address_2.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" id="b_address_2" name="b_address_2" size="32" maxlength="64" value="{$userinfo.b_address_2}">
{if $reg_error ne "" and $userinfo.b_address_2 eq "" and $default_fields.b_address_2.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

{if $default_fields.b_city.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_city}</TD>
<TD>{if $default_fields.b_city.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" id="b_city" name="b_city" size="32" maxlength="64" value="{$userinfo.b_city}">
{if $reg_error ne "" and $userinfo.b_city eq "" and $default_fields.b_city.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

{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}

{if $default_fields.b_state.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_state}</TD>
<TD>{if $default_fields.b_state.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
{include file="main/states.tpl" states=$states name="b_state" default=$userinfo.b_state default_country=$userinfo.b_country country_name="b_country"}
{if $error eq "b_statecode" and $default_fields.b_state.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

{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="32" maxlength="32" 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>
{* ======== COPY BILLING TO SHIPPING MOD ======= *}
<TR>
<TD align="right"></TD>
<TD></TD>
<TD nowrap>
<input type="checkbox" name="copyb" onclick="javascript:copybilling(this.form);">Use {$lng.lbl_billing_address} as {$lng.lbl_shipping_address}

 
</TD>
</TR>
{* ======== COPY BILLING TO SHIPPING MOD ======= *}


{/if}
{include file="main/register_additional_info.tpl" section="B"}
{/if}




How matter how I chaged it. Still "Error on Page"
so frustrated.

dgrif 04-19-2005 09:31 AM

Did you go into admin and make the information required?
I had to do that to get mine to work.

Delores

usiripakdi 04-19-2005 09:40 AM

I made the change to make the shipping requirement same as the billing requirement. Still "Error on Page"

Check it out at my site
www.thaimediastore.com/home.php

dont' worry about the cart or register. It is still a testing site.

dgrif 04-19-2005 10:21 AM

Here is my code try this as mine does work
 
copybillin.js
function InitSaveVariables_shipping(form){
s_address = form.s_address.value;
s_address_2 = form.s_address_2.value;
s_city = form.s_city.value;
s_state = form.s_state.value;
_s_state = form._s_state.value;
s_country = form.s_country.value;
s_zipcode = form.s_zipcode.value;
}

function copybilling(form){
if (form.copyb.checked){
InitSaveVariables_shipping(form);
form.s_address.value = form.b_address.value;
form.s_address_2.value = form.b_address_2.value;
form.s_city.value = form.b_city.value;
form.s_state.value = form.b_state.value;
form._s_state.value = form._b_state.value;
form.s_country.value = form.b_country.value;
form.s_zipcode.value = form.b_zipcode.value;
}

else {
form.s_address.value = "";
form.s_address_2.value = "";
form.s_city.value = "";
form.s_state.value = form.b_state.value;
form._s_state.value = "";
form.s_country.value = form.b_country.value;
form.s_zipcode.value = "";
}
}


home.tpl
{* $Id: home.tpl,v 1.67.2.6 2004/12/01 15:15:48 mclap Exp $ *}
{if $printable ne ''}
{include file="customer/home_printable.tpl"}
{else}
{config_load file="$skin_config"}
<HTML>
<HEAD>
<TITLE>
{if $config.SEO.page_title_format eq "A"}
{section name=position loop=$location}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{else}
{section name=position loop=$location step=-1}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{/if}
</TITLE>
{ include file="meta.tpl" }
<LINK rel="stylesheet" href="{$SkinDir}/{#CSSFile_c#}">
<script language=JavaScript1.3 src="{$SkinDir}/copybilling.js"></script>
{assign var="fancy_ie_background_color" value="78146E"}
{assign var="fancy_left" value="2"}

</HEAD>
<BODY leftmargin="0" topmargin="0" rightmargin="0" bottomargin="0" marginwidth="0" marginheight="0">
{ include file="rectangle_top.tpl" }
{ include file="head.tpl" }
{if $active_modules.SnS_connector}
{include file="modules/SnS_connector/header.tpl"}
{/if}

<TABLE border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
<TR>
<TD width="3" class="VertMenuBox"></TD>
<TD width="171" valign="top" class="VertMenuBox">
{if $categories ne "" and ($active_modules.Fancy_Categories ne "" or $config.General.root_categories eq "Y" or $subcategories ne "")}
{ include file="customer/categories.tpl" }


{/if}
{if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu eq "Y"}
{ include file="modules/Bestsellers/menu_bestsellers.tpl" }
{/if}
{if $active_modules.Manufacturers ne "" and $config.Modules.manufacturers_menu eq "Y"}
{ include file="modules/Manufacturers/menu_manufacturers.tpl" }
{/if}
{include file="customer/special.tpl"}
{ include file="help.tpl" }
[img]{$ImagesDir}/spacer.gif[/img]
</TD>
<TD width="10"></TD>
<TD valign="top">

{include file="location.tpl"}

{include file="dialog_message.tpl"}

{if $active_modules.Special_Offers ne ""}
{include file="modules/Special_Offers/customer/new_offers_message.tpl"}
{/if}

{include file="customer/home_main.tpl"}


</TD>
<TD width="10"></TD>
<TD width="171" valign="top" class="VertMenuBox">
{if (($main eq 'catalog' && $cat ne '') || $main eq 'product') && $config.Appearance.enabled_printable_version eq 'Y'}
<DIV align="center">
{include file="printable.tpl"}
</DIV>


{/if}
{include file="customer/search.tpl"}


{if $active_modules.SnS_connector}
{include file="modules/SnS_connector/button.tpl"}



{/if}
{if $active_modules.Feature_Comparison ne "" && $comparison_products ne ''}
{ include file="modules/Feature_Comparison/product_list.tpl" }


{/if}
{if $active_modules.Users_online ne ""}
{ include file="modules/Users_online/menu_users_online.tpl" }


{/if}
{ include file="customer/menu_cart.tpl" }


{if $login eq "" }
{ include file="auth.tpl" }


{else}
{ include file="authbox.tpl" }


{/if}


{ include file="news.tpl" }
{if $active_modules.Interneka ne ""}


{ include file="modules/Interneka/menu_interneka.tpl" }
{/if}


{ include file="poweredby.tpl" }


[img]{$ImagesDir}/spacer.gif[/img]
</TD>
</TR>
</TABLE>
{ include file="rectangle_bottom.tpl" }
</BODY>
</HTML>
{/if}


register_billing_address.tpl
{* $Id: register_billing_address.tpl,v 1.15.2.4 2005/03/09 11:44:27 max Exp $ *}
{if $default_fields.b_state.avail eq 'Y' && $default_fields.b_country.avail eq 'Y' && $js_enabled eq 'Y' && $config.Adaptives.isJS eq 'Y' && $config.General.use_js_states eq 'Y' && $config.Adaptives.isDOM eq 'Y'}{include file="change_states_js.tpl"}{/if}
{if $is_areas.B eq 'Y'}
{if $hide_header eq ""}
<TR>
<TD height="20" colspan="3">{$lng.lbl_billing_address}<HR size="1" noshade></TD>
</TR>
{/if}
{if $action eq "cart"}
<INPUT type="hidden" name="action" value="cart">
<INPUT type="hidden" name="paymentid" value="{$paymentid}">
{if $default_fields.title.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_title}</TD>
<TD>{if $default_fields.title.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<SELECT name="b_title">
{section name=title loop=$name_titles}
<OPTION {if $userinfo.b_title eq $name_titles[title]}selected{/if}>{$name_titles[title]}</OPTION>
{/section}
</SELECT>
</TD>
</TR>
{/if}

{if $default_fields.firstname.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_first_name}</TD>
<TD>{if $default_fields.firstname.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" name="b_firstname" size="32" maxlength="32" value="{$userinfo.b_firstname}">
{if $reg_error ne "" and $userinfo.b_firstname eq "" && $default_fields.firstname.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

{if $default_fields.lastname.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_last_name}</TD>
<TD>{if $default_fields.lastname.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" name="b_lastname" size="32" maxlength="32" value="{$userinfo.b_lastname}">
{if $reg_error ne "" and $userinfo.b_lastname eq "" && $default_fields.lastname.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}
{/if}

{if $default_fields.b_address.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_address}</TD>
<TD>{if $default_fields.b_address.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" id="b_address" name="b_address" size="32" maxlength="64" value="{$userinfo.b_address}">
{if $reg_error ne "" and $userinfo.b_address eq "" and $default_fields.b_address.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

{if $default_fields.b_address_2.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_address_2}</TD>
<TD>{if $default_fields.b_address_2.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" id="b_address_2" name="b_address_2" size="32" maxlength="64" value="{$userinfo.b_address_2}">
{if $reg_error ne "" and $userinfo.b_address_2 eq "" and $default_fields.b_address_2.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

{if $default_fields.b_city.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_city}</TD>
<TD>{if $default_fields.b_city.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
<INPUT type="text" id="b_city" name="b_city" size="32" maxlength="64" value="{$userinfo.b_city}">
{if $reg_error ne "" and $userinfo.b_city eq "" and $default_fields.b_city.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

{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.de fault_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}

{if $default_fields.b_state.avail eq 'Y'}
<TR>
<TD align="right">{$lng.lbl_state}</TD>
<TD>{if $default_fields.b_state.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD>
<TD nowrap>
{include file="main/states.tpl" states=$states name="b_state" default=$userinfo.b_state default_country=$userinfo.b_country country_name="b_country"}
{if $error eq "b_statecode" and $default_fields.b_state.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if}
</TD>
</TR>
{/if}

{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="32" maxlength="32" 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>
{* ======== COPY BILLING TO SHIPPING MOD ======= *}
<TR>
<TD align="right"></TD>
<TD></TD>
<TD nowrap>
<input type="checkbox" name="copyb" onclick=javascript:copybilling(this.form);>Use {$lng.lbl_billing_address} as {$lng.lbl_shipping_address}


</TD>
</TR>
{* ======== COPY BILLING TO SHIPPING MOD ======= *}
{/if}
{include file="main/register_additional_info.tpl" section="B"}
{/if}


Hope this helps
Delores

usiripakdi 04-19-2005 03:16 PM

I am sorry but it still doesn't solve the problem. Got "Error on page" plus
all the bottons and menus doesn't display properly.

Check it out at the site
www.thaimediastore.com/home.php

dgrif 04-19-2005 03:23 PM

There is something wrong with your site and the check button doesn't have anything to do with it. It's not displaying properly.
It's going to take someone that's knows more than I do to fix it.


Delores

dgrif 04-19-2005 03:32 PM

Hi,
Go to general setting and make sure this box is not checked
When a customer isn't logged in, it is presumed that he is from the default country.:


Delores

usiripakdi 04-19-2005 04:16 PM

Yes, I checked that and I also checked every line of your code and my code. It is identical. So, I am bummed. :(

bestdata 04-20-2005 09:08 AM

check box for "same as billing address"
 
did u try this ?

<script language=JavaScript1.3 src="/templates/skin1/copybilling.js">

needs to be added to the home.tpl in the templates/skin1/customer

just before </head>

usiripakdi 04-20-2005 12:05 PM

Yes try to change that line from

<script language=JavaScript1.3 src="{$SkinDir}/copybilling.js"></script>

to

<script language=JavaScript1.3 src="/skin1/copybilling.js"></script>

still doesn't work


All times are GMT -8. The time now is 05:58 PM.

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