Jump to content
Latest News: (loading..)

Search the Community

Showing results for tags 'entry_state'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News and Announcements
    • News and Announcements
    • Partner Announcements
    • Ambassadors
  • Commercial Support
    • Developer Feedback
  • osCommerce Online Merchant v2.x
    • General Support
    • Installation and Configuration
    • Upgrading from Earlier Versions (v2.x to v2.x)
    • Add-Ons
    • Tips and Tricks
    • Security
  • Development
    • osCommerce Online Merchant v2.4
    • osCommerce Online Merchant Community Bootstrap Edition
    • osCommerce Online Merchant v3.x
    • Development Proposals
  • General
    • OSCOMMERCE.TV
    • Next Steps / Optimizations / Marketing
    • Live Shop Reviews
    • E-Commerce Laws
    • General Discussions
    • PHP / SQL / Web Design
  • oscBooks and oscTemplates's Announcements
  • PayPal's Announcements
  • Sage Pay's Announcements
  • Solomono - new level osCommerce templates's Announcements
  • German Community's OSCOM v2.x
  • German Community's Allgemein
  • German Community's OSCOM v3.x

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Real Name


Location


Interests


Website


Skype

Found 1 result

  1. OSC Module : Country State Selector BS (https://apps.oscommerce.com/UT1CL&country-state-selector-bs) Hi, I have updated my Country State BS module yesterday with the latest version to fix the issue with vanished State when editing an address. This works when Country has got registred list of States (tep_draw_pull_down_menu) but don't work if there is no listing (tep_draw_input_field). When I compare states.php and address_book_details.php, I see that a portion of code is missing to activate this genuine script : In states.php file : if ($entry_state_has_zones == true) { $zones_array = array(); $zones_array[0] = array('id' => '', 'text' => PULL_DOWN_DEFAULT); $zones_query = tep_db_query("select zone_name from zones where zone_country_id = '" . (int)$country_id . "' 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, $state_name, 'id="inputState" aria-required="true"'); echo FORM_REQUIRED_INPUT; } else { echo tep_draw_input_field('state', NULL, 'id="inputState" placeholder="' . ENTRY_STATE_TEXT . '"'); echo FORM_REQUIRED_INPUT; } In address_book_details.php file : 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"'); 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 . '"'); } } else { echo tep_draw_input_field('state', (isset($entry['entry_country_id']) ? tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']) : ''), 'id="inputState" placeholder="' . ENTRY_STATE_TEXT . '"'); } This sentence is missing : if ($process == true) { ... } else { echo tep_draw_input_field('state', (isset($entry['entry_country_id']) ? tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']) : ''), 'id="inputState" placeholder="' . ENTRY_STATE_TEXT . '"'); } I have tried to add it on the state.php in many ways but with no result. :( The problem is when you have an existing address with already State registred as text field, this one don't appear when you edit the address. The field "entry_state" is not called by the script. To test this you must choose a Country without state listing registred (entry_zone_id = 0). Here is a screenshot from mysql to see the difference between Country ID + State ID dropdown registry (entry_country_id + entry_zone_id) then Country ID + State text registry (entry_country_id + entry_state). Anyone could help me to fix this module ?!? Best regards.
×