This documentation is archived and is not being maintained.

Adding User-Defined Attributes to Catalogs

Commerce Server 2002

To associate additional information with your catalogs, use the AddCatalogAttribute method of the CatalogManager object to add user-defined catalog attributes. You can also add an AttributeDefinition element in the XML file to create user-defined catalog attributes by importing an XML file. For example, you can add a VendorCode attribute and use it to associate a vendor with a catalog.

For example, following is an XML with the VendorCode attribute:

<?xml version="1.0" ?> 
-    <MSCommerceCatalogCollection2 version="2.0">
-       <CatalogSchema>
<AttributeDefinition AttributeType="CatalogAttribute"   
   name="VendorCode" dataType="string" maxLength =  "30" /> 
         <!—Properties and definitions go here ->   
 <Catalog name =”Mycatalog” VendorCode=”MyVendor”>
<!—Categories and  products go here ->   

Copyright © 2005 Microsoft Corporation.
All rights reserved.