CSV Import Zip / Postal Codes formatting

Note: IMPORT requires  Power add-on for the stand alone WPSLP plugin  or if you are using MYSLP SaaS, the  Professional level or higher plan. 

When creating a CSV import file make sure the zip / postal code column is properly formatted as text so you do not lose leading zeros.

The column header for postal/zip codes is zip or sl_zip.

In the United States many northeastern postal codes start with zero.   Many sheets, Microsoft Excel in particular, LOVE to leave off the leading zero if you enter a zip code as 03907 and save as CSV.

Invalid Postal Codes
Invalid Postal Codes

In Excel, and many other apps, you can force a field where you are typing in numbers to be text by starting your entry with an apostrophe (‘).  Type ‘03907 when entering the data NOT 03907.

A good test to see if this is happening to you,  open your CSV file in Google Sheets and see what it looks like.  Does it look like the sheet above missing a zero and right aligned?

Another indicator that this column is set to a numeric type and not an text type is the data is on the RIGHT SIDE of the cell.  Text is left-justified (like sl_state) and numbers are right-justified.

Store Locator Plus 4.8 and above updates will disable Legacy add-ons

Legacy Add-ons

The   auto-update of WordPress v 4.8.2 and above required a major update to the WP Store Locator Plus free base plug-in resulting in the end of compatibility with the popular Pro Pack , Tagalong and other Legacy add-ons.  The Legacy add-ons are no longer supported nor maintained and have been retired over the past two years as announced in news posts, blogs , changelogs, mail campaigns  and social media.  If you are not sure if your add-on is considered Legacy, see the FAQ comparison featured to Legacy add-ons

Time to invest in your future

Some of our customers were surprised by the change and retirement of the  Legacy Add-ons.  We tried to give as much of a heads up as possible using news blogs,  content news to the home site and reached out using a  Mail Chimp campaign for those most likely effected.   Ultimately, there is no sure fire method to reach the thousands of customers who may have had these older add-ons installed.  If there is one thing we know, change in the technical genre is inevitable.  The SLP support team will always endeavor to help our customers transition to the new age.  We pledge they will see real value-added from updating their site and software . Please take a moment to review the multiple benefits of utilizing the newer Experience add-onPower add-on.

Although downgrading to an earlier version of SLP is an option, you may note that changes to the WordPress code and their security patches may disable features. Before making any changes to your site you should ensure you are backing up your site WP database and files.  It is very important to take this step before you have issues or worse, site crashes.    WordPress security has become more robust over the years.

For more information please see this important message from the author:

Store locator Plus  updates and retired add-ons

 

Import using WordPress Store Locator Plus Power add-on

This page /information does not apply to SLP SaaS. This information is provided for the SLP do it yourself plug-in only

WPSLP   Power add-on  uses the built-in file up-loader provided by WordPress Core instead of a custom file import script.   Look in the Media Library in WordPress.  Make sure your install has not disabled the default WordPress media up-loader.

NOTE: As of July 2018,  if you are using the WPSLP “do it yourself” plugin with Power add-on and you have not included the latitude and longitude and require geocoding , make sure you have a Google API account and have checked off the Maps and Geocoding APIs in your library.

What to look for when importing

Do you see the CSV file you just imported? If not then your site has disabled the WordPress media uploader.

If your file IS in the media library but never gets past  the offset “0” setting check to make sure your server  has not disabled the WordPress Cron .

WP CRON can be found under Forms WP environment

Check to see if your server is preventing the wp-cron.php from being triggered.

Check your import file in the media library by clicking on it.  It should show what the file size is and the current offset. The offset is where the background process is shown while importing the file.  If it is shown as “zero” then your WordPress Uploads directory for the media library has been set to non-standard restricted access meaning the background location import process is not allowed to open the file after it was uploaded.

Click on the file to see the file size and meta data

Import remote file retrieval

Power Add-on for WPSLP or the Professional level or higher for MySLP   allows the administrator to schedule your Import process from a remote file retrieval (must be accessible public) to provide more control over recurring imports from a full url where you CSV file resides and allows flexibility for scheduling the time for daily imports.

WordPress CRON is not exact, it executes the next time a visitor comes to your site.

WordPress times are UTC/GMT time NOT local time. Set to none and leave the URL blank to clear the CRON job. Example: 14:25. (Default: empty = do not run daily cron)

Checking your server, PHP and MySQL to ensure the character set is correct will go a long way toward importing special characters like registration characters.

Additional Import Data field headers

If you have the Power add-on  for the Self managed WPSLP or if you have the Professional Level MySLP SaaS plan, you will have the ability to import data fields via a properly formatted csv file.  All columns MUST have a header row with  the correct  field name.   All fields are short text fields, up to 255 characters, unless otherwise noted.  The header text is NOT case sensitive.

