For the Pioneer Cycling Catalog, we extended the basic ATG Consumer Commerce SKU item type with the following new properties:
Property | Description |
---|---|
| The color of the SKU. |
| The weight, in ounces, grams, or other units, of the SKU. |
Here is the SQL DDL for adding the new attributes to the SKU item type. Again, we created a new table (b2c_sku
) to hold the new attributes instead of editing the SQL DDL that comes with ATG Consumer Commerce:
CREATE TABLE b2c_sku ( sku_id VARCHAR(40) NOT NULL REFERENCES dcs_sku(sku_id), color VARCHAR(100) NULL, exact_weight DOUBLE PRECISION NULL, PRIMARY KEY(sku_id) );
Here is the code sample from the XML file that defines these additions to the SKU item-type definition:
<item-descriptor name="sku" sub-type-property="type"> … <table name="b2c_sku" type="auxiliary" id-column-name="sku_id"> <property name="color" data-type="string" column-name="color"/> <property name="exactWeight" data-type="double" column-name="exact_weight"/> </table> </item-descriptor>