Develop > Persistence layer > Data assets
Create catalog assets
Overview
To create the catalog assets for the store, create a master catalog by adding information to several WebSphere Commerce database tables.
You can create the catalog using XML files that are loaded into the database by the loading utilities.
If you are creating a globalized catalog, we will need separate XML files for each locale the store supports. Each locale specific XML file adds the translatable information, such as descriptions, for the...
- catalog
- catalog groups
- catalog entries
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
- associations for orderable merchandise
- Review WebSphere Commerce loading utilities information.
The loading utilities are utilities for preparing and loading data into a WebSphere Commerce database. Use the loading utilities to load large amounts of data and to update data in the database.
- 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 the 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 separate catalog.xml file for each locale the store supports. The locale-specific file should specify all description information, so it can be 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_INSTALL/starterstoresThe catalog.dtd file is located in...
WC_INSTALL/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 the 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" />
Each time you create a catalog group and its description, the catgroup_id changes to represent a new catalog group. For example...
- catgroup_id="@catgroup_id_2"
- catgroup_id="@catgroup_id_3"
- catgroup_id="@catgroup_id_4"
- and so on...
- After creating the 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 the catalog.
<cattogrp catalog_id="&CATALOG_ID;" catgroup_id="@catgroup_id_1" sequence="0" />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"
- catgroup_id="@catgroup_id_4"
- and so on...
- 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 the catalog.
<catgrprel catgroup_id_parent="@catgroup_id_1" catgroup_id_child="@catgroup_id_11" catalog_id="&CATALOG_ID;" sequence="0" />With each catalog group relationship, the catgroup_id_child and the sequence is modified to represent a new relationship. For example, subsequent relationships would be displayed as...
- catgroup_id_child="@catgroup_id_12" and sequence="1",
- catgroup_id_child="@catgroup_id_13" and sequence="2"
- ...and so on...
If you are not using a navigational structure in the catalog, then you can remove the CATGRPREL relationship.
- 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 the 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" />
You must create a base item for every product that you create in the catalog. Each time you create a base item, the baseitem_id and partnumber numbers change to create a new base item. For example, a new base item would contain baseitem_id="@baseitem_id_147" and partnumber="tooltech_sku_147" as entries, while another base item would contain baseitem_id="@baseitem_id_192" and partnumber="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 the catalog:
<itemspc itemspc_id="@itemspc_id_106" baseitem_id="@baseitem_id_102" markfordelete="0" partnumber="T0000106" member_id="@seller_b2b_mbr_id" discontinued="N" />
You must create a specified item for each item that you create in the catalog. Each time you define a specified item, the itemspc_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 contain itemspc_id="@itemspc_id_108", baseitem_id="@baseitem_id_102", and partnumber="T0000108" as entries, while another specified item would contain itemspc_id, baseitem_id, and partnumber 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 the catalog:
<itemversn itemversn_id="@itemversn_id_102" baseitem_id="@baseitem_id_102" expirationdate="2010-01-01 00:00:00.000000" versionname="version" />Each time you create a relationship between an item version and a base item, the itemversn_id and baseitem_id numbers change to create a new relationship. baseitem_id matches an existing base item. For example, a new relationship would contain itemversn_id="@itemversn_id_107" and baseitem_id="@baseitem_id_107" as entries, while another relationship would contain itemversn_id="@itemversn_id_108" and baseitem_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 the catalog:
<versionspc versionspc_id="@versionspc_id_106" itemspc_id="@itemspc_id_106" itemversn_id="@itemversn_id_102" />Each time you create a relationship between a product version and a specified item, the versionspc_id and itemspc_id numbers change to create a new relationship. itemspc_id matches an existing specified item. For example, a new relationship would contain versionspc_id="@versionspc_id_107" and itemspc_id="@itemspc_id_107" as entries, while another relationship would contain versionspc_id="@versionspc_id_108" and itemspc_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 the 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" />Each time you create a distribution arrangement, the distarrang_id and the baseitem_id numbers change to create a new distribution arrangement. For example, a second distribution arrangement might contain the values distarrang_id="@distarrang_id_147" and baseitem_id="@baseitem_id_147", while a third might contain distarrang_id="@distarrang_id_192" and baseitem_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 inoformation to the STOREITEM table. Complete this task for each base item in the 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" />Each time you define the inventory allocation rules for a store item, the baseitem_id number changes to represent a new base item. For example, a new allocation might contain baseitem_id="@baseitem_id_147" while a third might contain baseitem_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 the 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." />
- Each type of catalog entry -- products, items, packages, bundles, and dynamic kits -- represents the orderable pieces of merchandise for sale in the catalog. Define a base item for each product catalog entry.
- Create catalog entries by adding information to the CATENTRY.
Complete this task for each product catalog entry in the catalog:
<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" />Each time you add a base item to a product catalog entry, the catentry_id and the baseitem_id sequence changes to represent a new catalog entry. The catenttype_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 the 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" />Each time you add a specified item to a catalog entry, the catentry_id and the itemspc_id sequence changes to represent a new catalog entry. The catenttype_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, 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 the 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 attributes and attribute values:
- Create attributes and attribute values for the products by adding information to the ATTRIBUTE and ATTRVALUE tables in the locale-specific XML file for translation purposes.
Each product in the 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 the catalog:
<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" />Each time you add an attribute to a product defined by catentry_id, the attribute_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 the catalog:
<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" />Each time you add an attribute value to an attribute, the attrvalue_id sequences changes to represent different values. The attribute_id sequence changes to represent a different attribute. The sequence increases with each new attribute values. For example, subsequent attribute values would be sequence="1", sequence="2", and sequence="3", and so on.
- Create relationships between products and items:
- After creating products and items for the 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 the catalog:
<catentrel catentry_id_parent="@product_id_147" catreltype_id="PRODUCT_ITEM" catentry_id_child="@catentry_id_152" sequence="2" quantity="1" />Each time you add a relationship between a product and item, the catentry_id_parent and the catentry_id_child numbers change to create different relationships, based on the catreltype_id. With each new relationship, the sequence number is different. For example, if you have sequence="2", the next relationship will have sequence="3", followed by sequence="4", and so on.
- Create packages and bundles:
- Once you have created the 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 the catalog:
<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" />Each time you create a package or a bundle, the catentry_id, partnumber, and mfpartnumber numbers change to create different package or bundle. For example, to create a new package, you could use...
- catentry_id="@package_id_103"
- partnumber="sku-@package_id_103"
- mfpartnumber="sku-@package_id_103"
- catenttype_id="PackageBean" (identify the entry as a package)
To create a new bundle, you could use...
- catentry_id="@package_id_110"
- partnumber="sku-@package_id_110"
- mfpartnumber="sku-@package_id_110"
- catenttype_id="BundleBean" (identify the entry as a bundle)
- 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 the catalog:
<catentrel catentry_id_parent="@catentry_id_102" catreltype_id="PACKAGE_COMPONENT" catentry_id_child="@catentry_id_97" sequence="1.0" quantity="1.0" />Each time you create a relationship between a package and bundle, the catentry_id_parent and catentry_id_child number changes to match existing catalog entries. With each new relationship, the sequence number is different. For example, if you begin with sequence="1.0", the next relationship will have sequence="2.0", followed by sequence="3.0", and so on.
- After creating catalog groups and catalog entries in the 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, use a sales catalog. Complete this task for each catalog group and catalog entry relationship in the catalog:
<catgpenrel catgroup_id="@catgroup_id_11" catalog_id="@catalog_id_1" catentry_id="@product_id_102" sequence="0" />Each time you create a relationship between catalog groups and catalog entries, the catgroup_id and catentry_id numbers change to form new relationships with different catalog groups and catalog entries. With each new relationship, the sequence number is different. For example, if you begin with sequence="0", the next relationship will have sequence="1", followed by sequence="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 the catalog:
<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" />Each time you add a merchandising association, the massoccece_id number changes to represent a new relationship. The catentry_id_from and the catentry_id_to numbers vary to create new merchandise content for the association.
- Associate the catalog to a store:
- Associate the 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 the catalog:
<storecent storeent_id="@storeent_id_1" catentry_id="@product_id_102" />Each time you add a 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 the catalog:
<storecgrp storeent_id="@storeent_id_1" catgroup_id="@catgroup_id_1" />Each time you add a catgroup_id to the store entity, the reference number changes to match an existing catalog group.
- Associate taxes to the catalog:
- Associate taxes to the products and services in the 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, associate a shipping calculation code with the catalog entries.
- Associate the 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 the 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, 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.
- After you have created the data, load the XML file into the database by either using the loading utilities or through the Publish wizard.
See also
- Create a master catalog
You can create master catalogs using by loading XML files or CSV files. You can also create a master catalog using WebSphere Commerce Accelerator, or Management Center.
- Create a sales catalog
A WebSphere Commerce store allows two types of catalogs: master and sales. Sales catalogs do not need to meet the structural restrictions that are placed on master catalogs. Sales catalogs are meant to provide a flexible display structure to allow you to create a catalog that suits the store's requirements.
- Manage catalog assets
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, and update product information, such as descriptions and price.
- Changing catalog information
To change the product data published with one of the starter store archives, we will need to delete this information after you publish the store archive, in order to add the own product data.
- Display store-catalog assets
After associating a catalog, catalog groups, and catalog entries to a store, assign JSP templates to display the catalog entries and catalog groups by creating these relationships in the database. Create these relationships in the format of XML files that can be loaded into the database using the loading utilities
- Dynamic kit data assets
Dynamic kits data assets are created in the same way as other catalog assets. The dynamic kit components must have their own SKUs as does the dynamic kit.
- Create a predefined configuration for a dynamic kit
Related concepts
Related reference
Database asset groups dependencies