다음을 통해 공유


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

  1. In the Customers and Order Manager, click Profiles, and retrieve all rows for the Virtual Earth configuration. Only one row should be returned.

  2. 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.

  3. Click Save and Close on the toolbar.

To configure the Virtual Earth account

  1. Connect to the Default Site using Commerce Server Customer and Order Manager.

  2. Click on Profiles

  3. Select the Search tab.

  4. For "Look in", select Virtual Earth Configuration.

  5. For “Look for” select Configuration ID.

  6. The Keyword box should be empty.

  7. Click Find.

    You should see a single entry here:

    Dd328439.Vug_StoreLocator_WP_CS_Cfg(en-US,CS.90).gif

    The following image shows data in a Virtual Earth configuration entity.

    Dd328439.Vug_StoreLocator_WP_VE_Cfg(en-US,CS.90).gif

To add stores to your Default site

  1. Connect to the Default site by using Commerce Server Customer and Order Manager.

  2. Click on Profiles.

  3. Select the Search tab.

  4. For "Look in", select Store Object.

  5. Add as many Store Objects as required.

  6. 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]

  7. 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.

    Dd328439.Vug_StoreLocator_WP_CS_Cfg2(en-US,CS.90).gif

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

  1. In the Customers and Order Manager, click Profiles, and retrieve all rows for the Virtual Earth configuration. Only one row should be returned.

  2. 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.

  3. Click Save and Close on the toolbar.

To update your Virtual Earth account

  1. Connect to the Default Site using Commerce Server Customer and Order Manager.

  2. Click on Profiles

  3. Select the Search tab.

  4. For "Look in", select Virtual Earth Configuration.

  5. For “Look for” select Configuration ID.

  6. The Keyword box should be empty.

  7. Click Find.

    You should see a single entry here:

    Dd328439.Vug_StoreLocator_WP_CS_Cfg(en-US,CS.90).gif

    The following image shows data in a Virtual Earth configuration entity.

    Dd328439.Vug_StoreLocator_WP_VE_Cfg(en-US,CS.90).gif

To update your Store data to your new production site

  1. Connect to the site by using Commerce Server Customer and Order Manager.

  2. Click on Profiles.

  3. Select the Search tab.

  4. For "Look in", select Store Object.

  5. Add as many Store Objects as required.

  6. 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]

  7. 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.

    Dd328439.Vug_StoreLocator_WP_CS_Cfg2(en-US,CS.90).gif

Edit the Store Locator Web Part

  1. Note   you must have administrator privileges to edit the Web Part.

  2. On the page that contains the Store Locator Web Part, select Edit Page.

  3. Select the Store Locator Web Part and Select Edit.

  4. Under the Advanced (Commerce) property group, select "Use Virtual Earth "Production" environment."

  5. 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.

See Also

Other Resources

Developing with SharePoint Commerce Services

Marketing System Web Parts

Working With the Store Locator Web Part