Samples > Data load utility samples
Sample: Loading data to an extended sites store and catalog asset store
This sample demonstrates how to load data to the 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)
To run this sample, be using the extended sites business model. 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
- Open the wc-dataload-env-asset-store.xml configuration file in the appropriate directory:
- WC_INSTALL/samples/DataLoad/Catalog/ESite
- WC_INSTALL\samples\DataLoad\Catalog\ESite
- Update the file with the database settings, catalog asset store identifier, and catalog identifier
- Open the wc-dataload-env-esite.xml configuration file in the same directory, and update it with the database settings, extended sites store identifier, and catalog identifier.
- Open the command-line interface, and navigate to the appropriate directory:
- WC_INSTALL/bin
- WC_INSTALL\bin
- Enter the following command to load categories to the catalog asset store:
- ./dataload.sh ../samples/DataLoad/Catalog/ESite/wc-dataload-asset-store.xml
- dataload ..\samples\DataLoad\Catalog\ESite\wc-dataload-asset-store.xml
- 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 the catalog asset store.
- 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:
- ./dataload.sh ../samples/DataLoad/Catalog/ESite/wc-dataload-esite.xml
- dataload ..\samples\DataLoad\Catalog\ESite\wc-dataload-esite.xml
Verify 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>') )
Clean 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.
Previous topic: Sample: Loading sales catalogs
Next topic: Sample: Loading list prices in multiple currencies
Related tasks
Related reference