IBM



10.3.7 Products: Catalog Import

Use this page to view the catalog data files.

File The file name.

File Size The size of the file.

Upload Time The time stamp when the file was uploaded to the WebSphere Commerce Server.

Status The status of the file: New, Processing, Processed, Failed, or Cancelled.

Upload Catalog Uploads the catalog when clicked.

Upload Images Uploads the catalog images when clicked.

Publish Catalog Publishes the catalog when clicked.

View Logs Accesses the logs when clicked.

Refresh Refreshes the Status field when clicked.

In WebSphere Commerce, you can load the catalog data in one of two ways:

Use the Catalog Management tools to create products one at a time.

Use the Loader package to load the catalog data manually from an XML file.

As an alternative, you can create a simple catalog file in Comma Separated Value (CSV) format, which enables a merchant to upload the catalog data through the WebSphere Commerce Accelerator.

WebSphere Commerce provides sample catalog CSV worksheets to use as a guide when creating the own catalog CSV data. These sample worksheets may be found in the wc_installdir\samples\catalogimport directory. Also, this folder contains a ZIP file with thumbnail and full-size images for the catalog.

Note: Bundles and kits are not supported for the CSV catalog import method.

1. WebSphere Commerce configuration:

As installed, WebSphere Commerce sets limits on the file size of the CSV format simple catalog file and ZIP images file. These limitations may be increased to a maximum file size of 1048576000 bytes, as defined in the wc_installdir\instances\wc_instance\xml\wc_instance.xml file. By default, the maximum upload file size for a CSV and a ZIP file is 100000000 bytes.

a. Navigate to the wc_installdir\instances\wc_instance\xml directory on the WebSphere Commerce Server machine.

b. Open the wc_instance.xml file (demo).

c. Search for CatalogUploadFile, which is found in the area of the XML file shown in Example 10-1.

Example 10-1 CatalogUploadFile property in <wc_instance>.xml file

<Command            maxuploadsize="100000000"

            name="CatalogFileUpload"

            supportedFileExtension="csv,zip"

            uploadReturnURL_enabled="true"

            viruscheck="no" />

d. Modify the maxuploadsize property to the maximum value: 1048576000.

Note: The size of simple catalog CSV and images ZIP files must be less than 1048576000 bytes. If this limit is exceeded, the files cannot be uploaded.

2. Locate sample catalog.csv and images.zip files on WebSphere Commerce Server:

a. Navigate to the wc_installdir\samples\catalogimport directory on the WebSphere Commerce Server machine.

b. This directory contains a catalog.csv file and an images.zip file that may be modified to create a simple catalog for the store that seller1admin is managing.

3. Modify the sample catalog.csv file:

WebSphere Commerce provides a sample worksheet with nine sections for loading catalog data in CSV format:

category

categoryDescription

categoryRelation

product

productDescription

price

categoryProductRelation

attribute

attributeValue

Contact the site administrator to access the sample worksheets.

Note: The first column in each row of a section must contain the name of the section. For example, each cell in the first column of the category section must contain the value category.

a. category

The category section information maps to the CATGROUP database table and contains the fields shown in Table 10-1.

Table 10-1

Column name

Description

categoryName

(Required) The unique identifier of the category.

markForDelete

(Required) Use this field to mark a category for deletion: 0 = No (default). 1 = Yes.

field1

(Optional) A customizable string field.

field2

(Optional) A customizable string field.

Simple catalog CSV category section columns

b. categoryDescription

The categoryDescription worksheet information maps to the CATGRPDESC database table and has the fields shown in Table 10-2.

Table 10-2

Column name

Description

categoryName

(Required) The unique identifier of the category.

languageId

(Required) The language that this category description pertains to. Available language components are: -1 = US English, -2 = French, -3 = German, -4 = Italian, -5 = Spanish, -6 = Brazilian Portuguese, -7 = Simplified Chinese, -8 = Traditional Chinese, -9 = Korean, and -10 = Japanese.

displayName

(Required) The displayed name of the category.

shortDescription

(Required) A short description of the category.

longDescription

