(Enterprise)Sample: Loading data to an extended sites store and catalog asset store
This sample demonstrates how to load data to our 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 identifiers:
- Extended Sites Catalog Asset Store
- Sample B2B Store
Edit the environment configuration file for this sample to specify the identifier for our store.
Procedure
- Open the wc-dataload-env-asset-store.xml configuration file in the appropriate directory:
- (Linux) utilities_root/samples/DataLoad/Catalog/ESite
(Developer) WCDE_installdir\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.
(Developer) On a command line, go to the WCDE_installdir\bin directory.
- (Linux) Open a command line in the Utility server Docker container. Change the directory to utilities_root/bin directory.
For information about entering and leaving containers, see Running utilities from the Utility server Docker container.- Enter the following command to load categories to the catalog asset store:
- (Linux) ./dataload.sh ../samples/DataLoad/Catalog/ESite/wc-dataload-asset-store.xml
- Open the CatalogEntries.csv source file 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:
- (Linux) ./dataload.sh ../samples/DataLoad/Catalog/ESite/wc-dataload-esite.xml
Verifying results
Verify that the data is loaded to the catalog asset store and extended sites store by running the following SQL statements:
- To return the category that is 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.