Add a location

  • Updated

Locations in Optimizely Configured Commerce provide customers with the physical locations of your dealers, branches, or any locations you choose to display.

Prerequisites 

  • Purchase a key from the Google Maps Platform page.
  • Enable the Javascript API and Geocoding API in the Google Cloud Platform Console under your API key.

Enter your Google Geocoder API key

Enter your own Google API key in your sandbox and production environments so your maps load correctly on your Location Finder page.

  1. Go to Administration > Settings > Site Configurations in the Admin Console.
  2. Enter your Google API Key in the General section.
  3. Go to the Geocoding section and fill in the fields depending on your geocoding API settings:
    • FreeGeolp's Geocoding API
      • Geo IP Geocoder Base URL – The base URL for FreeGeoIp's Geocoding API.
      • Geo IP Geocoder API Key – The API key used for FreeGeoIp's Geocoding API.
    • Google's Geocoding API
      • Google Geocoder API URL – The URL for Google's Geocoding API. The default value is https://maps.googleapis.com/maps/api/geocode/json?sensor=false.
      • Google Geocoder API Key – The API key used for Google's Geocoder Provider.
      • Google Geocoder API Key (Server) – The API key used for Google's Geocoder Provider on the server-side. If specified, Configured Commerce uses this key instead of the Google API Key. Using this setting and adding your IP address to Google Cloud's Application Restrictions lets you use Google's Geocoder Provider with website restrictions.
  4. Click Save.

Fill-in location settings

  1. Go to Administration > Settings > Site Configurations.
  2. Search for and fill-in the following settings:
    • Default Latitude – Default latitude to use for point to find dealers if a user does not provide a location. Default value: 44.9805206.
    • Default Longitude – Default longitude to use for point to find dealers if a user does not provide a location. Default value: -93.273896.
    • Number of Locations Shown Per Page – Number of locations to show a user per page. Default value: 5.
    • Search Radius – Radius in miles to look for locations. Default value: 50.
  3. Click Save.

Add a location

For a location to display in the Location Finder, you must first create it in the Admin Console.

  1. Go to Admin Console > Shipping & Fulfillment > Locations.
  2. Click Add Location to create a location.
  3. Fill in the applicable Location Information. Only the Name and Url Segment are required, but the location's address and phone number are recommended.
  4. Add a valid URL in the Website URL field to show the location's website in Location Finder.
  5. Click Geolocator to populate the Latitude and Longitude.

    Complete this step only when creating single locations. For multiple locations, Optimizely recommends a geocoding service.

  6. Add additional information, such as the location's operating hours, in the Content Management section. Select Create Revision, and enter the appropriate information in the pop-up editor.
  7. Click Save, then click Publish to push the revision to the live site.

You must assign the location to a website before it displays in the Location Finder. See Assigning a Location to a Website.