Previous in Contents Next in Contents

QueryProdInfo

The QueryProdInfo component, which usually appears in the Product Info stage of an order processing pipeline, runs a database query to retrieve product information for all the items in the items list and adds the information to the order form.

Note  This component is used for compatibility with Commerce Server version 2.0 sites, in which the database connection is provided by the Content object in the Pipe Context. Commerce Server 3.0 sites should use the QueryProdInfoADO component.

For each item in the items list, the component executes the query that you specify, passing the item's SKU (stored in item[n].SKU) as a parameter to the query. After retrieving the item information, QueryProdInfo adds the information to the item Dictionary for that item.

If no data is found for a given SKU, QueryProdInfo writes a name/value pair named delete to the item Dictionary, initializes the delete item to 1 (marking it for deletion), then moves on to the next item. Additionally, QueryProdInfo adds a pur_badsku message to the _Basket_Errors collection. Items marked for deletion are removed from the OrderForm.

If data for the specified SKU is found, then for each column retrieved by the query, QueryProdInfo writes a name/value pair to the item Dictionary. The name part of the name/value pair consists of the prefix _product_, followed by the column name. Thus, for example, the data in a table column named col would be placed in the value of item[n]._product_col. Finally, QueryProdInfo initializes the name/value pair to contain the data stored in the appropriate column.

Related Topic


© 1997-2000 Microsoft Corporation. All rights reserved.