radhavallabh Posted September 4, 2017 Share Posted September 4, 2017 Hi; I am using Oscommerce 2.3.4 Customized BS. I have installed this wonderful addon Country State Selector BS 2.3.4 - https://apps.oscommerce.com/UT1CL&country-state-selector-bs It works perfectly in google chrome but fails to work in Firefox. The states auto update when a country is selected in Google Chrome Browser but not in Firefox...... It can be checked here on my store live.. radhavallabh.com/radhakrishna-store/create_account.php Kindly let me know what shall be the issue The jquery used in the addon is ....... <script type="text/javascript"> $("#inputCountry").change(function(){ id_country = $("#inputCountry").val(); //alert("Has escrito: " + id_country); // cambio los estilos para que se muestre el icono cargando... y se oculte el campo state mientras se cargan los datos. $("#results").css("display", "none"); $("#indicator").css("display", "inline"); $.post("states.php", { country_id: id_country }, function(data){ $("#results").html(data); // despues de cargar los datos, cambio los estilos de nuevo para que se muestre el campo state y se oculte el icono cargando... $("#indicator").css("display", "none"); $("#results").css("display", "inline"); }); }); </script> ............ It will be highly grateful if someone could help me resolve this issue ASAP... Thank you so much for all the valuable help I have been receiving from everyone on this beautiful forum. Warm regds./ radhavallabh Link to comment Share on other sites More sharing options...
♥raiwa Posted September 4, 2017 Share Posted September 4, 2017 Hello @radhavallabh, I just checked and it works for me in a unmodified 2.3.4BS EDGE store in Firefox. If you have a heavy modified store. make sure you have in place the id="inputState" and id="inputCountry" tags in the correspondant input fields. The jquery script uses these ids as selectors. If you still have problems and can't get them solved, you may try this other add-on which is more job to install, but it is more stable: State Selector BS rgds Rainer About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
burt Posted September 4, 2017 Share Posted September 4, 2017 Chrome: does not work Firefox: does not work IE: DOES work Link to comment Share on other sites More sharing options...
PiLLaO Posted September 4, 2017 Share Posted September 4, 2017 @radhavallabh when I enter on your web, chrome console show a lot of errors, maybe you must to fix it before country state works. Bests regards Link to comment Share on other sites More sharing options...
♥raiwa Posted September 4, 2017 Share Posted September 4, 2017 2.3.4 EDGE from May 2017 local test installation under xampp PHP 7.1 Firefox 55.0.3 Country State Selector BS - v2.4.3 => throws some undefined and class constructor alerts but WORKS!: About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted September 4, 2017 Share Posted September 4, 2017 @radhavallabh, just checked again: your store only works on IE and Microsoft EDGE it doesn't work on: Chrome, Safari and Firefox My test store installation works correct in all browsers. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
radhavallabh Posted September 5, 2017 Author Share Posted September 5, 2017 @raiwa @burt @PiLLaO Hi, Thank you so much for your valued responses I will just clear all my browser cache and cookies ... You are right! Just tested again it does not work on Chrome in mobile, but is working on my desktop chrome browser for some reason; Firefox, Safari not working. I checked my id="inputState" and id="inputCountry" tags they are on the proper place. Pasting my createaccount for reference <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2013 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // needs to be included earlier to set the success message in the messageStack require('includes/languages/' . $language . '/create_account.php'); $process = false; if (isset($_POST['action']) && ($_POST['action'] == 'process') && isset($_POST['formid']) && ($_POST['formid'] == $sessiontoken)) { $process = true; if (ACCOUNT_GENDER == 'true') { if (isset($_POST['gender'])) { $gender = tep_db_prepare_input($_POST['gender']); } else { $gender = false; } } $firstname = tep_db_prepare_input($_POST['firstname']); $lastname = tep_db_prepare_input($_POST['lastname']); if (ACCOUNT_DOB == 'true') $dob = tep_db_prepare_input($_POST['dob']); $email_address = tep_db_prepare_input($_POST['email_address']); if (ACCOUNT_COMPANY == 'true') $company = tep_db_prepare_input($_POST['company']); $street_address = tep_db_prepare_input($_POST['street_address']); if (ACCOUNT_SUBURB == 'true') $suburb = tep_db_prepare_input($_POST['suburb']); $postcode = tep_db_prepare_input($_POST['postcode']); $city = tep_db_prepare_input($_POST['city']); if (ACCOUNT_STATE == 'true') { $state = tep_db_prepare_input($_POST['state']); if (isset($_POST['zone_id'])) { $zone_id = tep_db_prepare_input($_POST['zone_id']); } else { $zone_id = false; } } $country = tep_db_prepare_input($_POST['country']); $telephone = tep_db_prepare_input($_POST['telephone']); $fax = tep_db_prepare_input($_POST['fax']); if (isset($_POST['newsletter'])) { $newsletter = tep_db_prepare_input($_POST['newsletter']); } else { $newsletter = false; } $password = tep_db_prepare_input($_POST['password']); $confirmation = tep_db_prepare_input($_POST['confirmation']); $error = false; if (ACCOUNT_GENDER == 'true') { if ( ($gender != 'm') && ($gender != 'f') ) { $error = true; $messageStack->add('create_account', ENTRY_GENDER_ERROR); } } if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_FIRST_NAME_ERROR); } if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_LAST_NAME_ERROR); } if (ACCOUNT_DOB == 'true') { if ((strlen($dob) < ENTRY_DOB_MIN_LENGTH) || (!empty($dob) && (!is_numeric(tep_date_raw($dob)) || !@checkdate(substr(tep_date_raw($dob), 4, 2), substr(tep_date_raw($dob), 6, 2), substr(tep_date_raw($dob), 0, 4))))) { $error = true; $messageStack->add('create_account', ENTRY_DATE_OF_BIRTH_ERROR); } } if (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR); } elseif (tep_validate_email($email_address) == false) { $error = true; $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } else { $check_email_query = tep_db_query("select count(*) as total from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'"); $check_email = tep_db_fetch_array($check_email_query); if ($check_email['total'] > 0) { $error = true; $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_ERROR_EXISTS); } } if (strlen($street_address) < ENTRY_STREET_ADDRESS_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_STREET_ADDRESS_ERROR); } if (strlen($postcode) < ENTRY_POSTCODE_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_POST_CODE_ERROR); } if (strlen($city) < ENTRY_CITY_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_CITY_ERROR); } if (is_numeric($country) == false) { $error = true; $messageStack->add('create_account', ENTRY_COUNTRY_ERROR); } if (ACCOUNT_STATE == 'true') { $zone_id = 0; $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'"); $check = tep_db_fetch_array($check_query); $entry_state_has_zones = ($check['total'] > 0); if ($entry_state_has_zones == true) { $zone_query = tep_db_query("select distinct zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' and (zone_name = '" . tep_db_input($state) . "' or zone_code = '" . tep_db_input($state) . "')"); if (tep_db_num_rows($zone_query) == 1) { $zone = tep_db_fetch_array($zone_query); $zone_id = $zone['zone_id']; } else { $error = true; $messageStack->add('create_account', ENTRY_STATE_ERROR_SELECT); } } else { if (strlen($state) < ENTRY_STATE_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_STATE_ERROR); } } } if (strlen($telephone) < ENTRY_TELEPHONE_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_TELEPHONE_NUMBER_ERROR); } if (strlen($password) < ENTRY_PASSWORD_MIN_LENGTH) { $error = true; $messageStack->add('create_account', ENTRY_PASSWORD_ERROR); } elseif ($password != $confirmation) { $error = true; $messageStack->add('create_account', ENTRY_PASSWORD_ERROR_NOT_MATCHING); } if ($error == false) { $sql_data_array = array('customers_firstname' => $firstname, 'customers_lastname' => $lastname, 'customers_email_address' => $email_address, 'customers_telephone' => $telephone, 'customers_fax' => $fax, 'customers_newsletter' => $newsletter, 'customers_password' => tep_encrypt_password($password)); if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender; if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob); tep_db_perform(TABLE_CUSTOMERS, $sql_data_array); $customer_id = tep_db_insert_id(); $sql_data_array = array('customers_id' => $customer_id, 'entry_firstname' => $firstname, 'entry_lastname' => $lastname, 'entry_street_address' => $street_address, 'entry_postcode' => $postcode, 'entry_city' => $city, 'entry_country_id' => $country); if (ACCOUNT_GENDER == 'true') $sql_data_array['entry_gender'] = $gender; if (ACCOUNT_COMPANY == 'true') $sql_data_array['entry_company'] = $company; if (ACCOUNT_SUBURB == 'true') $sql_data_array['entry_suburb'] = $suburb; if (ACCOUNT_STATE == 'true') { if ($zone_id > 0) { $sql_data_array['entry_zone_id'] = $zone_id; $sql_data_array['entry_state'] = ''; } else { $sql_data_array['entry_zone_id'] = '0'; $sql_data_array['entry_state'] = $state; } } tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array); $address_id = tep_db_insert_id(); tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'"); tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int)$customer_id . "', '0', now())"); if (SESSION_RECREATE == 'True') { tep_session_recreate(); } $customer_first_name = $firstname; $customer_default_address_id = $address_id; $customer_country_id = $country; $customer_zone_id = $zone_id; tep_session_register('customer_id'); tep_session_register('customer_first_name'); tep_session_register('customer_default_address_id'); tep_session_register('customer_country_id'); tep_session_register('customer_zone_id'); // reset session token $sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand()); // restore cart contents $cart->restore_contents(); // build the message content $name = $firstname . ' ' . $lastname; if (ACCOUNT_GENDER == 'true') { if ($gender == 'm') { $email_text = sprintf(EMAIL_GREET_MR, $lastname); } else { $email_text = sprintf(EMAIL_GREET_MS, $lastname); } } else { $email_text = sprintf(EMAIL_GREET_NONE, $firstname); } $email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING; tep_mail($name, $email_address, EMAIL_SUBJECT, $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); tep_redirect(tep_href_link('create_account_success.php', '', 'SSL')); } } $breadcrumb->add(NAVBAR_TITLE, tep_href_link('create_account.php', '', 'SSL')); require('includes/template_top.php'); ?> <div class="page-header"> <h1><?php echo HEADING_TITLE; ?></h1> </div> <?php if ($messageStack->size('create_account') > 0) { echo $messageStack->output('create_account'); } ?> <div class="alert alert-warning"> <?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link('login.php', tep_get_all_get_params(), 'SSL')); ?><span class="text-danger pull-right text-right"><?php echo FORM_REQUIRED_INFORMATION; ?></span> </div> <?php echo tep_draw_form('create_account', tep_href_link('create_account.php', '', 'SSL'), 'post', 'class="form-horizontal"', true) . tep_draw_hidden_field('action', 'process'); ?> <div class="contentContainer"> <h2><?php echo CATEGORY_PERSONAL; ?></h2> <div class="contentText"> <?php if (ACCOUNT_GENDER == 'true') { ?> <div class="form-group has-feedback"> <label class="control-label "><?php echo ENTRY_GENDER; ?></label> <div class="col-sm-9 addresspad"> <label class="radio-inline"> <?php echo tep_draw_radio_field('gender', 'm', NULL, 'required aria-required="true" aria-describedby="atGender"') . ' ' . MALE; ?> </label> <label class="radio-inline"> <?php echo tep_draw_radio_field('gender', 'f') . ' ' . FEMALE; ?> </label> <?php echo FORM_REQUIRED_INPUT; ?> <?php if (tep_not_null(ENTRY_GENDER_TEXT)) echo '<span id="atGender" class="help-block">' . ENTRY_GENDER_TEXT . '</span>'; ?> </div> </div> <?php } ?> <div class="form-group has-feedback"> <label for="inputFirstName" class="control-label "><?php echo ENTRY_FIRST_NAME; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('firstname', NULL, 'required aria-required="true" id="inputFirstName" placeholder="' . ENTRY_FIRST_NAME_TEXT . '"'); echo FORM_REQUIRED_INPUT; ?> </div> </div> <div class="form-group has-feedback"> <label for="inputLastName" class="control-label "><?php echo ENTRY_LAST_NAME; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('lastname', NULL, 'required aria-required="true" id="inputLastName" placeholder="' . ENTRY_LAST_NAME_TEXT . '"'); echo FORM_REQUIRED_INPUT; ?> </div> </div> <?php if (ACCOUNT_DOB == 'true') { ?> <div class="form-group has-feedback"> <label for="dob" class="control-label "><?php echo ENTRY_DATE_OF_BIRTH; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('dob', '', 'required aria-required="true" id="dob" placeholder="' . ENTRY_DATE_OF_BIRTH_TEXT . '"'); echo FORM_REQUIRED_INPUT; ?> </div> </div> <?php } ?> <div class="form-group has-feedback"> <label for="inputEmail" class="control-label "><?php echo ENTRY_EMAIL_ADDRESS; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('email_address', NULL, 'required aria-required="true" id="inputEmail" placeholder="' . ENTRY_EMAIL_ADDRESS_TEXT . '"', 'email'); echo FORM_REQUIRED_INPUT; ?> </div> </div> </div> <?php if (ACCOUNT_COMPANY == 'true') { ?> <div class="contentText"> <h2><?php echo CATEGORY_COMPANY; ?></h2> <div class="form-group"> <label for="inputCompany" class="control-label "><?php echo ENTRY_COMPANY; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('company', NULL, 'id="inputCompany" placeholder="' . ENTRY_COMPANY_TEXT . '"'); ?> </div> </div> </div> <?php } ?> <div class="contentText"> <h2><?php echo CATEGORY_ADDRESS; ?></h2> <div class="form-group has-feedback"> <label for="inputStreet" class="control-label "><?php echo ENTRY_STREET_ADDRESS; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('street_address', NULL, 'required aria-required="true" id="inputStreet" placeholder="' . ENTRY_STREET_ADDRESS_TEXT . '"'); echo FORM_REQUIRED_INPUT; ?> </div> </div> <?php if (ACCOUNT_SUBURB == 'true') { ?> <div class="form-group"> <label for="inputSuburb" class="control-label "><?php echo ENTRY_SUBURB; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('suburb', NULL, 'id="inputSuburb" placeholder="' . ENTRY_SUBURB_TEXT . '"'); ?> </div> </div> <?php } ?> <div class="form-group has-feedback"> <label for="inputCity" class="control-label "><?php echo ENTRY_CITY; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('city', NULL, 'required aria-required="true" id="inputCity" placeholder="' . ENTRY_CITY_TEXT. '"'); echo FORM_REQUIRED_INPUT; ?> </div> </div> <div class="form-group has-feedback"> <label for="inputZip" class="control-label "><?php echo ENTRY_POST_CODE; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('postcode', NULL, 'required aria-required="true" id="inputZip" placeholder="' . ENTRY_POST_CODE_TEXT . '"'); echo FORM_REQUIRED_INPUT; ?> </div> </div> <?php /*?><?php if (ACCOUNT_STATE == 'true') { ?> <div class="form-group has-feedback"> <label for="inputState" class="control-label "><?php echo ENTRY_STATE; ?></label> <div class="col-sm-9 addresspad"> <?php if ($process == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo tep_draw_pull_down_menu('state', $zones_array, 0, 'id="inputState" aria-describedby="atState"'); echo FORM_REQUIRED_INPUT; if (tep_not_null(ENTRY_STATE_TEXT)) echo '<span id="atState" class="help-block">' . ENTRY_STATE_TEXT . '</span>'; } else { echo tep_draw_input_field('state', NULL, 'id="inputState" placeholder="' . ENTRY_STATE_TEXT . '"'); echo FORM_REQUIRED_INPUT; } } else { echo tep_draw_input_field('state', NULL, 'id="inputState" placeholder="' . ENTRY_STATE_TEXT . '"'); echo FORM_REQUIRED_INPUT; } ?> </div> </div> <?php } ?> <div class="form-group has-feedback"> <label for="inputCountry" class="control-label "><?php echo ENTRY_COUNTRY; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_get_country_list('country', NULL, 'required aria-required="true" aria-describedby="atCountry" id="inputCountry"'); echo FORM_REQUIRED_INPUT; if (tep_not_null(ENTRY_COUNTRY_TEXT)) echo '<span id="atCountry" class="help-block">' . ENTRY_COUNTRY_TEXT . '</span>'; ?> </div> </div> </div><?php */?> <?php /*?><div class="form-group has-feedback"> <label for="inputCountry" class="control-label"><?php echo ENTRY_COUNTRY; ?></label> <div class="col-sm-9 addresspad"> <?php if ( $country == '' && MODULE_HEADER_TAGS_GET_STATES_DEFAULT_COUNTRY == 'True') { $country = STORE_COUNTRY; } echo tep_get_country_list('country', $country, 'onChange="getState(this.value)" required aria-required="true" id="inputCountry"'); echo FORM_REQUIRED_INPUT; if (tep_not_null(ENTRY_COUNTRY_TEXT)) echo '<span class="help-block">' . ENTRY_COUNTRY_TEXT . '</span>'; ?> </div> </div> <?php if (ACCOUNT_STATE == 'true') { ?> <div class="form-group has-feedback"> <label for="inputState" class="control-label"><?php echo ENTRY_STATE; ?></label> <div class="col-sm-9 addresspad"> <?php $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'"); $check = tep_db_fetch_array($check_query); $entry_state_has_zones = ($check['total'] > 0); if ($entry_state_has_zones == true) { $zones_array = array(); $zones_array[0] = array('id' => '0', 'text' => PULL_DOWN_DEFAULT); $zones_query = tep_db_query("select zone_name from zones where zone_country_id = '" . (int)$country . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo '<span id="results">'; echo tep_draw_pull_down_menu('state', $zones_array, '', 'id="inputState"'); echo '</span>'; echo FORM_REQUIRED_INPUT; } else { echo '<span id="results">'; echo tep_draw_input_field('state', NULL, 'id="inputState" placeholder="' . ENTRY_STATE . '"'); echo '</span>'; echo FORM_REQUIRED_INPUT; } if (tep_not_null(ENTRY_STATE_TEXT)) echo '<span class="help-block">' . ENTRY_STATE_TEXT . '</span>'; ?> </div> </div> <?php } ?> </div><?php */?> <div class="form-group has-feedback"> <label for="inputCountry" class="control-label"><?php echo ENTRY_COUNTRY; ?></label> <div class="col-sm-9 addresspad"> <?php if ( $country == '' && ACCOUNT_DEFAULT_COUNTRY == 'True') { $country = STORE_COUNTRY; } echo tep_get_country_list('country', $country, 'required aria-required="true" id="inputCountry"'); echo FORM_REQUIRED_INPUT; if (tep_not_null(ENTRY_COUNTRY_TEXT)) echo '<span id="atCountry" class="help-block">' . ENTRY_COUNTRY_TEXT . '</span>'; ?> </div> </div> </div> <?php if (ACCOUNT_STATE == 'true') { ?> <div class="form-group has-feedback" id="statedd"> <label for="inputState" class="control-label"><?php echo ENTRY_STATE; ?></label> <div class="col-sm-9 addresspad"> <?php $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "'"); $check = tep_db_fetch_array($check_query); $entry_state_has_zones = ($check['total'] > 0); if ($entry_state_has_zones == true) { $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name"); while ($zones_values = tep_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } echo '<span id="indicator" style="display:none">'.ENTRY_STATE_INDICATOR.'<img src="images/loader.gif">'.'</span><span id="results">' . tep_draw_pull_down_menu('state', $zones_array, '', 'id="inputState"') . '</span>'; echo FORM_REQUIRED_INPUT; } else { echo '<span id="indicator" style="display:none">'.ENTRY_STATE_INDICATOR.'<img src="images/loader.gif">'.'</span><span id="results">' . tep_draw_input_field('state', NULL, 'id="inputState" placeholder="' . ENTRY_STATE . '"') . '</span>'; echo FORM_REQUIRED_INPUT; } if (tep_not_null(ENTRY_STATE_TEXT)) echo '<span class="help-block">' . ENTRY_STATE_TEXT . '</span>'; ?> </div> </div> <script type="text/javascript"> $("#inputCountry").change(function(){ id_country = $("#inputCountry").val(); //alert("Has escrito: " + id_country); // cambio los estilos para que se muestre el icono cargando... y se oculte el campo state mientras se cargan los datos. $("#results").css("display", "none"); $("#indicator").css("display", "inline"); $.post("states.php", { country_id: id_country }, function(data){ $("#results").html(data); // despues de cargar los datos, cambio los estilos de nuevo para que se muestre el campo state y se oculte el icono cargando... $("#indicator").css("display", "none"); $("#results").css("display", "inline"); }); }); </script> <?php } ?> <div class="contentText"> <h2><?php echo CATEGORY_CONTACT; ?></h2> <div class="form-group has-feedback"> <label for="inputTelephone" class="control-label "><?php echo ENTRY_TELEPHONE_NUMBER; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('telephone', NULL, 'required aria-required="true" id="inputTelephone" placeholder="' . ENTRY_TELEPHONE_NUMBER_TEXT . '"', 'tel'); echo FORM_REQUIRED_INPUT; ?> </div> </div> <div class="form-group"> <label for="inputFax" class="control-label "><?php echo ENTRY_FAX_NUMBER; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('fax', '', 'id="inputFax" placeholder="' . ENTRY_FAX_NUMBER_TEXT . '"', 'tel'); ?> </div> </div> <div class="form-group"> <label for="inputNewsletter" class="control-label "><?php echo ENTRY_NEWSLETTER; ?></label> <div class="col-sm-9 addresspad"> <div class="check checkbox" style="margin-left:5% !important" > <label> <?php echo tep_draw_checkbox_field('newsletter', '1', NULL, 'id="inputNewsletter"'); ?> <?php if (tep_not_null(ENTRY_NEWSLETTER_TEXT)) echo ENTRY_NEWSLETTER_TEXT; ?> </label> </div> </div> </div> </div> <div class="contentText"> <h2><?php echo CATEGORY_PASSWORD; ?></h2> <div class="form-group has-feedback"> <label for="inputPassword" class="control-label "><?php echo ENTRY_PASSWORD; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('password', NULL, 'required aria-required="true" id="inputPassword" autocomplete="new-password" placeholder="' . ENTRY_PASSWORD_TEXT . '"', 'password'); echo FORM_REQUIRED_INPUT; ?> </div> </div> <div class="form-group has-feedback"> <label for="inputConfirmation" class="control-label "><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></label> <div class="col-sm-9 addresspad"> <?php echo tep_draw_input_field('confirmation', NULL, 'required aria-required="true" id="inputConfirmation" autocomplete="new-password" placeholder="' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '"', 'password'); echo FORM_REQUIRED_INPUT; ?> </div> </div> </div> <div class="buttonSet"> <div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fa fa-user', null, 'primary', null, 'btn-success'); ?></div> </div> </div> </form> <?php require('includes/template_bottom.php'); require('includes/application_bottom.php'); ?> Please could you guide me where shall I start digging for the issue exactly.... Thank you so much for helping me through this; Warm Regds radhavallabh Link to comment Share on other sites More sharing options...
♥raiwa Posted September 5, 2017 Share Posted September 5, 2017 @radhavallabh, the file you posted works for me in all browsers. It must be some other modification you have in your store which breaks the code. 16 hours ago, PiLLaO said: @radhavallabh when I enter on your web, chrome console show a lot of errors, maybe you must to fix it before country state works. Meanwhile it seems you are using an older version. The latest version Country State Selector BS - v2.4.4 , doesn't modify the create_account.php file, the script is added via header tag module. rgds Rainer About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
radhavallabh Posted September 5, 2017 Author Share Posted September 5, 2017 @raiwa Hi; Thank you for the hint -- my jqueries were loading async so they loaded after the script was running hence throwing errors. I applied below fix; I have fixed my jquery and jquery ui script tags had async on them so I tried removing them copying the script to the base of template_bottom.php. Please check now my browsers Chrome, Firefox, IE are testing fine; Please could you cross check at your with different browsers for me once too... I would be highly obliged. Awaiting your response; Warm Regds./ radhavallabh Link to comment Share on other sites More sharing options...
♥raiwa Posted September 5, 2017 Share Posted September 5, 2017 @radhavallabh, Safari is the only browser which works now, but the page loading spinner in the URL field at the top never stops. All other browser show the loading spinner or "Please wait.." message but never arrives to update the state menu Why not try the latest version with the script in header-tag. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
radhavallabh Posted September 5, 2017 Author Share Posted September 5, 2017 @raiwa Hi, Thank you for the update I just upgraded to the latest version with header tag and removed the script from all pages. Now Only The header tag module is active with the jquery script working. Please could you cross check if you still cannot view it.. Please clear your cache as I have made fresh cache copies of js and css zip.. Thank you once again for guiding me.. I await your update on the browsers if they work now Warm regds./ radhavallabh Link to comment Share on other sites More sharing options...
♥raiwa Posted September 5, 2017 Share Posted September 5, 2017 @radhavallabh, still doesn't work. I see 3 possibilities: 1. 18 hours ago, PiLLaO said: @radhavallabh when I enter on your web, chrome console show a lot of errors, maybe you must to fix it before country state works. 2. 18 hours ago, raiwa said: If you still have problems and can't get them solved, you may try this other add-on which is more job to install, but it is more stable: State Selector BS 3. remove your custom async loading etc. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
radhavallabh Posted September 5, 2017 Author Share Posted September 5, 2017 @raiwa Hi, Okay I will retry everything again and get back with the update. I do not understand how are my browsers running it correctly... this is getting more confusing to me; But still will not back out will keep on working on it till it fixes. Thank you so much will get back with more info on it. Warm Regds. radhavallabh Link to comment Share on other sites More sharing options...
PiLLaO Posted September 5, 2017 Share Posted September 5, 2017 Hi @radhavallabh I just look in your web and now works in firefox and chrome Link to comment Share on other sites More sharing options...
radhavallabh Posted September 6, 2017 Author Share Posted September 6, 2017 @PiLLaO Thank you so much for confirming this to me. Feeling so relieved that the issue is resolved feeling so elated.... I again Thank you @raiwa too for helping me through and getting this fixed, Very Warm Regds. radhavallabh Link to comment Share on other sites More sharing options...
austcoll Posted September 24, 2017 Share Posted September 24, 2017 Hi Thank you for your contribution, however there seem to be a spelling mistake on ht_country_state_jquery.php file, you have spelled "configuration" with double "C" in 5 places, you have it like this "cconfiguration" which gives error. Cheers Mitchell Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.