View Single Post
  #8  
Old 02-24-2006, 08:05 AM
 
Phlash Phlash is offline
 

Newbie
  
Join Date: Feb 2005
Location: Ridge Manor, FL
Posts: 5
 

Default county

I'm new to X-Cart, but have been reading forums - and trying to learn everything I can.
I find this mod a LOT more user-friendly, than the standard checkout.

However, I NEED info on how to make it copy the COUNTY over, as well.

This is due to my state (FL) having about 5 different tax rates, determined by their 'ship-to' county.

Can anyone advise/update this code, and explain how I can do this?

This is what I tried (but it doesn't work):
---------------------------------

function InitSaveVariables_shipping(form){
s_firstname = form.s_firstname.value;
s_lastname = form.s_lastname.value;
s_address = form.s_address.value;
s_address_2 = form.s_address_2.value;
s_city = form.s_city.value;
s_county = form.s_county.value;
s_state = form.s_state.value;
_s_state = document.getElementById('_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_firstname.value = form.firstname.value;
form.s_lastname.value = form.lastname.value;
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_county.value = form.b_county.value;
form.s_country.value = form.b_country.value;
form.s_zipcode.value = form.b_zipcode.value;
change_states(document.getElementById('s_country') , 's_state', 'State/Province', '', '', '', '');
form.s_state.value = form.b_state.value;
document.getElementById('_s_state').value = document.getElementById('_b_state').value;
}

else {
form.s_firstname.value = "";
form.s_lastname.value = "";
form.s_address.value = "";
form.s_address_2.value = "";
form.s_city.value = "";
form.s_county.value ="";
form.s_country.value = form.b_country.value;
form.s_zipcode.value = "";
change_states(document.getElementById('s_country') , 's_state', 'State/Province', '', '', '', '');
form.s_state.value = form.b_state.value;
document.getElementById('_s_state').value = "";
}
}

-------------------------------------------------------

I assume either I have the wrong value, OR I need to do something within the 'change' areas?

Also, (while on the County subject) I'd also like to swap the county/state to state/county on the checkout, as well.
Therefore a customer wouldn't have to back-track to enter their county, above the state.
I read that this is done in "register_billing_address.tpl", AND "register_shipping_address.tpl" - but ain't smart enough to figure that out, either...

Please HELP - as I would like to get my current site switched over to X-Cart soon.

Thanks in advance,
Gordon
__________________
4.0.17 gold
Reply With Quote