Step 8: Create a Virtual Catalog

A Commerce Server 2002 virtual catalog references the product data in one or more base catalogs. Products are represented only once in the database, regardless of how many virtual catalogs they appear in.

There are three primary uses for virtual catalogs:

  • To aggregate multiple catalogs so they appear as one catalog to users
  • To price products in multiple currencies
  • To provide special pricing, or subsets of products, for specified groups of users

Virtual catalogs support price rules. That is, you can specify whether the price for the category or product is the same as the price in the base catalog, or different, for example, a percentage or set amount more or less.

In this step, you will implement multilingual/multicurrency properties and consolidate multiple base catalogs into a virtual catalog. In a fully multilingual and multi-currency enabled site, a virtual catalog is implemented for each language/currency combination that will be available for the user to browse.

To implement a simplified way of handling multiple locales, you will be appending the LCID (LocaleID) to the end of the catalog name. For example, LCID=1033 to implement a single virtual catalog to handle US English/US Dollars.

  1. Click Start, point to Programs, point to Microsoft Visual Studio .NET, and then click Microsoft Visual Studio .NET.

  2. In the Microsoft Development Environment [design] – Start Page screen, click Open Project.

  3. In the Open Project dialog box, select the NorthwindTraders project, and then click Open.

  4. In the NorthwindTraders – Microsoft Visual C# .NET [design] – Default.aspx window, click Project on the toolbar, point to Commerce Server Project, and then select Business Desk.

  5. In Catalogs, click Catalog Editor.

  6. In the Catalogs screen, click New on the toolbar, and then select New Virtual Catalog from the drop-down list.

  7. In the Catalog Properties – New Virtual Catalog screen, in the Catalog Properties section, do the following:

    Use this To do this
    Name Type BuildingMaterials1033.
    Start date Type the start date for the catalog. This date does not have any effect on your Web site. However, if you exchange catalogs with a trading partner, this date lets your trading partner know the first date that the catalog is valid.
    End date Type the end date for the catalog. Your trading partners use this date to determine the last date the catalog is valid. By default this is the current date plus three months. For example, if you create your catalog in December, the catalog end date will be March.
    Currency Select the US Dollar - USD currency for the catalog from the drop-down list.
  8. In the Catalog Languages section, click Add to select English - United States as the supported language for the catalog.

  9. In the Default Language box, select English - United States from the drop-down list.

  10. In the Reporting Language box, select English - United States from the drop-down list.

  11. To enter the display name for the catalog, in the Language box, select the language English - United States, and then click Edit.

  12. In the Display name box, type Building Materials as the name for the catalog. This is the catalog name that will appear on your Web site.

  13. Click Accept.

  14. To save the catalog and return to the Catalogs screen, click Save and go back on the toolbar.

  15. In the Catalogs screen, select BuildingMaterials1033, and then click Open on the toolbar.

  16. In the Catalog Content - BuildingMaterials1033 (English - United States) screen, in the Include/exclude section, click New.

  17. In the Catalog box, click the ellipsis […] button.

  18. In the Catalog Picker dialog box, select the ResidentialSiding catalog, and then click Select.

  19. In the Rule box, select IncludeCatalog from the drop-down list.

  20. Click Done.

  21. Repeat steps 16 to 20 to add the Electrical base catalog to the BuildingMaterials1033 virtual catalog.

  22. To save the virtual catalog and return to the Catalogs screen, click Save and go back on the toolbar.

  23. In the Catalogs screen, select the BuildingMaterials1033 virtual catalog, and then click Rebuild virtual catalogs on the toolbar.

    The message, “Catalog Rebuild process has been started successfully…” appears.

  24. Click OK, and then click Catalog Editor to refresh the list of catalogs.

    The catalog you selected appears in the list with “Up-to-date” in the Status section.

    If “Rebuilding” appears in the Status section, wait a few seconds, and then click Catalog Editor again.

  25. Using SQL Query Analyzer, run the CatalogSecurityRoles.sql script against the NorthwindTraders_commerce database.

    The CatalogSecurityRoles.sql script is located in the <drive>:\Program Files\Microsoft Commerce Server 2002\Support folder.

Copyright © 2005 Microsoft Corporation.
All rights reserved.