♥raiwa Posted July 8, 2015 Author Share Posted July 8, 2015 @@Gergely, I had to add "required aria-required="true"" to the input field to get the validation to work if no state is in the DB for the selected country: echo tep_draw_input_field('state', NULL, 'id="inputState" class="form-control" required aria-required="true" placeholder="' . ENTRY_STATE . '"'); Quote 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...
tgely Posted July 8, 2015 Share Posted July 8, 2015 @@Gergely, I had to add "required aria-required="true"" to the input field to get the validation to work if no state is in the DB for the selected country: echo tep_draw_input_field('state', NULL, 'id="inputState" class="form-control" required aria-required="true" placeholder="' . ENTRY_STATE . '"'); and could you step forward in registration? Quote osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
♥raiwa Posted July 8, 2015 Author Share Posted July 8, 2015 @@Gergely, and could you step forward in registration? Yes, it works for me. Quote 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 July 8, 2015 Author Share Posted July 8, 2015 (edited) @@Gergely, Found another issue: The selected country was reset to store country if the form passed the BS validations , but didn't pass the validation of existing e-mail. I modified this: if ( $country == '' && MODULE_HEADER_TAGS_GET_STATES_DEFAULT_COUNTRY == 'True') { and it keeps now the selected country other than store country. Edited July 8, 2015 by raiwa Quote 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 July 8, 2015 Author Share Posted July 8, 2015 (edited) @@Gergely, and could you step forward in registration? OK in includes/modules/checkout_new_address.php it can't be applied. Then changing to another existing address works if the country in the form isn't changed, and there is no reason to change it in that case. Edited July 8, 2015 by raiwa Quote 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 July 8, 2015 Author Share Posted July 8, 2015 "onchange function" is not needed here. The script in ht_get_states.php is coded in a way that it works without. (Do not ask me why, that's de docta's secret :-)) Sorry, here I missed something too. It is needed in the country selection only (modifications in create_account.php etc): echo tep_get_country_list('country', $country, 'onChange="getState(this.value)" required aria-required="true" id="inputCountry"'); Quote 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...
vampirehunter Posted January 19, 2016 Share Posted January 19, 2016 Sorry, here I missed something too. It is needed in the country selection only (modifications in create_account.php etc): echo tep_get_country_list('country', $country, 'onChange="getState(this.value)" required aria-required="true" id="inputCountry"'); hi is the latest version of addon fully working when entering states? and is everything working when in checkout user may want to change or enter a new address? thanks Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted January 21, 2016 Author Share Posted January 21, 2016 @@vampirehunter, Sorry for the late reply. Yes it should work for all conditions. For countries which have no states introduced the standard text input field is used. The state selector will show everywhere where state is used if you apply all modifications in the Public store side. It is not implemented in Admin, but can be done too. Quote 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...
vampirehunter Posted December 21, 2016 Share Posted December 21, 2016 hi i installed this, but in admin, when you try and select which pages for it to show on, and click save, it just goes to a blank page. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 21, 2016 Author Share Posted December 21, 2016 (edited) switch error reporting on or check your error log. Then see what produces the error. Maybe you need to change to hardcoded filenames/paths in the ht module, it's a bit outdated and maybe need to be updated. Edited December 21, 2016 by raiwa Quote 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 December 21, 2016 Author Share Posted December 21, 2016 Just had a look, it maybe the following if you run under php7: change the class constructor name from: function ht_get_states() { to: function __construct() { Quote 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...
vampirehunter Posted December 21, 2016 Share Posted December 21, 2016 hi thanks ive tried everything. whenever i click save in admin, just goes to a 403 blank page i even installed this newer plugin, country states bs 2.4.2 and even that gives the same problem. all other plugins i have work fine. seems like a javascript issue although im not sure what. why in admin its not saving the updates to the module? it doesn't make sense Quote Link to comment Share on other sites More sharing options...
milerwan Posted April 10, 2017 Share Posted April 10, 2017 Hi raiwa, I was wondering if it was possible to include an automatic country allocation according to the country of the customer (via its IP)? Best regards Quote Osc v2.3.4 BS "custom" PHP 7.3 compatible (710 modified files => o_O') Link to comment Share on other sites More sharing options...
♥raiwa Posted April 11, 2017 Author Share Posted April 11, 2017 Hello Gwenn @@milerwan, It shouldn't be too complicate to adapt his one: http://addons.oscommerce.com/info/9423 rgds Rainer Quote 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...
milerwan Posted April 12, 2017 Share Posted April 12, 2017 @@raiwaThis addon seems to be helpfull regardless of my request, thank you so much !I will work on it and tell you the result. :) Quote Osc v2.3.4 BS "custom" PHP 7.3 compatible (710 modified files => o_O') Link to comment Share on other sites More sharing options...
milerwan Posted April 12, 2017 Share Posted April 12, 2017 It's ok, to have an automatic country allocation via customer IP (I use Country State Selector BS : http://addons.oscommerce.com/info/9479). Quote Osc v2.3.4 BS "custom" PHP 7.3 compatible (710 modified files => o_O') Link to comment Share on other sites More sharing options...
Guest Posted August 23, 2017 Share Posted August 23, 2017 Raiwa, I am running into a problem here. Just installed the addon and it is exactly what I am looking for with one exception. Next to all of the fields, it now shows " FORM_REQUIRED_INPUT* " (see attached image). I am not much of a programmer so I am not really sure where to look or what to do in order to correct this. You can see it at http://bettysbargainbin.com/adult/create_account.php Thank you in advance to anyone with some help on this. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted August 23, 2017 Author Share Posted August 23, 2017 Hello Todd @TruckloadSales, This add-on is for 2.3.4 BS (Bootstrap community version) and your store is 2.3.4 standard. You can try to adapt it to your version, use the modification instructions to modify your file instead to upload and replace with the included file. Then remove the line with "FORM_REQUIRED_INPUT" constant. Otherwise you should use an add-on for your store version like: https://apps.oscommerce.com/xRZzM&country-state-selector there are more out there. Always check to use the right version for your store. If there is "BS" or "Bootstrap" or "Responsive" or "Community version" in the add-on name or description it is not for your store. rgds Rainer Quote 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...
Guest Posted August 31, 2017 Share Posted August 31, 2017 Ok, I just installed this on a fresh install of Bootstrap. When I go to create a new account, I am receiving the following: Warning: require(DIR_WS_LANGUAGESenglish/FILENAME_CREATE_ACCOUNT): failed to open stream: No such file or directory in /home3/upacynsc/public_html/erotic/create_account.php on line 18Warning: require(DIR_WS_LANGUAGESenglish/FILENAME_CREATE_ACCOUNT): failed to open stream: No such file or directory in /home3/upacynsc/public_html/erotic/create_account.php on line 18Fatal error: require(): Failed opening required 'DIR_WS_LANGUAGESenglish/FILENAME_CREATE_ACCOUNT' (include_path='.:/opt/php56/lib/php') in /home3/upacynsc/public_html/erotic/create_account.php on line 18 I am not a programmer at all, so can someone point me in the right direction here please? This can be seen at http://bettysbargainbin.com/erotic Quote Link to comment Share on other sites More sharing options...
frankl Posted August 31, 2017 Share Posted August 31, 2017 @TruckloadSales You need to install this addon https://apps.oscommerce.com/RNywS&add-on-compatibility-for-2-3-4-edge to make some of the older addons work. Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
♥raiwa Posted August 31, 2017 Author Share Posted August 31, 2017 Hello @TruckloadSales, I just uploaded an updated version for latest 2.3.4 BS EDGE. State Selector BS 1.3 If you wish you can update your version, it should then work without the compatibility add-on @frankl has recommended. rgds Rainer Quote 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...
Guest Posted September 1, 2017 Share Posted September 1, 2017 20 hours ago, frankl said: @TruckloadSales You need to install this addon https://apps.oscommerce.com/RNywS&add-on-compatibility-for-2-3-4-edge to make some of the older addons work. Thanks for the information....I appreciate it! Quote Link to comment Share on other sites More sharing options...
Guest Posted September 1, 2017 Share Posted September 1, 2017 15 hours ago, raiwa said: Hello @TruckloadSales, I just uploaded an updated version for latest 2.3.4 BS EDGE. State Selector BS 1.3 If you wish you can update your version, it should then work without the compatibility add-on @frankl has recommended. rgds Rainer Rainer, Thanks a million, works perfectly! At least on a fresh install of 2.3.4 BS. On behalf of what I am sure are going to be several users, I appreciate your taking the time and the effort to keep this package updated! Todd Quote Link to comment Share on other sites More sharing options...
Bobber Posted November 30, 2017 Share Posted November 30, 2017 On 5/29/2015 at 3:54 AM, raiwa said: Hello Deb @@sheepiedog, Yes you are right. It was my fault. Forgot that the country definition needs to be above the state section. So it should be: <div class="form-group has-feedback"> <label for="inputCity" class="control-label col-sm-3"><?php echo ENTRY_CITY; ?></label> <div class="col-sm-9"> <?php echo tep_draw_input_field('city', (isset($entry['entry_city']) ? $entry['entry_city'] : ''), 'required aria-required="true" id="inputCity" placeholder="' . ENTRY_CITY. '"'); echo FORM_REQUIRED_INPUT; if (tep_not_null(ENTRY_CITY_TEXT)) echo '<span class="help-block">' . ENTRY_CITY_TEXT . '</span>'; ?> </div> </div> <?php if (ACCOUNT_STATE == 'true') { ?> <div class="form-group has-feedback"> <label for="inputState" class="control-label col-sm-3"><?php echo ENTRY_STATE; ?></label> <div class="col-sm-9"> <?php $country = 0; if ( isset($entry['entry_country_id']) ) { $country = $entry['entry_country_id']; } elseif (MODULE_HEADER_TAGS_GET_STATES_DEFAULT_COUNTRY == 'True') { $country = STORE_COUNTRY; } $zone_id = 0; $check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . $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 " . TABLE_ZONES . " where zone_country_id = '" . $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, (isset($entry['entry_country_id']) ? tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']) : ''), '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> <div class="form-group has-feedback"> <label for="inputZip" class="control-label col-sm-3"><?php echo ENTRY_POST_CODE; ?></label> <div class="col-sm-9"> <?php echo tep_draw_input_field('postcode', (isset($entry['entry_postcode']) ? $entry['entry_postcode'] : ''), 'required aria-required="true" id="inputZip" placeholder="' . ENTRY_POST_CODE . '"'); echo FORM_REQUIRED_INPUT; if (tep_not_null(ENTRY_POST_CODE_TEXT)) echo '<span class="help-block">' . ENTRY_POST_CODE_TEXT . '</span>'; ?> </div> </div> <div class="form-group has-feedback"> <label for="inputCountry" class="control-label col-sm-3"><?php echo ENTRY_COUNTRY; ?></label> <div class="col-sm-9"> <?php 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 } ?> But, if you only use the store country, you do not need the state selector at all!! :- You can revert all state selector installation and just modify the original code like this: <div class="form-group has-feedback"> <label for="inputCity" class="control-label col-sm-3"><?php echo ENTRY_CITY; ?></label> <div class="col-sm-9"> <?php echo tep_draw_input_field('city', NULL, 'required aria-required="true" id="inputCity" placeholder="' . ENTRY_CITY. '"'); echo FORM_REQUIRED_INPUT; if (tep_not_null(ENTRY_CITY_TEXT)) echo '<span class="help-block">' . ENTRY_CITY_TEXT . '</span>'; ?> </div> </div> <?php if (ACCOUNT_STATE == 'true') { ?> <div class="form-group has-feedback"> <label for="inputState" class="control-label col-sm-3"><?php echo ENTRY_STATE; ?></label> <div class="col-sm-9"> <?php $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . STORE_COUNTRY . "' order by zone_name desc"); 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"'); echo FORM_REQUIRED_INPUT; if (tep_not_null(ENTRY_STATE_TEXT)) echo '<span class="help-block">' . ENTRY_STATE_TEXT . '</span>'; ?> </div> </div> <?php } ?> <div class="form-group has-feedback"> <label for="inputZip" class="control-label col-sm-3"><?php echo ENTRY_POST_CODE; ?></label> <div class="col-sm-9"> <?php echo tep_draw_input_field('postcode', NULL, 'required aria-required="true" id="inputZip" placeholder="' . ENTRY_POST_CODE . '"'); echo FORM_REQUIRED_INPUT; if (tep_not_null(ENTRY_POST_CODE_TEXT)) echo '<span class="help-block">' . ENTRY_POST_CODE_TEXT . '</span>'; ?> </div> </div> <div class="form-group has-feedback"> <label for="inputCountry" class="control-label col-sm-3"><?php echo ENTRY_COUNTRY; ?></label> <div class="col-sm-9"> <?php echo tep_get_country_list('country', STORE_COUNTRY, '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> </div> Just remove all countries except your store country from the database (you did this already I guess) :) regards Rainer This Worked Perfectly For Me @raiwa! I only had to replace the old code with this below: <?php if (ACCOUNT_STATE == 'true') { ?> <div class="form-group has-feedback"> <label for="inputState" class="control-label col-sm-3"><?php echo ENTRY_STATE; ?></label> <div class="col-sm-9"> <?php $zones_array = array(); $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . STORE_COUNTRY . "' order by zone_name desc"); 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"'); echo FORM_REQUIRED_INPUT; if (tep_not_null(ENTRY_STATE_TEXT)) echo '<span class="help-block">' . ENTRY_STATE_TEXT . '</span>'; ?> </div> </div> Thank you for your contribution with this code! Quote Link to comment Share on other sites More sharing options...
helenium7 Posted December 11, 2017 Share Posted December 11, 2017 Might be of use to someone else, I could not get the v2.4.4 to configure and got a database error when I tried to install but 2.3.3. seems to function OK. It was the lines starting tep_db_query("insert into cconfiguration . . . which gave the problem whereas the previous was tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title . . . Not sure if its that double "cc" or is that a php 7 issue? - I am running 5.6 currently Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.