Managing catalog assets
Over time, you will need to update the database asset information from the master catalog. Maintaining your catalog is an ongoing process, as you will need to continually add and remove merchandise, create and associate categories or catalog groups, and update product information, such as descriptions and price.
You can change your catalog assets by editing the WebSphere Commerce XML data using the existing database entries and catalog.xml files from your store. Use the WebSphere Commerce starter store XML files as a reference, located in the following data directory:
- WC_installdir/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 your 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"
/>
About this task
The language_id
identifies the language of your catalog information.
This identifier must change to match each language your 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
andname
elements are identical in the preceding example, the content can vary. For instance, you might choose to rename your catalog group to Complementary Additions. In such a case, you do not need to change the information inidentifer
, onlyname
. - 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 you need to change thecatgroup_id
to the correct group.
Procedure
<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, or DynamicKitBean.
Names and descriptions belong to the locale specific catalog.xml file, one of which is required for each locale your 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 your 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 your catalog information. This identifier
must change to match each language your 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
you need to 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.