Develop > Persistence layer > Data assets > Create catalog assets
Manage catalog assets
Overview
Over time, we will need to update the database asset information from the master catalog. Maintaining the catalog is an ongoing process, as we will need to...
- continually add and remove merchandise
- create and associate categories or catalog groups
- update product information, such as descriptions and price
You can change the catalog assets by editing existing database entries and catalog.xml files from your store.
Use the WebSphere Commerce starter store XML files as a reference...
WC_INSTALL/starterstores
Catalog groups
Catalog groups are created in a WebSphere Commerce catalog using the CATGROUP and CATGRPDESC database tables. From the catalog.xml file, a typical catalog group looks like the following extract:
<catgroup catgroup_id="@catgroup_id_1" member_id="&MEMBER_ID" identifier="Accessories" markfordelete="0" />
The catgroup_id is the internal reference number of the catalog group. Each catalog group is assigned an internal reference number in WebSphere Commerce, which identifies the group when adding catalog entries. The identifer is an external name for the catalog group. Both elements are unique within the database assets and cannot be duplicated.
Names and descriptions belong to the locale specific catalog.xml file, one of which is required for each locale the store supports. A typical catalog group containing translatable information looks like the following extract:
<catgrpdesc language_id="&en_US" catgroup_id="@catgroup_id_1" name="Accessories" shortdescription="Accessories" longdescription="Accessories" published="1" />
The language_id identifies the language of the catalog information. This identifier must change to match each language the store supports. The name is displayed to the customer, as are the shortdescription and longdescription elements, which may contain a brief and detailed description of the catalog group.
When creating a new catalog group, follow the preceding structure for the information.
While the identifer and name elements are identical in the preceding example, the content can vary. For instance, you might choose to rename the catalog group to Complementary Additions. In such a case, you do not need to change the information in identifer, only name.
When deleting catalog groups, ensure that catgroup_id occurrences are updated accordingly. For instance, if you also want to delete the catalog entries under the catalog group, then you would remove the entire XML entries. However, if you plan to keep the catalog entries, then change the catgroup_id to the correct group.
Procedure
Catalog entries are created in a WebSphere Commerce catalog using the information from the CATENTRY and CATENTDESC database tables. A catalog entry can be a product, item, package, bundle, static kit, or dynamic kit. From the catalog.xml file, a typical catalog entry looks like the following extract:
<catentry catentry_id="@product_id_102" baseitem_id="@baseitem_id_102" member_id="&MEMBER_ID" catenttype_id="ProductBean" partnumber="product-sku-nf-102" mfpartnumber="product-sku-nf-102" mfname="FashionFlow" markfordelete="0" buyable="1" />
The catentry_id is the internal reference number of the product catalog entry. The baseitem_id is base item that the catalog entry relates to, for inventory purposes. The partnumber is the reference number that identifies the part number of the catalog entry. The mfpartnumber is the part number used by the manufacturer to identify the catalog entry. These elements are unique within the database assets and cannot be duplicated.
The catenttype_id identifies the type of catalog entry:
- ItemBean
- ProductBean
- PackageBean
- StaticBean
- BundleBean
- DynamicKitBean
Names and descriptions belong to the locale specific catalog.xml file, one of which is required for each locale the store supports. Merchandise images are also included in this file. A typical catalog group containing translatable information looks like the following extract:
<catentdesc catentry_id="@product_id_102" language_id="&en_US" name="Belt" shortdescription="Classic belt" longdescription="This classic belt looks great with the favorite jeans, or takes you to work in style. 1 1/2 inches wide in full-grain leather with a solid nickel buckle." thumbnail="images/mens_accessories_belt_sm.gif" fullimage="images/mens_accessories_belt.gif" available="1" published="1" />
The language_id identifies the language of the catalog information. This identifier must change to match each language the store supports. The name is displayed to the customer, as are the shortdescription and longdescription elements, which may contain a brief and detailed description of the catalog entry.
When creating a new catalog entry, follow the preceding structure for the information.
When deleting catalog entries, ensure that each occurrence of the unique elements are updated accordingly. For instance, if you also want to delete the catalog entries under the catalog group, then you would remove the entire XML entries. However, if you plan to keep the catalog entries, then change the catgroup_id to the correct group.
Products must be created before other types of catalog entries.
If you do not want to manually change the XML files, you can use the Product Management tools.
Related concepts
Catalog assets
Overview of the mass load utilities
Product Management tools