(Required) A longer description of the category, if necessary.

published

(Required) Use this field to display the category in the language indicated by the languageId: 0 = No. 1 = Yes (default).

thumbnail

(Required) The relative or absolute path to the thumbnail image of the category.

fullImage

(Required) The relative or absolute path to the large image of the category.

Simple catalog CSV categoryDescription columns

c. categoryRelation

The categoryRelation worksheet information maps to the CATGRPREL database table and contains the fields shown in Table 10-3.

Table 10-3

Column name

Description

parent

(Mandatory) The name of the parent category. If this is a top category, the field is empty.

parentMemberId

(Optional) The owner ID of the category (default is the store owner ID). If the merchant is not using a shared master catalog, then this field should be empty.

child

(Required) The child category name.

sequence

(Required) The display sequence of the products in the category.

Simple catalog CSV categoryDescription columns

d. product

The product worksheet information maps to the CATENTRY and CATENTDESC database tables and has the fields shown in Table 10-4.

Table 10-4

Column name

Description

partNumber

(Required) The unique identifier of the product.

parentPartNumber

(Mandatory) The parent product, if this is an item (also known as SKU). If this is a product, the field is empty.

type

(Required) The type of catalog entry: ProductBean or ItemBean.

inventory

(Optional) The number of items in inventory for a particular item (SKU). For catalog entries with type of ProductBean, this field must not be filled.

markForDelete

(Required) Use this field to mark a product for deletion: 0 = No (default). 1 = Yes.

height

(Optional) A nominal height associated with the catalog entry.

length

(Optional) A nominal length associated with the catalog entry.

width

(Optional) A nominal width associated with the catalog entry.

sizeMeasure

(Optional) The unit of measurement used for the height, length, and width fields.

weight

(Optional) A nominal weight associated with the catalog entry.

weightMeasure

(Optional) The unit of measurement used for the weight field.

field1

(Optional) A customizable integer field.

field2

(Optional) A customizable integer field.

field3

(Optional) A customizable decimal field.

field4

(Optional) A customizable string field.

field5

(Optional) A customizable string field.

Simple catalog CSV product columns

e. productDescription

The productDescription worksheet information maps to the CATENTDESC database table and contains the fields shown in Table 10-5.

Table 10-5

Column name

Description

partNumber

(Required) The foreign key to the product's part number.

languageId

(Required) The language that this product description pertains to. Available language components are: -1 = US English, -2 = French, -3 = German, -4 = Italian, -5 = Spanish, -6 = Brazilian Portuguese, -7 = Simplified Chinese, -8 = Traditional Chinese, -9 = Korean, and -10 = Japanese.

displayName

(Required) The displayed name of the product.

shortDescription

(Required) A short description of the product.

longDescription

(Required) A longer description of the product, if necessary.

published

(Required) Use this field to display the product in the language indicated by the languageId: 0 = No. 1 = Yes (default).

thumbnail

(Required) The relative or absolute path to the thumbnail image of the product.

fullimage

(Required) The relative or absolute path to the large image of the product.

type

(Mandatory) The type of catalog entry: ProductBean. If the catalog entry is of ItemBean type, the field must not be filled.

Simple catalog CSV productDescription columns

f. price

The price worksheet information maps to the OFFER and OFFERPRICE database tables and contains the fields shown in Table 10-6.

Table 10-6

Column name

Description

partNumber

(Required) The foreign key to the product's part number.

memberId

(Optional) The owner ID of the catalog entry. (Default is the store owner ID.) If the merchant is not using a shared master catalog, then this field should be empty.

price

(Required) The price of the catalog entry.

currency

(Required) The currency of the price.

precedence

(Optional) The precedence that determines the price of a catalog entry.

startDate

(Required) The date that the price becomes available.

endDate

(Required) The date that the price is withdrawn.

field1

(Optional) A customizable string field.

field2

(Optional) A customizable character field.

Simple catalog CSV price columns

g. categoryProductRelation

The categoryProductRelation worksheet information maps to the CATGRPREL database table and contains the fields shown in Table 10-7.

Table 10-7

Column Name

Description

categoryName

(Required) The parent name of the category.

categoryMemberId

(Optional) The owner ID of the category. (Default is the store owner ID.) If the merchant is not using a shared master catalog, then this field should be empty.

partNumber

(Required) The child product's part number.

sequence

(Required) The display sequence of the category.

Simple catalog CSV categoryProductRelation columns

h. attribute

The attribute worksheet information maps to the ATTRIBUTE database table and contains the fields shown in Table 10-8.

Table 10-8

Column name

Description

parentPartNumber

(Required) The foreign key to the product's part number.

languageId

(Required) The language that this attribute pertains to. Available language components are: -1 = US English, -2 = French, -3 = German, -4 = Italian, -5 = Spanish, -6 = Brazilian Portuguese, -7 = Simplified Chinese, -8 = Traditional Chinese, -9 = Korean, and -10 = Japanese.

attributeType

(Required) The type of attribute: FLOAT, INTEGER, or STRING.

attributeName

(Required) The name of the attribute.

description

(Required) A description of the attribute.

description2

(Optional) An additional description of the attribute, if necessary.

sequence

(Required) The display sequence of the attribute.

field1

(Optional) A customizable string field.

Simple catalog CSV attribute columns

i. attributeValue

The attributeValue worksheet information maps to the ATTRVALUE database table and contains the fields shown in Table 10-9.

Table 10-9

Column name

Description

itemPartNumber

The foreign key to the product's part number.

parentPartNumber

(Required) The foreign key to the product's part number.

languageId

(Required) The language that this attribute value pertains to. Available language components are: -1 = US English, -2 = French, -3 = German, -4 = Italian, -5 = Spanish, -6 = Brazilian Portuguese, -7 = Simplified Chinese, -8 = Traditional Chinese, -9 = Korean, and -10 = Japanese.

attributeType

(Required) The type of attribute: FLOAT, INTEGER, or STRING.

attributeName

(Required) The name of the attribute.

attributeValue

(Required) The attribute value.

sequence

(Required) The display sequence of the attribute value.

field1

(Optional) A customizable integer field.

field2

(Optional) A customizable string field.

field3

(Optional) A customizable string field.

Simple catalog CSV attributeValue columns

4. Compress the image files into an images.zip file.

Note:

The images.zip file may be no larger than 1048576000 bytes.

Images included in the zip file must be in JPG or GIF format.

The Web page designer should be careful to inspect HTML and JSP files to make sure that the resolution of image files is properly sized for the location they appear on storefront pages.

To import a simple catalog into the store:

1. From the Products menu, select Catalog Import.

2. Click Upload catalog.

3. Select UTF-8 from the catalog file encoding pull-down list.

4. Click Browse.

5. Select the Sample CSV Load/catalog.csv file on the machine.

6. Click Upload File.

7. Click OK to confirm that the CSV file has been uploaded successfully.

8. Check the box next to the catalog.csv file.

9. Click Upload Images.

10. Click Browse.

11. Select the Sample CSV Load/images.zip file on the machine.

12. Click the top-level folder, making sure the folder plus associated text is highlighted.

Note: Images cannot be uploaded unless a folder is chosen before the Upload button is clicked.

13. Click Upload.

14. The WebSphere Commerce Accelerator provides a summary of image files that were extracted from the images.zip file to the target store.

15. Click Catalog Import in the upper-right corner of the window (under the manage store banner).

16. Select the check box next to the catalog.csv file.

17. Click Publish Catalog.

18. To update the publishing status, select the check box next to the catalog.csv file and click Refresh. Eventually the status will change to Published. This signifies that the catalog was loaded to the target store successfully.

19. Select the check box next to the catalog.csv file.

20. The View Logs button is grayed-out because the publish was successful and no error logs are available to view.

Error logs that help identify issues with catalog publishing issues may be found in this directory on the WebSphere Commerce Server machine:

wc_installdir\instances\wc_instance_nam>\temp\catalogimport\store_id // Clear related topics


Redbooks
ibm.com/redbooks


+

Search Tips   |   Advanced Search