Store Locator Web Part
Shoppers use the Store Locator Web Part to locate stores nearest to their location. The nearest store is displayed on a Virtual Earth Map.
Architecture
To implement the Store Locator Web Part you register for a Virtual Earth Platform Development Account at https://go.microsoft.com/fwlink/?LinkId=137247.
To access the Virtual Earth Platform, you must configure the shopping site with the account ID, password, and custom data source prefix (obtained through the registration process) using the SharePoint Customer and Orders Manager.
For more information on licensing, see https://go.microsoft.com/fwlink/?LinkId=137248.
Note
The use of Microsoft Virtual Earth Platform is subject to the Terms of Use: https://go.microsoft.com/fwlink/?LinkId=137249.
Setting Up Store Locator
The Store Locator Web Part requires a Virtual Earth account. You must also manually add the store location profiles using Commerce Server. To start developing with the Virtual Earth Platform, you must get a Virtual Earth Platform developer account. Go to https://go.microsoft.com/fwlink/?LinkId=133234 to request an account. After you register and have your account information, you will have an account ID, password, and data source name. You must add this information to the Customers and Orders Manager in Commerce Server 2009. Use the following procedure to add this information.
To enable Virtual Earth
In the Customers and Order Manager, click Profiles, and retrieve all rows for the Virtual Earth configuration. Only one row should be returned.
Double-click the returned row, and then do the following:
Use this
To do this
Account Id
Type the account ID that you received for your Virtual Earth account.
Password
Type the password for your developer account.
Data Source Name
Type the data source name for your developer account.
Note
The four URLs (Virtual Earth Token Service Staging Url,Virtual Earth Token Service Production Url, MapPoint Find Service Staging Url, and MapPoint Find Service Production Url) are required. Do not change them.
Click Save and Close on the toolbar.
To configure the Virtual Earth account
Connect to the Default Site using Commerce Server Customer and Order Manager.
Click on Profiles
Select the Search tab.
For "Look in", select Virtual Earth Configuration.
For “Look for” select Configuration ID.
The Keyword box should be empty.
Click Find.
You should see a single entry here:
The following image shows data in a Virtual Earth configuration entity.
To add stores to your Default site
Connect to the Default site by using Commerce Server Customer and Order Manager.
Click on Profiles.
Select the Search tab.
For "Look in", select Store Object.
Add as many Store Objects as required.
Go to the bin directory of the Commerce Server 2009 installation and find the file “CSStoreUpload.exe”. (For example [C:\dd\main_1\binaries\x86chk\bin\i386\ CSStoreUpload.exe]
Run the following in the command line:
CSStoreUpload /siteName [site name]/profileUrl [url of CS 2009 profile webservices] /userName [Virtual Earth user account] /password [Virtual Earth account password] /dataSource [name of the data store where Store information will be held at Virtual Earth] /environment [staging/production] /RejectAmbiguousGeocodes /WaitForJobCompletion /Verbose
The following image shows the Commerce Server Customer and Order Manager Preview Details of a Store Object.
Setting Up Store Locator in a Production Environment
To change your site to a Production environment with the Virtual Earth Platform, you must get a Virtual Earth Platform production account. Go to https://go.microsoft.com/fwlink/?LinkId=133234 to request an account. After you register and have your account information, you will have an account ID, password, and data source name. You must add this information to the Customers and Orders Manager in Commerce Server 2009. The Store Locator Web Part must be set to use a production environment. Use the following procedure to add this information.
To enable Virtual Earth
In the Customers and Order Manager, click Profiles, and retrieve all rows for the Virtual Earth configuration. Only one row should be returned.
Double-click the returned row, and then do the following:
Use this
To do this
Account Id
Type the account ID that you received for your Virtual Earth account.
Password
Type the password for your developer account.
Data Source Name
Type the data source name for your developer account.
Note
The four URLs (Virtual Earth Token Service Staging Url,Virtual Earth Token Service Production Url, MapPoint Find Service Staging Url, and MapPoint Find Service Production Url) are required. Do not change them.
Click Save and Close on the toolbar.
To update your Virtual Earth account
Connect to the Default Site using Commerce Server Customer and Order Manager.
Click on Profiles
Select the Search tab.
For "Look in", select Virtual Earth Configuration.
For “Look for” select Configuration ID.
The Keyword box should be empty.
Click Find.
You should see a single entry here:
The following image shows data in a Virtual Earth configuration entity.
To update your Store data to your new production site
Connect to the site by using Commerce Server Customer and Order Manager.
Click on Profiles.
Select the Search tab.
For "Look in", select Store Object.
Add as many Store Objects as required.
Go to the bin directory of the Commerce Server 2009 installation and find the file “CSStoreUpload.exe”. (For example [C:\dd\main_1\binaries\x86chk\bin\i386\ CSStoreUpload.exe]
Run the following in the command line:
CSStoreUpload /siteName [site name]/profileUrl [url of CS 2009 profile webservices] /userName [Virtual Earth user account] /password [Virtual Earth account password] /dataSource [name of the data store where Store information will be held at Virtual Earth] /environment [staging/production] /RejectAmbiguousGeocodes /WaitForJobCompletion /Verbose
The following image shows the Commerce Server Customer and Order Manager Preview Details of a Store Object.
Edit the Store Locator Web Part
Note you must have administrator privileges to edit the Web Part.
On the page that contains the Store Locator Web Part, select Edit Page.
Select the Store Locator Web Part and Select Edit.
Under the Advanced (Commerce) property group, select "Use Virtual Earth "Production" environment."
Click Save.
Properties
The following table lists the mapping of the properties for the Store Locator Web Part.
Property |
Maps to |
---|---|
Disable "Bird's Eye View" |
DisableBirdsEyeView |
Disable "Driving Directions" |
DisableDrivingDirection |
Disable "Map Navigation" |
DisableNavigation |
Distance unit of measure |
DistanceUnit |
Use Virtual Earth "Production" environment. |
IsProduction |
Search Radius |
SearchRadius |
"Store push-pin" image url |
StorePushpinUrl |
Virtual Earth token timeout |
TokenTimeOutMin |
"Search address push-pin" image URL |
UserPushpinUrl |
Customization
You can modify the .css files to customize the look and feel of the Web Part.
Error Handling
Not applicable.
API Dependencies
Not applicable.