Category Object
Use this object to work with relationships between categories and products. You can also use this object to manipulate parent/child relationships for a category.
ProgID: | Dependent (See Remarks for more information) |
COM Class Name: | Category |
COM Interface Name: | ICategory |
Interface ID Constant: | IID_ICategory |
Header File: | Catalog.h, mspu_guids.h |
Type Library Name: | Microsoft Commerce 2000 Catalog Type Library |
DLL Name: | Catalog.dll |
Threading Model: | Both |
In C++, use the ICategory interface to access the properties and methods of the Category object.
Because this object is primarily intended for use within ASP script, access from C++ will not be common.
The properties of the Category object are shown in the following table.
Property | Type | Description |
AncestorCategories | _Recordset | Contains a recordset of category names that exist anywhere above this category, and that directly or indirectly contain this category in the hierarchy.
This property is read-only. |
CatalogName | BSTR | Contains the name of the catalog of which this Category object is a member.
This property is read-only. |
CategoryName | BSTR | Contains the name of this category.
This property is read-only. |
ChildCategories | _Recordset | Contains a recordset containing the child Category objects for this category.
This property is read-only. |
DescendantProducts | _Recordset | Contains all products that exist anywhere below this category. Accessing this property on the root category returns every product in the entire catalog.
This property is read-only. |
GetCategoryProperties | _Recordset | Contains a recordset containing the property values for this category.
This property is read-only. |
ParentCategories | _Recordset | Contains a recordset containing the names of the Category objects that are parent categories to this category.
This property is read-only. |
Products | _Recordset | Contains the products that exist within this category, but not within descendant categories.
This property is read-only. |
RelatedCategories | _Recordset | Contains a recordset that describes all of the categories and product families that have relationships to this category.
This property is read-only. |
RelatedProducts | _Recordset | Contains a recordset that describes all the product variants and product families that have relationships to this category.
This property is read-only. |
The methods of the Category object are shown in the following table.
Method | Description |
AddChildCategory | Adds another specified category as a child of this category. |
AddParentCategory | Adds another specified category as a parent of this category. |
AddProduct | Adds another specified product variant as a child of this category. |
AddRelationshipToCategory | Adds a relationship from another category to this category. |
AddRelationshipToProduct | Adds a relationship from this category to a specified product. |
RemoveChildCategory | Removes the specified category as a child of this category. |
RemoveParentCategory | Removes the specified category as a parent of this category. |
RemoveProduct | Removes a product from this category. |
RemoveRelationshipToCategory | Removes the relationship between this category and a specified category. |
RemoveRelationshipToProduct | Removes the relationship between this category and a specified product. |
SetCategoryProperties | Assigns new properties to a category. |
Remarks
The Category object is a dependent object. Obtain a pointer to the ICategory interface by calling one of the following methods: