Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    If you open the class-admin.php, then search for ‘function validate_store_data’ and remove this part.

    ( empty( $store_data['zip'] ) ) ||

    I’m not sure if that won’t cause problem when the address you provided is sent to the Google Maps API for the geocoding.

    What is the exact address you are trying to add, then I can try it out.

    Thread Starter myhreco

    (@myhreco)

    Thanks for the info. Removing the code above does allow me to save a new store into the system, but the system still prompts me for a zip code as required when clicking on the “Preview location on the map” button. An example address that doesn’t use zip codes is:

    LG/F & G/F, 11 Stanley Street, Central, Hong Kong, China

    Entering the above address into a Google maps search comes up with the correct location for that store.

    Also, a side thing I just noticed… since updating the plugin to the latest version yesterday, the “Preview location on the map” button has stopped working – doesn’t generate anything on the map when clicking the button, even when using a standard US address with zip code and all fields completed. It was working okay before I updated.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    If you open the /admin/js/wpsl-admin.js and search for ‘validatePreviewFields’, then look for this line of code, and just remove it.

    if ( !zip ) {
      $( "#wpsl-store-zip" ).addClass( "wpsl-error" );
         error = true;
    }

    Do you happen to have Firefox 30 and are using the webdev toolbar add-on? If so, then go to disable -> disable javascript -> and uncheck the ‘disable strict javascript warnings’. This is a bug in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=998908 which they will fix in the next release. This will break Google Maps.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    And I will remove the zip code requirement in the next version ??

    Thread Starter myhreco

    (@myhreco)

    Thanks for all your help! Even after removing that code from the wpsl-admin.js file, it’s still requiring me to enter a zip code for map generation, but not a big deal – found out that if I just put a blank space into the zip code field, it will generate the map, so that works for now.

    And thanks for the tip on Firefox – even after changing the webdev toolbar settings, Firefox is still being buggy, so I’m just using a different browser and it’s working fine on the other one.

    By the way… Excellent plugin!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Countries That Don't Use Zip Codes’ is closed to new replies.