Samples > Data load utility samples


Sample: Loading classic attributes, attribute values, and allowed values

This sample demonstrates how to load classic attributes together with the associated allowed values and attribute values in a single load operation. If you are using classic attributes, use this sample. If you are using the attribute dictionary, use the sample Load attribute dictionary data.


About this sample

Part numbers, attributes, and attribute values loaded in this sample.
Attribute Identifier Attribute type Attribute Value 1 Attribute Value 2
CordsColor Define attribute Black Brown
CordsSize Define attribute 29W x 28L  
DressPantColor Define attribute Black Blue
DressPantSize Define attribute 29W x 32L  
DressShirtColor Define attribute White  
DressShirtSize Define attribute 15 16
CasualShirtColor Define attribute White Blue
CasualShirtSize Define attribute Small Medium
BodysuitColor Define attribute Black  
BodysuitSize Define attribute Petit  


Procedure

  1. Open the command-line interface and navigate to the appropriate directory:

  2. Load the products and SKUS:

    For non-ATP store:

    • ./dataload.sh ../samples/DataLoad/Catalog/wc-dataload-catalog-entry.xml

    • dataload ..\samples\DataLoad\Catalog\wc-dataload-catalog-entry.xml

    For ATP store:

    • ./dataload.sh ../samples/DataLoad/Catalog/wc-dataload-ATP-catalog-entry.xml

    • dataload ..\samples\DataLoad\Catalog\wc-dataload-ATP-catalog-entry.xml

  3. Load attributes, allowed values, and specific values for the SKUs:

    • ./dataload.sh ../samples/DataLoad/Catalog/CatalogEntryAttribute/wc-dataload.xml

    • dataload ..\samples\DataLoad\Catalog\CatalogEntryAttribute\wc-dataload.xml


Verify results

The wc-dataload.xml configuration file loads attribute data from the CatalogEntryDefiningAttributeAndAllowedValue.csv source file. The file is used to create the attributes and the range of allowed values for the products. The wc-dataload.xml file then calls the wc-loader-catalog-entry-defining-attribute-value.xml configuration file to load the specific attribute values to each SKU from the CatalogEntryDefiningAttributeValue.csv source file.

Verify that the data is loaded by running the following SQL statements:

You can also verify the load by viewing the attribute data in the Management Center or in the storefront.


Clean up the data

To remove the data loaded in this sample from the database, run the CleanUp.sql file in the /samples/DataLoad/Catalog/CatalogEntryAttribute directory.


Previous topic: Sample: Loading bundles and kits


Next topic: Sample: Changing the parent of a subcategory


Related concepts

Attributes

Related reference

Data load utility samples


+

Search Tips   |   Advanced Search