The Store Locator Plus® SaaS platform works for any web platform or application the supports embedded JavaScript. All of the popular website tools including WordPress, Wix, Weebly, SquareSpace, Joomla, Ghost, and Django support embedded JavaScript. We’ve even seen sites running NetSuite and SalesForce embed Store Locator Plus® maps.
Importing locations with territories follows the same procedure as importing a standard locations file. As with all location files the format must be a proper CSV file exported using the UTF-8 character set with no special or non-printable characters.
Your CSV file should add the following five columns to the file. Make sure you add the field names to the top of each of these new columns as listed here:
territory_distance_unit
territory_distance_north
territory_distance_south
territory_distance_east
territory_distance_west
Within each column you will want to have the following values:
territory_distance_unit can be ‘miles’, ‘km’, or be blank. If this is not set to ‘miles’ or ‘km’ it will assume the territory is not enabled for this location.
territory_distance_north , south, east, and west should be the distance north, south, east, or west from the location that is part of its territory.
The territory boundaries will automatically be calculated for each location during the import.
Once a location is setup with a territory the map markers that are sent back from the server during a user search will include a ‘in_territory’ property set to ‘1’ if the user’s location is within the territory and ‘0’ if not. An additional ‘in_territory_class’ property will also be set to either ‘in_territory’ or a blank string. Both settings are part of the ‘data’ property of the location marker.
Before you can use the territories features of the Premier add on, you will need to enable the feature under the General / Data tab. This is off by default to reduce the data storage and processing overhead of Store Locator Plus for sites that do not need territory services. Go to the General / Data tab and check off “Enable Territory Bounds” and click save. This will create the necessary data fields and enable territory settings and features within the application.
If you later disable this feature any of the existing location territory data will be retained until you delete the location. However the location search process will no longer restrict search results to locations within a territory nor output data related to locations being inside or outside of a territory; assuming those features are enabled in the Experience settings.
Location Data
Locations will now show several new fields when managing a location.
Territory Distance Unit – what is the distance unit used with this location to determine the territory coverage. None disables the territory.
Distance North – how many miles to the north of the location is the northern boundary of the territory.
Distance South – how many miles to the south of the location is the southern boundary of the territory.
Distance East – how many miles to the east of the location is the eastern boundary of the territory.
Distance West – how many miles to the west of the location is the western boundary of the territory.
When the location is saved the Territory Bounds is calculated. Editing the location will show the location point as well as the territory it covers.
User Experience Settings
Under the experience tab there is a setting the dictates how locations are shown to the user.
If you check of the Only Show If In Territory checkbox under the Experience / Results tab in the Functionality group the list of locations shown to the user will only include the locations where the user’s address is within the location’s territory. The radius is still used to limit the results that the server processes. If the radius is hidden and set to a default value, caution should be taken to set a reasonable radius. Checking if a point lies within a territory can be time consuming. First limiting the locations to a reasonable list by first filtering those within a certain distance of the user can sped up processing.
For example, if none of your territories are more than 100 miles from the location you can reasonably set the default radius to be all locations within 100 miles. This will limit how many locations need to have their boundaries tested to see if the user’s address is within. This will improve your territory matching performance.
The design of the search is based on the premise that most people that are searching for something don’t care what state (where) your store is located. They only care that it is 3 miles away not 30 miles away.
I understand this is not a perfect solution for everyone. Sometimes you need to refer someone to the proper sales agent based on sales territories which are typically based on state/city/country. Discrete search can help with that, however territory support is not part of the basic Search add-on unless your territories are divided by city, state, or country alone. Directory Builder add-on can be used for territory search of that nature if no Map is included. Territories is now included in the Premier Add-on
Create data-driven WordPress pages for each location in your Store Locator Plus locations table. The layout that builds the initial pages can be modified and pages created, or re-created, en- masse. Once the initial Store Pages have been created they can be modified on a per-location basis.
You must have the Experience Add-on to change the Search Layout appearance, and along with other add-ons, also allow you to to use the shortcode on SLP WP page.
These shortcodes only apply to the Search Layout admin setting when you have the appropriate Add-on installed and activated.
slp_search_element
This shortcode provides a simple mechanism to place standard search form elements on a custom search form layout, including the wrapping divs and classes around labels and input fields.
Store Locator Plus comes with a variety of styles to provide a basic style framework that will attempt to match your locator page to various WordPress themes installed on your site. You can see the list of Locator Styles under the Store Locator Plus Settings / View panel. The inner slide bar will show you more.
The plugin environment shows the versions of Store Locator Plus, and any active SLP add-ons you have installed, as well as the WordPress version, php version, MYSQL , the domain name and other useful data
This information is required when posting in forums. You can find the release versions under your account Downloads List, and/or review the Release details to see if you have the most recent version of Store Locator Plus and the various add-on packs.
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:
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.
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.
Always export with UTF-8 support enabled.
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.
The bubble layout setting allows you to change the content and layout of the popup information bubble that appears when someone clicks a map marker or in the results below the map or hover. There are additional functionality such as “Hide Info Bubble” if you have Enterprise Level or Premier subscription
For the PLUG-In do t yourself version of Store Locator Plus you will need the Experience add-on and use shortcodes. These are not generic WordPress shortcodes. For the SLP SaaS customers you will need to have a Professional or Enterprise level Plan to change layouts.
All of the bubble layout shortcodes follow this syntax: