This section assumes you have read and understood the SQL Repository Architecture chapter in the ATG Repository Guide. ATG Commerce stores its product catalog data in a SQL database and accesses that data via the SQL Repository Adapter. In order for the SQL Repository Adapter to be able to access your product catalog information, all of the information regarding the definition of your item types must be defined in an XML repository template definition file. The XML definition file contains information about the item types in your product catalog, the properties of each item type, how the item types and their properties are stored in the database, and other important “meta” data. Any changes you want to make to the base item types have to be made inside the XML definition file. Because all data is stored in a database, any additions have to be accompanied by SQL DDL scripts for creating new tables for the new information. In summary, to add any new item types or properties you need to write XML scripts and SQL DDL scripts.

The XML definition files reside in the configuration path. The entire definition of your product catalog could reside in a single XML file, or the definition may be spread out among multiple files. In addition, these definition files may be layered among several configuration layers similar to the way properties files are. XML files from different configuration layers are combined according to highly structured rules. For more information, see the XML File Combination section in the Nucleus: Organizing JavaBean Components chapter of the ATG Programming Guide.

ATG Consumer Commerce comes with an XML definition file that contains the information for the standard product catalog. A reference to this XML file is found in the /atg/commerce/catalog/ProductCatalog component. The location of this XML file is /atg/commerce/catalog/productCatalog.xml.

There are a number of ways you can add an attribute to an existing item type. Our approach was to leave all of the base XML files intact. We created a new XML definition file called /atg/commerce/catalog/productCatalog.xml, which can be found in PioneerCycling/config/config.jar. This file is later merged with the base productCatalog.xml file included in ATG Consumer Commerce by the XML combiner.

ATG Consumer Commerce also comes with SQL DDL scripts that create the SQL tables in the SQL database. Because any new attributes must be stored in a database table, we had to add SQL DDL scripts for each new attribute. Again, our approach was to leave the ATG Consumer Commerce SQL DDL scripts intact. We created new Pioneer Cycling SQL DDL scripts that can be found in <ATG2007.3dir>/PioneerCycling/sql/db_components/solid/b2c_product_catalog_ddl.sql.

 
loading table of contents...