In this example, we show how to create a product finder that uses a custom field to store product data alongside your locations.  Each location may have its own unique inventory.  The result will appear as follows, where the end user can choose a product and see the stores that carry that product nearby.  There are many ways to create a product finder using MetaLocator.  This strategy works best when you have an extensive product inventory.  A simpler strategy is described under the "Category Product Finder" tutorial.

Importing your Location Data

Import your location data in the usual way.  If you need more information, please see our Quick Start Guide and support documentation for further guidance on that preliminary step.

Importing your Product List

You can import a list of products and keep them separate from your locations by designating 'Products' in the type column.  Keep the same column format as your location import file, but only provide "Name", Published and "Type" as shown in this example:

Add A Product Record field

To designate a certain location as offering a certain product, you need to first add a custom Record field to your locations.  This field will store the product records associated with the location.  To add this field, click Fields then click "New" in the toolbar.  Configure the new field as shown here and click "Save". The name of this field must match the "type" column from your product import.



Click Field Details and update the Field Length to "Text (Very Long)".

Associate Locations with Products

To associate a given location with a set of products, edit the location by clicking "Data > All Records" and then click the title of a location to edit it's details.  Click the Custom Fields tab to see the new Products field as shown here:

Click Browse and you will be presented with a list of your Data similar to the "All Records" screen.  Under Filters, choose "Products" under the Type drop-down, then "Apply Filter" as shown here:

 This will reduce the list to only records with the type "Products"

Choose the Product Records available at this location, then click "Choose Selected" as shown here:

That will populate your location's Product field with the ID numbers of the Products available at this location.

Repeat this process to attribute your products to the correct locations.  If you have a large number of products, you can import this list of ID numbers.  To do that, first Export your data, and include the MetaLocator ID, as shown here:

The resulting data will include the ID numbers for your products as shown here:

Those numbers can then be easily copied and pasted, or included as part of your import spreadsheet.

Create an Interface to display your Product Inventory Finder.
 To begin this step, click Interfaces, then New in the toolbar.  Click the “Choose Layout” button, and then click “Locator Layout”, the first option in the list.  Enter an appropriate Title for your Interface as shown here:

You can include those custom fields in your Search Form Format. Add the {products} template code as shown below. This positions your Products drop-down as the last choice in your Interface search form:


Click Save in the toolbar above.  This will close the Interface Editor and show you a list of your available Interfaces.  Click “Preview” on the interface you just created as shown here to launch display a preview of your newly created Interface:

You will then see your interface which should contain a drop-down list containing your products.

You may also want to display which products are featured at a given search result.  This can be done it two ways, depending on how many products you may have to feature.  You can display a List of related results directly in the search result, or you can display a Link to another interface which can display the results, additionally you can Link to the Link Field.  If you have dozens or hundreds of products at a given location, it may not be visually practical to display those results directly within the search result, however, if there are only a few it works quite well.  This example shows the List option:

 This example shows the Link option:

Both of these options create links to either an individual record or a list of records.  You can control the layout options of those links by creating another interface, and designating that interface as the Default Interface for that record type as shown here:

This will ensure that whenever a Product type record is displayed, it uses a consistent and controllable format.  If you do not create a default interface for a given record type, the current interface will be used.


Did this answer your question?