Commerce Server 2002

Use this component to retrieve catalog information for every item in the order form.

Ee783791.note(en-US,CS.20).gif Note

  • This component replaces the older QueryProdInfoADO component. The QueryCatalogInfo component works with the new Commerce Server 2002 catalog structure rather than performing product table lookups.

Intended use: Order Processing pipeline, Product Info stage.

Configuration Values


Values Read

The QueryCatalogInfo component reads the following values from the indicated dictionary.

CacheManagerContextA reference to a CacheManager object.
catalog_languageContextOptional. String. The language of the data being retrieved from the catalog.
CatalogManager ContextA reference to a CatalogManager object.
item.product_catalogOrderString. The catalog containing the item.
item.product_idOrderString. The product identifier.
item.product_variant_idOrderOptional. String. An additional identifier used to distinguish variants of a particular product such as different colors of an item.
item.catalog_languageOrderOptional. String. The language of the data being retrieved from the catalog.

Values Written

The QueryCatalogInfo component writes the following values to the Order dictionary.

item._product_*Optional. Product properties for each item. The column name is appended to form the key name. For more information, see the Remarks section.
item.deleteOptional. A flag indicating the item should be deleted from the order. For more information, see the Remarks section.


The QueryCatalogInfo component retrieves product information from the catalog system for every item in the order. It adds the retrieved information to each Item dictionary in the order form.

Items are identified by a combination of the product_catalog, product_id, product_variant_id, and catalog_language keys. The product_variant_id key is required only if the product is a variant, such a particular color of an item that comes in multiple colors. The catalog_language key is required only if the product is available in more than one language.

If the catalog_language key is changed for any items while they are in the order form, the next time the Order Processing pipeline is run, it will check to see that the items are still valid in the specified language. If the language is missing, then product information is retrieved in the default language of the catalog. If the language is specified and is valid for the catalog, then the info in the specified language is retrieved. If the language is specified and not valid for that catalog, the properties of the item from the default language will be returned.

If no data is found for an item, the QueryCatalogInfo component marks the item for deletion by creating a key in the Item dictionary. The key, delete, is assigned a value of one (1). The RequiredProdInfo component checks for this flag and deletes the item if the key is found. Typically, this deletion occurs when an item in the basket is removed from a catalog.

If data for an item is found, the QueryCatalogInfo component writes an entry to the corresponding Item dictionary for every property. The name of the entry is the prefix _product_ followed by the property name. For example, a product property named "weight", would be stored as _product_weight. The value of the entry is set to the corresponding data from the catalog system.

The catalog_language key can be set individually for each line item. However, this will be slower than setting the catalog_language key at the pipe_context level. If no language is specified the default language for the catalog is used. This component does not detect when a catalog supports a given language, but localization has not occurred for the line item.

The QueryCatalogInfo component requires a CacheManager object with a QueryCatalogInfoCache data structure in its PipeContext Dictionary. The QueryCatalogInfo component uses this data structure to cache the product and category information it applies to line items

The following code is used to setup the cache in the Global.asa file:

    ' Initialize dictQCICacheConfig 
    Set dictQCICacheConfig = Server.CreateObject("Commerce.Dictionary")
    dictQCICacheConfig("ConnectionString") _
     = _dictConfig.s_TransactionConfigConnectionString
    dictQCICacheConfig("CacheSize") = 10000
    dictQCICacheConfig("TableName") = "CatalogCache_Virtual_Directory"
    dictQCICacheConfig("CacheName") = "CatalogCache"
    dictQCICacheConfig("AppUrl") = sMachineBaseURL

    ' Configure CacheManager For QueryCatalogInfoCache 
    oCacheManager.RefreshInterval("QueryCatalogInfoCache") = 60 * 60
    oCacheManager.RetryInterval("QueryCatalogInfoCache") = 5 * 60
    oCacheManager.CacheObjectProgId("QueryCatalogInfoCache") _
     = "Commerce.LRUCache" 
    oCacheManager.LoaderProgId("QueryCatalogInfoCache") _
     = "Commerce.LRUCacheFlush" 
    Set oCacheManager.LoaderConfig("QueryCatalogInfoCache") _
     = dictQCICacheConfig 

See Also


Copyright © 2005 Microsoft Corporation.
All rights reserved.