If you are using the category  functionality of Power you may want to import and assign a category slug on the fly.  The header field name is:

category (or plural categories).

If you wish to import and assign more than one category  per location , you will need to use a comma-separated list for the data field  (category).  Example: My location has more than one category associated with it, I want to indicate it is a hotel,restaurant, and has music.  Category  for that location would show under the column with the header row “category”…. hotel,restaurant,music

Alternatively, to define parent/child relationships , i.e.  hierarchical categories , use a double colon as the separator Example the Parent is Facility, the child is showroom.

Facility::Showroom.

Importing Large Lists into WP Store Locator Plus

Hints for the WordPress Store Locator Plus stand alone, self managed plugin with Power add-on. Import features available with the Power Add-on

Load Data

If checked , use the faster MySQL Load Data method of file processing. Only base plugin data can be loaded, see the approved field name list.

This feature uses the MySQL Load Data command and is much faster than WordPress / PHP CSV file parsing, with the typical Google Geocoding limitations on performance and record counts (if you are not supplying, filling in the latitude/longitude data fields). This feature will only import basic location data. It does not import extended data fields or category data. If you use this along with  per-entered latitude and longitude values you can import 100,000 locations in less than 10 minutes on a basic web server. The column headers must be included in the file and must match the basic fields. You do NOT need to include all columns.

Example CSV Import Files

CSV Imports are the most-used feature for our MySLP Professional users and for our WordPress  SLP self managed DIY customers that purchased the Power add on.

Learn about CSV Import formatting and other import notes.

Below files are examples only, you will need to set up your own import files to add your locations.

Example CSV Import Files

9 Restaurants Basic CSV Import

We consider this the simplest usable format for most businesses.  It includes the Store Name (Store), Address, City, State, and Zip columns.

You can download our example on our server here

9 Restaurants Full Address

A full address format of the 10 Restaurants Basic CSV Import format.  It includes the Store Name (Store), Address, Address 2, City, State, and Zip, and Country columns.

https://drive.google.com/open?id=1jE_BZTGpHrAuZzYy-K7CwLcFanPzKGC9

9 Restaurants With Latitude and Longitude

The same 9 places with full address and latitude and longitude.   Including latitude and longitude gets the locations online and active on the site faster.  This was created from an Export CSV of the above Full Address file when we stripped the sl_id column and all the blank columns at the end, relabeled the header row to be user friendly.

https://drive.google.com/open?id=1jkfRlY4K2retNGFaRVcW17WSLi_tfRmj

Remote file Retrieval; (Currently being patched )

One quick way to tell if your file is accessible is to put the URL you are using for your imports into your browser. Does it download a CSV file you can open with a text editor? If No; It isn’t a “vanilla” CSV file readable by the “Internet”.

This is the link you can use to see if remote file retrieval is working

For example — if you go HERE
https://demo.storelocatorplus.com/wp-content/uploads/2020/04/9-Restaurants-With-Lat-Lng-Cat.csv

you see an option to download a file

But if you go here :
https://demo.storelocatorplus.com/9-restaurants-with-lat-lng-cat/

it shows you a web page. That second link above from our demo site is NOT a valid remote CSV file URL

Google changed how share links on drives are working and we have found no way to get to the raw CSV file with any links they provided to us.

So Google Drive hosted CSV files is likely never going to work again.   Just one more way for them to track everything you do online by using an embed object vs. a flat CSV that they give you access too.

Location Imports

Location Imports are handled via a CSV file for users that signed up for the MySLP Professional  SaaS service or are using the WPSLP Power Add On with Store Locator Plus plug-in for Word Press current version. With MYSLP the import feature is under the StoreLocatorPlus sidebar/locations as shown in screenshot. If you are using WPSLP self managed and have the Power add-on it will look similar.

CSV Import Format

Getting the proper CSV format can be a challenge when using spreadsheet apps like Excel or Numbers.  Here are some tips to getting a valid CSV format out of a spreadsheet app:

  1. Make sure you always have a header row.  That tells the import process what data is in each column.   The column headers have meaning, so be precise.
  2. When a cell is a text field that STARTS WITH A LEADING ZERO, make sure you explicitly mark the cell as text.   The easiest way to do this is to type a single apostrophe then the number when adding data to the cell as in ‘01886 for the zip code 01886.
  3. Always export with UTF-8 support enabled.
  4. Export to a CSV format.  Comma delimited not tab delimited and quoted strings if given the option.

Check out the Example CSV Imports post to get some usable import files you can play with.