![]() |
Shipping country/state behavior is perfect, make billing the same?
Right now in the shipping address section, when a customer chooses a country, the state list automatically populates with the states that are listed as part of that country in the database, and if there are no such states a "no states available for this country" message fires and the field becomes not-required.
Then why does the billing address section work differently? Why does every state for every country get listed in the dropdown box, when the most obvious and organized way to handle this has already been programmed and implemented in the other section? My main question is: How can I get the billing address country/state selection to work in the same was as the shipping address? I've tried looking at change_states.js but it's far too complex for me to figure out what's going on to simply change a few variables. Thanks! |
Re: Shipping country/state behavior is perfect, make billing the same?
Figured it out, and is it a weird solution:
In $X-cart_dir/skin1/customer/main/register_billing_address.tpl: Find and CUT: Code:
{if $default_fields.b_state.avail eq 'Y' && $default_fields.b_country.avail eq 'Y' && $js_enabled eq 'Y'} Take that code you just snipped and paste it AFTER the following: Code:
{if $reg_error ne "" and $userinfo.b_country eq "" and $default_fields.b_country.required eq 'Y'}<span class="error-message"><<</span>{/if} Boom - you've got the same functionality in the shipping AND billing sections. Why was this not the default? |
All times are GMT -8. The time now is 04:42 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.