Example: Catalog entry description override

You can use the Data Load utility or Catalog Upload feature to create, replace, or delete catalog entry description overrides for your extended site store. Catalog entry description overrides provides you with the capability of overriding the catalog entry descriptions that are inherited from your asset store. By overriding the inherited catalog entry descriptions, you can create store specific catalog entry descriptions for display on your storefront.

This example uses a CSV file to demonstrate how to insert, replace, or delete your data. You can also create and use an XML formatted file to insert, replace, or delete your data. If you choose to create and use an XML formatted file, ensure that your XML elements use the same names as are used for CSV column names.

After you load your description override data, you can verify that the data is loaded within Management Center and in your storefront. In the Management Center Catalogs tool, open the properties view for the catalog entry to verify the override information. You can further change your override information in this properties view. To verify the data in your storefront, you can launch store preview in Management Center. For more information about using the Management Center to change and preview your description overrides, see Adding catalog entry description overrides.

CSV column and XML element definitions

PartNumber
(Required, String) The catalog entry identifier. The PartNumber field is required (cannot be NULL) and it must be unique. The part number for a catalog entry displays in Management Center as the value for the catalog entry Code property.
LanguageId
(String) The language id for language sensitive fields (Name, ShortDescription, LongDescription, Thumbnail, FullImage, Published, and Keyword). For example: -1 – English, -2 – French
Name
(Required, String) The display name of this catalog entry. The name field is language sensitive.
ShortDescription
(String) The language-specific short description of this catalog entry.
LongDescription
(String) The language-specific long description of this catalog entry.
Thumbnail
(String) The language-specific thumbnail image path of this catalog entry. For instance, images/thumbnails/G1preview.jpg.
AuxDescription1
(String) The language-specific additional description of this catalog entry.
FullImage
(String) The language-specific full image path of this catalog entry. For instance, images/G1.jpg.
AuxDescription2
(String) The language-specific additional description of this catalog entry.
Published
(Integer) Indicates whether this catalog entry is to be displayed. : 0 = catalog entry is not to be displayed, 1= catalog entry is to be displayed.
By default, you cannot override the asset store setting for the property Published. The property displays in Management Center as Display to customers. To override the asset store setting for this property, you must have IT personnel add support for overriding this property through configuration. For more information about this configuration option, see Enable publish override.
Note: If you add support for overriding this property, your override setting for this property might not work with all storefront search functionality. By default, the WebSphere Commerce search index includes all published and non-published catalog entries. This index is based on the catalog identifier and is shared by all stores that share the catalog. If you override this property for any catalog entry in a catalog, you cannot customize the shared search index to include only Published catalog entries for that catalog.
Keyword
(String) A language-specific keyword that is used for searching. If you are using a plain text editor and you want to include multiple keywords, which are separated by commas, include the entire string in double quotation marks. For instance, "keyword 1, keyword 2, keyword3". If you are using a spreadsheet editor, it is not necessary to include the entire string in double quotation marks.
Field 1
(Integer) A customized field for your catalog entry data.
Field 2
(String) A customized field for your catalog entry data.
Field 3
(String) A customized field for your catalog entry data.
Delete
(String) A flag that indicates whether to delete. To delete a row, specify 1.

CSV file with sample catalog entry description data

Replace

In this example, the data source is a CSV file. The file contains sample catalog entry descriptions. Not all available fields are shown in the example.CSV file with sample catalog entry description override data.

Formatted CSV file with column headings
PartNumber LanguageId Name ShortDescription LongDescription
AuroraWMDRS-11 -1 White Flower Sundress Celebrate life with this white flower sundress
AuroraWMDRS-6 -1 Strapless Cocktail Dress, Luigi Valenti red cocktail dress with appliqued roses and tassels at the hem
Formatted CSV file with column headings - continued
Thumbnail FullImage
images/catalog/apparel/women/womens_dresses_160x160/WD_031_a_red.jpg images/catalog/apparel/women/womens_dresses_1000x1000/WD_031_a_red.jpg
images/catalog/apparel/women/womens_dresses_160x160/WD_006_a_red.jpg images/catalog/apparel/women/womens_dresses_1000x1000/WD_006_a_red.jpg

Delete

In this example, the CSV file contains sample catalog entry override descriptions for deletion. Only the required fields are shown in the sample. CSV file with sample catalog entry description override deletion data.

Formatted CSV file with column headings
PartNumber Language_ID Delete
Example-PN-10001 -1 1
Example-PN-10002 -1 1

Mapping data

The following code snippet from the catalog entry description override loader configuration file demonstrates how to map each value to a business object logical schema path.
<_config:DataMapping>
	<_config:mapping xpath="CatalogEntryIdentifier/UniqueID" value="CatalogEntryUniqueId" />      
	<_config:mapping xpath="CatalogEntryIdentifier/ExternalIdentifier/PartNumber" value="PartNumber" />
	<_config:mapping xpath="Description[0]/language" value="LanguageId" />        
	<_config:mapping xpath="Description[0]/Override[0]/Name" value="Name"  />
	<_config:mapping xpath="Description[0]/Override[0]/ShortDescription" value="ShortDescription"   />
	<_config:mapping xpath="Description[0]/Override[0]/LongDescription" value="LongDescription"   />
	<_config:mapping xpath="Description[0]/Override[0]/Thumbnail" value="Thumbnail"   />
	<_config:mapping xpath="Description[0]/Override[0]/Attributes/auxDescription1" value="AuxDescription1"   />
	<_config:mapping xpath="Description[0]/Override[0]/FullImage" value="FullImage"   />       
	<_config:mapping xpath="Description[0]/Override[0]/Attributes/auxDescription2" value="AuxDescription2"   /> 
	<_config:mapping xpath="Description[0]/Override[0]/Attributes/published" value="Published"   />
	<_config:mapping xpath="Description[0]/Override[0]/Attributes/field1" value="Field1"   />
	<_config:mapping xpath="Description[0]/Override[0]/Attributes/field2" value="Field2"   />
	<_config:mapping xpath="Description[0]/Override[0]/Attributes/field3" value="Field3"   />        
	<_config:mapping xpath="Description[0]/Override[0]/Keyword" value="Keyword"  />
	<_config:mapping xpath="" value="Delete"   deleteValue="1"/>
</_config:DataMapping>
If you perform an insert or replace operation, do not specify the "Delete" column in the CSV file or you can leave the "Delete" column empty.

Business object mediator

The mediator class name is com.ibm.commerce.catalog.dataload.mediator.CatalogEntryDescriptionOverrideMediator.

Note: When you use a mediator that is provided with WebSphere Commerce with the Data Load utility, the utility assumes that you are loading data for all columns for a business object. If you want to update the data in only specific columns, configure a column exclusion list for the load process. A column exclusion list causes the Data Load utility to ignore specific columns during the load operation. If you do not use a column exclusion list, the utility updates all columns in the row of a database table row when the utility updates the row. If no value is set in the input file, the utility can replace the existing column value with a default value or set the value to be null. For more information, see Configuring a column exclusion list.