
Store configuration samples
You can load configuration properties for a store into your WebSphere 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 filepaths 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.
WC_installdir/components/foundation/samples/DataLoad/StoreConfiguration
WC_installdir\components\foundation\samples\DataLoad\StoreConfiguration
WCDE_installdir\components\foundation\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:
WC_installdir/components/foundation/samples/DataLoad/StoreConfiguration
WC_installdir\components\foundation\samples\DataLoad\StoreConfiguration
WCDE_installdir\components\foundation\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.
- Open a command-line utility and go to the appropriate directory:
WC_installdir/bin
WC_installdir\bin
WCDE_installdir\bin
- Enter the following command to run the sample data load order
file for loading store configuration information:
./dataload.sh ../components/foundation/samples/DataLoad/StoreConfiguration/wc-dataload-store-configuration.xml
dataload.bat ..\components\foundation\samples\DataLoad\StoreConfiguration\wc-dataload-store-configuration.xml
dataload ..\components\foundation\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 WebSphere 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.