Example: Category descriptions
You can insert, replace, or delete your category description in alternate languages data by using the Data Load utility. Language sensitive fields can have multiple values that are loaded for each supported language. These examples use a CSV file to demonstrate how to insert, replace, or delete your category descriptions.
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.
CSV column and XML element definitions
- GroupIdentifier
- Required: (String) The category identifier. This field cannot be null, and it must be unique.
- Name
- (String) The language sensitive display name of this category.
- ShortDescription
- (String) A language sensitive short description of this category.
- LongDescription
- (String) A language sensitive long description of this category.
- Thumbnail
- (String) The language sensitive thumbnail image path of this category. Use forward slashes (/) in the path, for example
images/G1.jpg
. - FullImage
- (String) The language sensitive full image path of this category. Use forward slashes (/) in the path, for example
images/G1.jpg
. - Published
- (Integer) The language sensitive value that determines whether to display this category in the storefront.
- 1
- Published. The default value. The category is displayed in the storefront.
- 0
- Not published
- Keyword
- (String) A language sensitive keyword that is used for searching. Enclose multiple keywords in
double quotation marks that are separated by commas, for example
"keyword 1, keyword 2, keyword3"
. - Delete
- (String) A flag indicating whether to delete. Specify
1
to delete the row.
Other optional fields not included in the example are:
- Note
- (String) Use this field to add footnotes or extended long descriptions for this category.
CSV file with sample category description data
Insert or replace
The sample CSV file contains French language category descriptions. The categories already had English description loaded previously. CSV file with sample category description data
GroupIdentifier | Name | ShortDescription | LongDescription | Thumbnail | FullImage | Published | Keyword |
---|---|---|---|---|---|---|---|
Appl_category | catégorie d'appareils |
Description courte des appareils |
Description longue des appareils |
app_thumb/french_image.jpg | app_full/french_image.jpg | 1 | mot-clé d'appareils |
Fridge_category | Réfrigérateurs |
Description courte de réfrigérateur |
Description longue de réfrigérateur |
fridge_thumb/french_image.jpg | fridge_full/french_image.jpg | 1 | mot-clé de réfrigérateur |
Delete
GroupIdentifier | Name | ShortDescription | LongDescription | Thumbnail | FullImage | Published | Keyword | Delete |
---|---|---|---|---|---|---|---|---|
Appl_category | catégorie d'appareils |
Description courte des appareils |
Description longue des appareils |
app_thumb/french_image.jpg | app_full/french_image.jpg | 1 | mot-clé d'appareils |
1 |
Fridge_category | Réfrigérateurs |
Description courte de réfrigérateur |
Description longue de réfrigérateur |
fridge_thumb/french_image.jpg | fridge_full/french_image.jpg | 1 | mot-clé de réfrigérateur |
1 |
Mapping data
The following snippet from the sample catalog group description loader configuration file demonstrates how to map each value to a business object logical schema path.
<_config:DataMapping>
<_config:mapping xpath="CatalogGroupIdentifier/UniqueID" value="GroupUniqueId" />
<_config:mapping xpath="CatalogGroupIdentifier/ExternalIdentifier/GroupIdentifier" value="GroupIdentifier" />
<_config:mapping xpath="Description[0]/Name" value="Name" />
<_config:mapping xpath="Description[0]/ShortDescription" value="ShortDescription" />
<_config:mapping xpath="Description[0]/LongDescription" value="LongDescription" />
<_config:mapping xpath="Description[0]/Thumbnail" value="Thumbnail" />
<_config:mapping xpath="Description[0]/FullImage" value="FullImage" />
<_config:mapping xpath="Description[0]/Attributes/published" value="Published" />
<_config:mapping xpath="Description[0]/Keyword" value="Keyword" />
<_config:mapping xpath="Description[0]/Attributes/note" value="Note" />
<_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.CatalogGroupDescriptionMediator.