Creating catalog assets
To create the catalog assets for your store, you need to create a master catalog by adding information to several WebSphere Commerce database tables. You can create your catalog using XML files that are loaded into the database by the loading utilities. If you are creating a globalized catalog, you will need separate XML files for each locale your store supports. Each locale specific XML file adds the translatable information, such as descriptions, for your catalog, catalog groups, and catalog entries.
Procedure
To create catalog assets:
- Prepare for catalog creation:
- Review the catalog information and its corresponding object and data models within WebSphere Commerce. The catalog information is a component of the WebSphere Commerce Server that provides online catalog navigation, partitioning, categorization, and associations for orderable merchandise.
- Review the WebSphere Commerce loading utilities information. The loading utilities are utilities for preparing and loading data into a WebSphere Commerce database. You can use the loading utilities to load large amounts of data and to update data in your database. For more information about the loading utilities, see Loading utilities.
- Review the XML conventions used in starter store archives.
- Create an organization through the Administration Console to act as the catalog owner.
- Create a new XML file for your master catalog by using
the existing XML entries and
catalog.xml
files from a starter store as your guide. If you are creating a globalized catalog, create a separatecatalog.xml
file for each locale your store supports. The locale-specific file should specify all description information, so it can be easily translated. In this example, one catalog.xml file will be used for all information that does not need to be translated, and a second catalog.xml will be used for each locale the store supports and will include the information that needs to be translated. Or, if you prefer, you can use the existing XML file from a starter store and change the information as needed. The catalog.xml files from the starter store are located in its store archive file. To view the catalog.xml files, decompress the store archive using a ZIP program. The catalog.xml files are located in the following data directory: WC_installdir/starterstores.Thecatalog.dtd
file is located in the following directory: WC_installdir/xml/sar.
- Create a catalog entity:
- Add information to the CATALOG and CATALOGDSC tables. A catalog entity represents a catalog in the database.
- Add the catalog's description in the locale-specific
XML file for translation purposes:
<catalogdsc catalog_id="@catalog_id_1" language_id="&en_US;" name="Store master catalog" />
- Create catalog groups:
- Add information to the CATGROUP and CATGRPDESC tables. Catalog groups, also known as
categories, are groupings of other catalog groups or products. Complete
this task for each catalog group in your catalog:
<catgroup catgroup_id="@catgroup_id_1" member_id="&MEMBER_ID;" identifier="Woodworking" markfordelete="0" />
- Add the catalog group's description in the locale-specific
XML file for translation purposes. Complete this task for each catalog
group in your catalog:
<catgrpdesc language_id="&en_US;" catgroup_id="@catgroup_id_1" name="Woodworking" shortdescription="Woodworking" longdescription="Woodworking" published="1" />
Note: Each time you create a catalog group and its description, thecatgroup_id
changes to represent a new catalog group. For example,catgroup_id="@catgroup_id_2"
,catgroup_id="@catgroup_id_3"
, andcatgroup_id="@catgroup_id_4"
, and so on. - After creating your catalog groups, assign a top-level
catalog group to the catalog by adding information to the CATTOGRP table. This catalog group is the parent
to the catalog groups immediately below it. Complete this task for
each top-level catalog group in your catalog.
Each time you assign top-level catalog groups to the catalog, the catgroup_id is modified to represent a new catalog group association. For example, catgroup_id="@catgroup_id_2" , catgroup_id="@catgroup_id_3" , and catgroup_id="@catgroup_id_4", and so on.<cattogrp catalog_id="&CATALOG_ID;" catgroup_id="@catgroup_id_1" sequence="0" />
- Once the parent and child structure has been determined
for your catalog groups, create relationships between the catalog
groups by adding information to the CATGRPREL table.
Complete this task for each parent and child catalog group structure
in your catalog.
With each catalog group relationship, the<catgrprel catgroup_id_parent="@catgroup_id_1" catgroup_id_child="@catgroup_id_11" catalog_id="&CATALOG_ID;" sequence="0" />
catgroup_id_child
and thesequence
is modified to represent a new relationship. For example, subsequent relationships would be displayed ascatgroup_id_child="@catgroup_id_12"
andsequence="1"
, andcatgroup_id_child="@catgroup_id_13"
andsequence="2"
, and so on. If you are not using a navigational structure in your catalog, then you can remove the CATGRPREL relationship.
- Add information to the CATGROUP and CATGRPDESC tables. Catalog groups, also known as
categories, are groupings of other catalog groups or products. Complete
this task for each catalog group in your catalog:
- Create inventory information:
- Create base items by adding information to the BASEITEM table. Base items
represent a general family of products with a common name and description.
Complete this task for each group of inventory items in your catalog:
<baseitem baseitem_id="@baseitem_id_102" member_id="@seller_b2b_mbr_id" markfordelete="0" partnumber="tooltech_sku_102" itemtype_id="ITEM" quantitymeasure="C62" quantitymultiple="1.0" />
Note: You must create a base item for every product that you create in your catalog. Each time you create a base item, thebaseitem_id
andpartnumber
numbers change to create a new base item. For example, a new base item would containbaseitem_id="@baseitem_id_147"
andpartnumber="tooltech_sku_147"
as entries, while another base item would containbaseitem_id="@baseitem_id_192"
andpartnumber="tooltech_sku_192"
as entries, and so on. - Add information about specified items to the database
by adding information to the ITEMSPC table.
A specified item is an item with values for all its attributes, and
represents an item, package, bundle, or dynamic kit in the catalog.
Complete this task for each specified item in your catalog:
<itemspc itemspc_id="@itemspc_id_106" baseitem_id="@baseitem_id_102" markfordelete="0" partnumber="T0000106" member_id="@seller_b2b_mbr_id" discontinued="N" />
Note: You must create a specified item for each item that you create in your catalog. Each time you define a specified item, theitemspc_id="@itemspc_id_107"
,baseitem_id="@baseitem_id_102"
,partnumber="T0000107"
numbers change to create a new specified item. For example, a new specified item would containitemspc_id="@itemspc_id_108"
,baseitem_id="@baseitem_id_102"
, andpartnumber="T0000108"
as entries, while another specified item would containitemspc_id
,baseitem_id
, andpartnumber
as entries, and so on. - Add a relationship between an item version and a base
item to the database by adding information to the ITEMVERSN table. Complete this task for each such
relationship in your catalog:
Note: Each time you create a relationship between an item version and a base item, the<itemversn itemversn_id="@itemversn_id_102" baseitem_id="@baseitem_id_102" expirationdate="2010-01-01 00:00:00.000000" versionname="version" />
itemversn_id
andbaseitem_id
numbers change to create a new relationship.baseitem_id
matches an existing base item. For example, a new relationship would containitemversn_id="@itemversn_id_107"
andbaseitem_id="@baseitem_id_107"
as entries, while another relationship would containitemversn_id="@itemversn_id_108"
andbaseitem_id="@baseitem_id_108"
as entries, and so on. - Define a relationship between a product version and
a specified item in the database by adding information to the VERSIONSPC table. Complete this task for each such
relationship in your catalog:
<versionspc versionspc_id="@versionspc_id_106" itemspc_id="@itemspc_id_106" itemversn_id="@itemversn_id_102" />
Note: Each time you create a relationship between a product version and a specified item, theversionspc_id
anditemspc_id
numbers change to create a new relationship.itemspc_id
matches an existing specified item. For example, a new relationship would containversionspc_id="@versionspc_id_107"
anditemspc_id="@itemspc_id_107"
as entries, while another relationship would containversionspc_id="@versionspc_id_108"
anditemspc_id="@itemspc_id_108"
as entries, and so on. - Add the distribution arrangements to the database by
adding information to the DISTARRANG table.
A distribution arrangement enables a store to sell its own inventory.
Complete this task for each distribution arrangement in your catalog:
<distarrang distarrang_id="@distarrang_id_102" wholesalestore_id="@storeent_id_1" merchantstore_id="@storeent_id_1" baseitem_id="@baseitem_id_102" pickingmethod="F" startdate="2000-12-25 00:00:00.000000" enddate="2010-01-01 00:00:00.000000" />
Note: Each time you create a distribution arrangement, thedistarrang_id
and thebaseitem_id
numbers change to create a new distribution arrangement. For example, a second distribution arrangement might contain the valuesdistarrang_id="@distarrang_id_147"
andbaseitem_id="@baseitem_id_147"
, while a third might containdistarrang_id="@distarrang_id_192"
andbaseitem_id="@baseitem_id_192"
, and so on. - Add the attributes that affect how a particular store
allocates inventory for the specified items of a particular base item
to the database. Add this information to the STOREITEM table.
Complete this task for each base item in your catalog:
<storeitem baseitem_id="@baseitem_id_102" storeent_id="@storeent_id_1" trackinventory="Y" forcebackorder="N" releaseseparately="N" returnnotdesired="N" backorderable="Y" creditable="Y" minqtyforsplit="0" />
Note: Each time you define the inventory allocation rules for a store item, thebaseitem_id
number changes to represent a new base item. For example, a new allocation might containbaseitem_id="@baseitem_id_147"
while a third might containbaseitem_id="@baseitem_id_192"
, and so on. - Add the base item description to the locale-specific
XML file for translation purposes. The information is added to the
BASEITEMDSC table. Complete this task for each base item description
in your catalog:
<baseitmdsc baseitem_id="@baseitem_id_102" language_id="&en_US;" shortdescription="Circular Saw" longdescription="Light on weight but not in quality. The Circular Saw weighs a maximum of 10.9lbs., with a choice of a 12 or 14 amp motor, and speeds of up to 600 rpms! Low friction 220V aluminum alloy shoe will ensure the job gets done on time." />
- Create base items by adding information to the BASEITEM table. Base items
represent a general family of products with a common name and description.
Complete this task for each group of inventory items in your catalog:
- Each type of catalog entry -- products, items, packages,
bundles, and dynamic kits -- represents the orderable pieces of merchandise
for sale in your catalog. Define a base item for each product catalog
entry. For additional information about dynamic kits, see Dynamic kit data assets
- Create catalog entries by adding information to the CATENTRY. Complete this task for each product catalog
entry in your catalog:
Note: Each time you add a base item to a product catalog entry, the<catentry catentry_id="@product_id_102" baseitem_id="@baseitem_id_102" member_id="@seller_b2b_mbr_id" catenttype_id="ProductBean" partnumber="T0000102" mfpartnumber="Sprain-Tools-102" mfname="Sprain Tools" markfordelete="0" buyable="1" />
catentry_id
and thebaseitem_id
sequence changes to represent a new catalog entry. Thecatenttype_id
changes depending on the type of catalog entry. - Define a specified item for each catalog entry. Complete
this task for each catalog entry in your catalog:
<catentry catentry_id="@catentry_id_106" itemspc_id="@itemspc_id_106" member_id="@seller_b2b_mbr_id" catenttype_id="ItemBean" partnumber="T0000106" mfpartnumber="Sprain-Tools-106" mfname="Sprain Tools" markfordelete="0" buyable="1" />
Note: Each time you add a specified item to a catalog entry, thecatentry_id
and theitemspc_id
sequence changes to represent a new catalog entry. Thecatenttype_id
changes depending on the type of catalog entry. Under the master catalog structural restriction, a catalog entry cannot belong to more than one category. To place a catalog entry in more than one category, you must use a sales catalog. - Add the description to the locale-specific XML file.
This information is added to the CATENTDESC table.
Complete this task for each catalog entry description in your catalog:
<catentdesc catentry_id="@product_id_102" language_id="&en_US" name="Circular" shortdescription="Circular Saw" longdescription="Light on weight but not in quality. The Circular Saw weighs a maximum of 10.9lbs., with a choice of a 12 or 14 amp motor, and speeds of up to 600 rpms! Low friction 220V aluminum alloy shoe will ensure the job gets done on time." thumbnail="images/circular_saw_sm.gif" fullimage="images/circular_saw.gif" available="1" published="1" />
- Create catalog entries by adding information to the CATENTRY. Complete this task for each product catalog
entry in your catalog:
- Create attributes and attribute values:
- Create attributes and attribute values for your products
by adding information to the ATTRIBUTE and ATTRVALUE tables in the locale-specific XML file
for translation purposes. Each product in your catalog has a specific
set of attributes, such as size and color for a shirt or a pair of
pants. Items are defined by the attribute values. For example, while
a shirt is a product, a medium, black shirt is an item. Complete this
task for each attribute in your catalog:
Note: Each time you add an attribute to a product defined by<attribute attribute_id="@attribute_id_105" language_id="&en_US;" attrtype_id="STRING" name="Speed" sequence="2" description="Speed" catentry_id="@product_id_102" description2="Speed" />
catentry_id
, theattribute_id
sequence changes to represent a new attribute. - Add the attribute values. Add the information to the ATTRVALUE table. Complete this task for each attribute
value in your catalog:
Note: Each time you add an attribute value to an attribute, the<attrvalue attrvalue_id="@attrvalue_id_114" language_id="&en_US;" attribute_id="@attribute_id_103" name="12.0amps" attrtype_id="STRING" stringvalue="12.0amps" sequence="0" catentry_id="@catentry_id_106" />
attrvalue_id
sequences changes to represent different values. Theattribute_id
sequence changes to represent a different attribute. Thesequence
increases with each new attribute values. For example, subsequent attribute values would besequence="1"
,sequence="2"
, andsequence="3"
, and so on.
- Create attributes and attribute values for your products
by adding information to the ATTRIBUTE and ATTRVALUE tables in the locale-specific XML file
for translation purposes. Each product in your catalog has a specific
set of attributes, such as size and color for a shirt or a pair of
pants. Items are defined by the attribute values. For example, while
a shirt is a product, a medium, black shirt is an item. Complete this
task for each attribute in your catalog:
- Create relationships between products and items:
- After creating products and items for your catalog,
define the relationships between products and items by adding information
to the CATENTREL table. Complete this task
for each product and item relationship value in your catalog:
Note: Each time you add a relationship between a product and item, the<catentrel catentry_id_parent="@product_id_147" catreltype_id="PRODUCT_ITEM" catentry_id_child="@catentry_id_152" sequence="2" quantity="1" />
catentry_id_parent
and thecatentry_id_child
numbers change to create different relationships, based on thecatreltype_id
. With each new relationship, thesequence
number is different. For example, if you havesequence="2"
, the next relationship will havesequence="3"
, followed bysequence="4"
, and so on.
- After creating products and items for your catalog,
define the relationships between products and items by adding information
to the CATENTREL table. Complete this task
for each product and item relationship value in your catalog:
- Create packages and bundles:
- Once you have created your products and items, create
packages and bundles by adding information to the CATENTRY, CATENTDESC, and CATENTREL tables.
As an example, use the following code sample to create a package or
bundle by adding information to the CATENTRY table. Complete this
task for each package and bundle in your catalog:
Note: Each time you create a package or a bundle, the<catentry catentry_id="@package_id_102" member_id="@seller_b2b_mbr_id" catenttype_id="PackageBean" partnumber="sku-@package_id_102" mfpartnumber="sku-@package_id_102" mfname="ToolTech" markfordelete="0" buyable="1" />
catentry_id
,partnumber
, andmfpartnumber
numbers change to create different package or bundle. For example, to create a new package, you could usecatentry_id="@package_id_103"
,partnumber="sku-@package_id_103"
, andmfpartnumber="sku-@package_id_103"
, includingcatenttype_id="PackageBean"
to identify the entry as a package. To create a new bundle, you could usecatentry_id="@package_id_110"
,partnumber="sku-@package_id_110"
, andmfpartnumber="sku-@package_id_110"
, includingcatenttype_id="BundleBean"
to identify the entry as a bundle, and so on. - As an example, use the following code sample to add
the package or bundle description by adding information to the CATENTDESC table in the locale-specific XML file
for translation purposes. Complete this task for each package and
bundle description in your catalog:
<catentdesc catentry_id="@catentry_id_102" language_id="-1" name="computer" shortdescription="Computer" longdescription="A combination of a central processing unit, monitor, hard drive, and color printer. An ideal starter system." thumbnail="images/package_system_sm.gif" fullimage="images/package_system.gif" available="1" published="1" />
- As an example, use the following code sample to create
relationships between packages or bundles and their components by
adding information to the CATENTREL table.
Complete this task for each package or bundle component relationship
in your catalog:
Note: Each time you create a relationship between a package and bundle, the<catentrel catentry_id_parent="@catentry_id_102" catreltype_id="PACKAGE_COMPONENT" catentry_id_child="@catentry_id_97" sequence="1.0" quantity="1.0" />
catentry_id_parent
andcatentry_id_child
number changes to match existing catalog entries. With each new relationship, thesequence
number is different. For example, if you begin withsequence="1.0"
, the next relationship will havesequence="2.0"
, followed bysequence="3.0"
, and so on.
- Once you have created your products and items, create
packages and bundles by adding information to the CATENTRY, CATENTDESC, and CATENTREL tables.
As an example, use the following code sample to create a package or
bundle by adding information to the CATENTRY table. Complete this
task for each package and bundle in your catalog:
- After creating catalog groups and catalog entries in your
catalog, define the relationships between catalog groups and catalog
entries by adding information to the CATGPENREL table.
Under the master catalog structural restriction, a catalog entry cannot
belong to more than one category. To place a catalog entry in more
than one category, you must use a sales catalog. Complete this task
for each catalog group and catalog entry relationship in your catalog:
Note: Each time you create a relationship between catalog groups and catalog entries, the<catgpenrel catgroup_id="@catgroup_id_11" catalog_id="@catalog_id_1" catentry_id="@product_id_102" sequence="0" />
catgroup_id
andcatentry_id
numbers change to form new relationships with different catalog groups and catalog entries. With each new relationship, thesequence
number is different. For example, if you begin withsequence="0"
, the next relationship will havesequence="1"
, followed bysequence="2"
, and so on. - Create merchandising associations by using the following
code sample to create merchandising associations between catalog entries
by adding information to the MASSOCCECE table.
Complete this task for each merchandising association in your catalog:
Note: Each time you add a merchandising association, the<massoccece massoccece_id="@relationship_id_100" massoctype_id="X-SELL" catentry_id_from="@product_id_1" catentry_id_to="@product_id_15" massoc_id="REQUIRES" quantity="2.0" rank="1.00000" />
massoccece_id
number changes to represent a new relationship. Thecatentry_id_from
and thecatentry_id_to
numbers vary to create new merchandise content for the association. - Associate your catalog to a store:
- Associate your catalog to a store by assigning the catalog,
its catalog groups, and catalog entries to a store in the database
by using the existing store-catalog.xml file. You should also assign
display pages to the catalog groups and catalog entries. Add this
information to the STORECAT, STORECENT, STORECGRP, DISPCGPREL, and DISPENTREL tables.
If you are creating a globalized catalog, create a separate store-catalog
relationship XML file for each locale your store supports:
<storecat catalog_id="@catalog_id_1" storeent_id="@storeent_id_1" mastercatalog="1" />
- Add catalog entries to the store-catalog relationship.
Complete this task for each catalog entry in your catalog:
Note: Each time you add a<storecent storeent_id="@storeent_id_1" catentry_id="@product_id_102" />
catentry_id
to the store entity, the reference number changes to match an existing catalog entry. - Add catalog groups to the store entity. Complete this
task for each catalog group in your catalog:
Note: Each time you add a<storecgrp storeent_id="@storeent_id_1" catgroup_id="@catgroup_id_1" />
catgroup_id
to the store entity, the reference number changes to match an existing catalog group.
- Associate your catalog to a store by assigning the catalog,
its catalog groups, and catalog entries to a store in the database
by using the existing store-catalog.xml file. You should also assign
display pages to the catalog groups and catalog entries. Add this
information to the STORECAT, STORECENT, STORECGRP, DISPCGPREL, and DISPENTREL tables.
If you are creating a globalized catalog, create a separate store-catalog
relationship XML file for each locale your store supports:
- Associate taxes to your catalog:
- Associate taxes to the products and services in your catalog for a specific store. You must associate a tax calculation code with the catalog entries by adding this information to the CATENCALCD table.
- To associate shipping methods to the products and services in your catalog, you must associate a shipping calculation code with the catalog entries. For more information see, Creating shipping assets using an XML file.
- Associate your catalog with a fulfillment center to ship products to customers. A fulfillment center manages product inventory and shipping for a store. Add this information to the FFMCENTER table.
- Create the pricing for your catalog entries. Pricing represents the price range for a catalog entry and any criteria that must be satisfied in order to use that price. To create a functional catalog, you need to add offering information to the database. Add this information to the TRADEPOSCN, TDPSCNCNTR, OFFER, and OFFERPRICE tables. Or you can create or update the pricing for a catalog entry using the Product Management tools in the WebSphere Commerce Accelerator. For information about how to create pricing assets using an XML file see, Creating pricing assets.
- After you have created your data, load the XML file into the database by either using the loading utilities or through the Publish wizard. For more information see, Loading data.