Associating WooCommerce Products With Locations

Associating Store Locator Plus locations with WooCommerce products is a new feature provided by the Premier plugin for Store Locator Plus.    The Premier plugin is an add-on that is available exclusively to Premier Subscription holders.

In order to activate the WooCommerce product mapping features of the Premier add-on, you will need to WooCommerce installed and activated on your site.    When WooCommerce is installed the WooCommerce modules are automatically activated within the Premier add-on.  You should activate WooCommerce before importing locations with WooCommerce product relations.

Using Store Locator Plus On Multilingual Sites

Unlike single-language websites where all of the site content and administrative interfaces are operating under a single language, multilingual sites allow visitors to pick their language while viewing the website.

WPML

The most popular plugin for WordPress multilingual sites at the time of this writing is WPML.

Store Locator Plus has begun the journey into supporting multilingual sites with WPML.    Changes to WPML in late 2015 will require further revisions to the WPML compatibility layers.

Since version 4.3.06 Store Locator Plus added features that will help the plugin and add-on packs communicate with WPML for user-configurable translation strings.  While the entire fixed-text portion of Store Locator Plus uses gettext, a common language translation utility, there are many strings that appear as user-configurable settings.  Options such as search and results labels fall into this category.

Translating Store Locator Plus

Store Locator Plus uses the built-in WordPress internationalization and localization tools to translate the interface text into various languages.  Starting in October 2015, Store Locator Plus has become part of the WordPress Translate project.  You can contribute translations for the base plugin at the Store Locator Plus directory at WordPress Translate.

If you do not see the base plugin in your language, check the SLP Translate report for the latest Stable Release and make sure your language is at 100%.  The Translate system will not create a language export for partial translations.  If you want to help with the translation, send a request to be added to the WordPress PolyGlots project.

Learn About Translate.WordPress.Org.

Creating A Locator Page

Summary

To create a locator page that has a zip/postal code search box, a map of your locations, and the results list put the [slplus] shortcode on a page or post.

Go to Pages in your WordPress admin.

Create a new page.

Name it “Locations”.

Enter [slplus] in the main content area of the page.

Details

First create a new page for your WordPress site where the Store Locator Plus plug-in will reside. Add the shortcode (a special label inside of square brackets that is used within WordPress pages and posts to display the output from a plugin). You place a shortcode within the text of your page or post and the plugin will “do it’s magic”

Locator Shortcode

To display the Store Locator Plus search form, map, and search results using the defaults you have setup via Map Settings in the admin panel, use the following shortcode:

[slplus]

The base plugin will replace the shortcode with a search form, a Google Map, and a results section below the map.   Depending on how you have the plugin configured the map and results may start by showing some or all of your locations.

  • Hint: Do not copy and paste off this page or all you will see is the text. You must type in the shortcode onto your WP page.
SLP slplus shortcode
SLP slplus shortcode

Additional Shortcodes can be found under the SLP documentation Shortcodes:SLP

 

Adding Locations

Locations are added to Store Locator Plus through the WordPress admin panel.

After you have installed Store Locator Plus on your WordPress site you will see a menu entry for Store Locator Plus.     Select “Locations” from the Store Locator Plus sidebar menu or tabs.

If you do not have any locations in the system you will be brought to the Add sub-tab automatically.   If you see a list of locations click “Add” in the subtab menu.

Enter your location information.    All entries are optional.  If all fields are left empty the location will not be added.   It is recommended that you enter a Name, City, and State (province) at a minimum.

Store Locator Plus will  send a query to the Google Map Geocoding service to provide the latitude and longitude for the address you’ve entered.   You will need to obtain your own google API key if you are using the WPSLP plug-in and are not a MYSLP subscriber.  The more details you provide for the address the more accurate Google will be on pinpointing the location.

Note: You can set the map domain to further assist Google in pinpointing locations.  The default is to lookup addresses with a United-States region influence.

When you first add a location you will see a notification box pop up that tells you where Google has determined the lat/long to be and a green box telling you your location has successfully been added.

You can view the list of locations you have created by going to the  Locations/ List.

Getting Started With Buy Here For WooCommerce

Buy Here For WooCommerce 520x520

Buy Here For WooCommerce is a free WordPress plugin that allows you to associate Store Locator Plus locations with WooCommerce products.   When customers search for physical locations they will see a list of products offered at that location.

This document describes the initial installation and setup for Buy Here For WooCommerce.

Install The Required Plugins

Login to your WordPress site and go to the Plugins / Add New screen.

Search for “Store Locator Plus” from the WordPress Plugin Directory.   Install and activate that plugin.

Search for “WooCommerce” from the WordPress Plugin Directory.   Install and activate that plugin.

Search for “Buy Here For WooCommerce” from the WordPress Plugin Directory.   Install and activate that plugin.

Note: Buy Here For WooCommerce requires Store Locator Plus 4.4.18 or higher and WooCommerce 2.4.10 or higher.  If either are not installed or are not activated the Buy Here For WooCommerce plugin will not activate.

Note: While this plugin is being reviewed by the WordPress Plugin team it can be “purchased” at not cost from the Store Locator Plus store.

Add Locations

From your WordPress admin login go to Store Locator Plus, go to the Locations tab and Add Locations.

Add Products

From your WordPress admin login go to WooCommerce  Products and Add Products.

Connect Locations To Products

While adding a new product, click the Locations panel in the Product Data section.

Start typing the name of a location or the postal/zip code.    When you type the 3rd letter a list of Store Locator Plus locations that match your search will appear.  Select a location that you wish to have associated why the product.

Create A Locations Page

Go to Pages and add a new page.     On that page put the [slplus] shortcode.

Open that page to see your location search form, map, and list of locations.

Locations that have product data associated with it will show the product data under the details column on the right side of the location listing.

BHWC Location Search Results
BHWC Location Search Results

Do More

There are a lot of add ons available for WooCommerce and Store Locator Plus to tailor the user experience to meet your needs.  For Store Locator Plus you may want to start with the Experience add on to customize the look-and-feel of the location listing results.

Related