Store configuration samples
You can load configuration properties for a store into your HCL Commerce database by using the Data Load utility. This sample demonstrates how to load store configuration name value properties into the STORECONF database table.
About this sample
This sample loads information for configure extension logic for all store pages into the STORECONF store configuration database table. All store page JSP files retrieve a list of configuration entries that are associated with the store ID for store pages from this database table.If your site uses an extended sites store model, you can load information to configure extension logic to all store pages for any or all stores. When files with extension logic are included in store configuration properties, store JSP files dynamically retrieve and include the logic within the files when the store page renders. You can also load file paths as the value for configuration properties with an input file, however this sample does not demonstrate how to load this type of information. For more information about adding extension logic to store pages, see Adding extension logic to all store pages.
- STOREENT_ID
- The store identifier, which identifies the store that is updated to include the configuration properties on store pages. For example, 10001
- NAME
- The name of the configuration property. The value of the name field must be unique for a store in the STORECONF table.
- VALUE
- The value for the configuration entry.
- utilities_root/samples/DataLoad/StoreConfiguration
- WCDE_installdir\samples\DataLoad\StoreConfiguration
Sample input file | Description |
---|---|
CSV
XML
|
The Data Load utility uses this sample input file to load the name and values for configuration properties and associates the configuration with a store ID. The Data Load utility uses the table object mediator and the following business object configuration file to load the data within this input file: Business object mediator com.ibm.commerce.foundation.businessobjectmediator.TableObjectMediator Business
object configuration file
For more information about the table object mediator, see Data Load utility table-based mediator and builder. |
Procedure
- In a file manager, go to the following directory:
- utilities_root/samples/DataLoad/StoreConfiguration
- WCDE_installdir\samples\DataLoad\StoreConfiguration
- Open the wc-dataload-env.xml data load environment configuration file for editing. Update the file to set the environment settings within the file to match your environment setting. For more information about this configuration file, see Configuring the data load environment settings.
- On a command line, go to the WCDE_installdir\bin directory.
- Open a command line in the . 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 run the sample data load order file for loading store
configuration information:
- ./dataload.sh ../samples/DataLoad/StoreConfiguration/wc-dataload-store-configuration.xml
- dataload ..\samples\DataLoad\StoreConfiguration\wc-dataload-store-configuration.xml
For more information about configuring and running the Data Load utility, see Configuring and running the Data Load utility.
Verifying results
Verify that the Commerce Composer tool store configuration information is loaded by reviewing the data load summary report. For more information about the location and contents of this summary report, see Verifying the results of the data load.
select * from STORECONF;
Ensure
that the data within the sample input files exists within the database table for the appropriate
store.Removing the sample data from the HCL Commerce database
To remove the sample data from your database, run the sample again but with the
value for the delete column for all entries within the files set to 1
. By setting
the value for this column to 1
, the Data Load utility deletes the data that is
identified in the CSV file from your database.