SLP Documentation

PAO: Enhanced Results

The Enhanced Results premium add-on package for Store Locator Plus gives you more control over the search results listings that appear below the map.

This is the technical documentation that describes the functionality of the more complex elements of the plugin.   Please refer to the Enhanced Results product page for more details on what this add-on package offers.

Results Format

Results format was introduced in SLP : Enhanced Results version 0.4.
SLP : Enhanced Results 0.4 requires SLP version 3.8.

What Is It?

The Results Format dictates how the location data is rendered under the map.  In past versions it was static HTML hard-coded into the SLP plugin.   Various “toggles, switches, and inputs” would make minor modifications to the output string.   This new free-format text entry gives semi-technical users a powerful new tool to modify the results without hacking code.   Use the guide below to create an HTML + data placeholder entry and tweak the results to your liking.

Be careful though, this string gets into the heart of the JavaScript engine and can wreak havoc if you get overly “creative” with this setting.

Changing The Setting

The Results Format setting is a text entry that appears under the Store Locator Plus Map Settings tab.

SLP Tabs

TSLP Tabs Pro Pack and Tagalong

Most of the Enhanced Results settings, including the Results Format setting, are added to the Results panel on the Map Settings page.   Note that you can expand the size of the Results Format entry box by dragging the corner of the text area.

Map Settings Results Panel

Map Settings Results Panel with Enhanced Results

Default Format

The default format for the results string uses the numerical encoding for the various data elements that can be rendered.  This is the default string format that is present in the base Store Locator Plus plugin.  You can reset the string to the default at any time by clicking the “Reset Results Format to default” link that appears under the entry box at any time and saving the map settings.

<center>
<table id="slp_results_table_{15}" width="96%" cellspacing="0" cellpadding="4px">
<tbody>
<tr id="slp_location_{15}">
<td id="slp_left_cell_{15}">{0}

{1} {2}</td>
<td id="slp_center_cell_{15}">{3}
{4}
{5}
{16}
{6}
{7}</td>
<td id="slp_right_cell_{15}">{8}
{9}
<a href="http://{10}/maps?saddr={11}&daddr={12}" target="_blank">{13}</a>
{14}</td>
</tr>
</tbody>
</table>
</center>

The Numbers

What are all those numbers in the curly braces? That is where the location data goes.   The JavaScript processor that gets the location data from the server will replace these numbers with pre-defined data elements.  With the Enhanced Results add-on you will have access to more data elements than the basic free plugin.

Shortcodes (v0.7)

As of Enhanced Results version 0.7, your results string can now include shortcodes INCLUDING a new special shortcode that is only used while processing the below-the-map results.

New Shortcode: [slp_location <fieldname>]

The new slp_location shortcode takes a single parameter, a field name from the approved list of fields noted above.   You can use this in place of the {18.<fieldname>} notation listed above.  This helps with readability of the format string. For example,  you can now put this in the results format string: [slp_location address] or [slp_location state] The entire shortcode list is listed in the table above.

Number and Shortcode Reference

The field placeholders and result string shortcodes are listed in the following table:

Use the horizontal scroll bar above to view the complete description.

Examples

The Fournier Theme

The following Results Format is used with the Fournier Theme for a client customization.    It re-orders some of the data elements and puts the ENTIRE location response in a single table cell element.    The word “Contact Us” replaces the full email address for the email link.    Headers above the address and hours of operation are static on each location.   The string below plus the Fournier Theme product the following results table image shown below.

Results String

<table id="slp_results_table_{15}" width="96%" cellspacing="0" cellpadding="4px">
<em id="__mceDel"><tbody>
<tr>
<td id="slp_left_cell_{15}">
<div>{0}
{1} {2}
Coordinates
{3}
{4}
{5}
{16}
Business Hours
{17}

 <a href="mailto:{18.email}" target="csa">Contact Us</a> .

 <a href="http://{10}/maps?saddr={11}&daddr={12}" target="_blank">{13}</a></div></td>
</tr>
</tbody>
</table>

Resulting User Interface

Fournier with Modified Results String

Fournier with Modified Results String