Popular Posts

Commands in WCS Catalog Subsystem

The following are the main commands in displaying the browse section of a WCS website.
  • StoreCatalogDisplayCmd
  • TopCategoriesDisplay
  • CategoryDisplayCmdImpl
  • ErrorMissingAttributeCmd
  • ErrorProductAttributeCmd
  • ProductDisplayCmdImpl

StoreCatalogDisplayCmd

This command sets the view task that will display the Catalogs available to browse in the current Store. There are no explicit input parameters to this command. The current store information from the command context is used to determine the set of available catalogs for display.

Steps explained in detail

This can be used as the first page of a shopping flow to display the catalogs of a given store, then proceeds to TopCategoriesDisplay, which displays the root categories of a given catalog, then finally to CategoryDisplay, which displays a category within a given catalog.
  • Launches the StoreCatalogDisplayView command.
  • The default behavior is to display all the catalogs in the store.

TopCategoriesDisplay

This command first ensures that the specified Catalog can be displayed in the current store and then sets the TopCategoriesDisplayView task.
This command sets the view task that will display the root Categories in a specified Catalog. Catalogs can be specified in three ways:

The first method is to provide the primary key (CatalogId) of the Catalog. If the CatalogId is not known, the second or third method can be used to uniquely identify a Catalog.
The second method is to provide the external Identifier of the Catalog and a MemberId that indicates its owner. This MemberId-Identifier pair uniquely identifies exactly one Catalog.
The third method is to simply provide the external Identifier without supplying a MemberId. If this method is used, the command assumes that the owning member of the current store is also the owner of the Catalog. Therefore, this MemberId along with the provided Identifier are used to identify the Catalog.   

Steps explained in detail

The command can be used as the second part of a "drill down" sequence that starts with StoreCatalogDisplay, which displays the catalogs of a store.

  • Launches the TopCategoriesDisplayView view task.

CategoryDisplayCmdImpl-

This command retrieves the configured display page for the specified category in the specified catalog. That display page will in turn be launched to display the category information. The default implementation retrieves the display page name from the DISPCGPREL database table.
The page name is determined by the following criteria:
  • The current category's id
  • The current user's member group
  • The current language
  • The current store
  • The type of device from which the user is accessing the page
Categories can be identified in three ways:
  • The first method is to provide the primary key (CategoryId) of the category. If the CategoryId is not known, the second or third method can be used to uniquely identify a category.
  • The second method is to provide the external Identifier of the category and a MemberId that indicates the owner of the category. This MemberId-Identifier pair uniquely identifies exactly one category.
  • The third method is to simply provide the external Identifier without supplying a MemberId. If this method is used, the command assumes that the owning member of the current store is also the owner of the category. Therefore, this MemberId along with the provided Identifier is used to identify the category.
Similarly, the catalog in which the category resides can also be specified in three ways:
  • The first method is to provide the primary key (CatalogId) of the catalog. If the CatalogId is not known, the second or third method can be used.
  • The second method is to provide the external CatalogIdentifier of the catalog and a CatalogMemberId that indicates the owner of the catalog. This CatalogMemberId-CatalogIdentifier pair uniquely identifies exactly one catalog.
  • The third method is to simply provide the external CatalogIdentifier without supplying a CatalogMemberId. If this method is used, the command assumes that the owning member of the current store is also the owner of the catalog. Therefore, this CatalogMemberId along with the provided CatalogIdentifer is used to identify the catalog.
Steps explained in detail

The category to be displayed can be uniquely identified from the following:
  • The categoryId parameter.
  • The identifier and the memberId parameters.
If the identifier parameter is supplied without the memberId parameter, then the memberId parameter will be inferred as the member that owns the store specified by storeId. Ensures that the category to be displayed has been published in the current language. Sets the CategoryDisplayView to display the category page that corresponds to the specified store reference number and category reference number.

ErrorMissingAttributeCmd
This error task command is set when a Product to Item resolution fails due to missing product attributes.

ErrorProductAttributeCmd
This error task command is set when a Product to Item resolution fails due to incorrect product attributes

ProductDisplayCmd

This command first ensures that the CatalogEntry specified by the ProductId can be displayed in the current store, if published = 1, and  marked for delete = 0.
It then resolves the Display Page by using the CatalogEntry information.
This information includes the current store, the current user's member groups, the type of device that is being used to browse the CatalogEntry, the type of the CatalogEntry, and whether or not it is on auction.
After the Display Page has been retrieved, the command sets the ProductDisplayView task with the resolved Display Page as the document name.

This command retrieves the configured Display Page for the specified CatalogEntry which will in turn be launched in order to display information about the CatalogEntry.
The default implementation retrieves the display page name from the DISPENTREL table.
The page name is determined by the following criteria:
  • The current catalog entry's id
  • The current user's member group
  • The current language
  • The current store
  • The CatalogEntry type
  • The type of device from which the user is accessing the page
  • Whether or not this CatalogEntry is currently on auction
The type of the CatalogEntry may be Catalog Item, Product with defining attributes, Bundle, Static Kit or Dynamic Kit.
CatalogEntries can be specified in three ways:
  • The first method is to provide the primary key (ProductId) of the CatalogEntry. If the ProductId is not known, the second or third method can be used to uniquely identify a CatalogEntry.
  • The second method is to provide the external PartNumber of the CatalogEntry and a MemberId that indicates its owner. This MemberId-PartNumber pair uniquely identifies exactly one CatalogEntry.
  • The third method is to simply provide the external PartNumber without supplying a MemberId. If this method is used, the command assumes that the owning member of the current store is also the owner of the CatalogEntry. Therefore, this MemberId along with the provided PartNumber are used to identify the CatalogEntry.

ResolveSkuCmd

Certain catalog entries may need further processing before being added to an order. This command takes care of resolving a product into an item through SKU resolution. It resolves a Product and its associated Attributes and attribute values into an orderable Item.
The input to this command is:
  • ProductID: the ID of the Product that is to be resolved, and
  • AttributeNVPs: a hashtable of ProductAttribute IDs and their associated values that are used to perform the resolution
The output of the command is:
  • ItemId: the ID of the resolved orderable Item
  • ItemSpecId: the ID of item specification that is associated with the resolved orderable Item

No comments:

Post a Comment