WebSphere Commerce Enterprise

Sample: Loading data to an extended sites store and catalog asset store

This sample demonstrates how to load data to your extended sites store and catalog asset store when using the extended sites business model.

About this sample

The data load mediator in this sample loads categories into the catalog asset store. The mediator then loads the relationship data so that the extended sites store inherits the categories from the catalog asset store. The mediator then loads catalog entries to the extended sites store, with the inherited categories as the parent.
This sample uses the following store archives:
  • ExtendedSitesCatalogAssetStore.sar (Extended Sites Catalog Asset Store)
  • B2BDirectStorefrontAssetStore.sar (Sample B2B Store)
Note: Both the extended sites store (B2BDirectStorefrontAssetStore.sar) and the catalog asset store (ExtendedSitesCatalogAssetStore.sar) must be published. Only the list price data is loaded. See Sample: Loading initial data for how the offer price data is loaded.

Procedure

  1. Open the wc-dataload-env-asset-store.xml configuration file in the appropriate directory:
    • SolarisLinuxAIXWC_installdir/samples/DataLoad/Catalog/ESite
    • WindowsWC_installdir\samples\DataLoad\Catalog\ESite
  2. Update the file with your database settings, catalog asset store identifier, and catalog identifier
  3. Open the wc-dataload-env-esite.xml configuration file in the same directory, and update it with your database settings, extended sites store identifier, and catalog identifier.
  4. Open the command-line interface, and navigate to the appropriate directory:
    • SolarisLinuxAIXWC_installdir/bin
    • WindowsWC_installdir\bin
  5. Enter the following command to load categories to the catalog asset store:
    • SolarisLinuxAIX./dataload.sh ../samples/DataLoad/Catalog/ESite/wc-dataload-asset-store.xml
    • Windowsdataload ..\samples\DataLoad\Catalog\ESite\wc-dataload-asset-store.xml
  6. Open the CatalogEntries.csv source file located in the same directory, and modify each of the values in the ParentStoreIdentifier column to match the identifier of your catalog asset store.
  7. Enter the following command to load products and SKUs to the extended sites store, and to create a parent category in the catalog asset store:
    • SolarisLinuxAIX./dataload.sh ../samples/DataLoad/Catalog/ESite/wc-dataload-esite.xml
    • Windowsdataload ..\samples\DataLoad\Catalog\ESite\wc-dataload-esite.xml

Verifying results

Verify that the data has been loaded to the catalog asset store and extended sites store by running the following SQL statements:

  • To return the category created in the catalog asset store, enter:
    select * from catgroup where identifier in ('Mens Fashions','Womens Fashions','Pants','Shirts','Activewear','Accessory') 
    and MEMBER_ID in (Select MEMBER_ID from storeent where identifier = '<Catalog_Asset_Store_Identifier>')
  • To return the part numbers, catalog entry identifiers, and parent category identifiers of the products and SKUs loaded to the extended sites store, enter:
    select partnumber, catentry.catentry_id, catgroup_id  from  catentry, catgpenrel where  partnumber like '%Cords%' 
    and catentry.catentry_id=catgpenrel.catentry_id and member_id in (Select member_id from storeent where identifier 
    = '<Catalog_ESite_Store_Identifier>') 
  • To return the list prices of the products and SKUs loaded to the extended sites store, enter:
    select *  from listprice where catentry_id in (select catentry_id from catentry where partnumber like '%Cords%' 
    and member_id in (Select member_id from storeent where identifier = '<Catalog_ESite_Store_Identifier>') )

Cleaning up the data

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