Creating your custom store in your programming environment
You can create your custom store in your Externalized Customization workspace through the configuration and execution of a Gradle script. You can then use your Externalized Customization workspace to customize that store.
Before you begin
About this task
When you create your custom store by using a Gradle command, all the necessary store files are copied to a new store directory on the Store server from the default sample store pages, based on the specified store type. A new Spring configuration folder is also created for the new store that contains the -ext controller and view configuration files. These files are then updated and customized for your individual store as changes are deployed from the Externalized Customization workspace.
This process can be repeated for each store that you want to customize for your HCL Commerce service.
Procedure
- Open the WCDE_installdir/storepublish/gradle.properties file for editing.
- Update the store publish parameters in the file to override default values during store creation.
-
On your programming environment within the
WCDE_installdir/storepublish directory, run the
following command to create a store.
This command creates all the store's front-end assets in your programming environment workspace and generates all the data to create the store in the database.
gradlew addStore
Note: Gradlew looks for the Java runtime among the system environment variables. If you receive an error similar to "Please set the JAVA_HOME variable in your environment to match the location of your Java installation", run WCDE_installdir/bin/setenv.bat, then rerun thegradlew
command from the same session.
Results
- New storefront assets, such as JSP files and JavaScript, are saved to the WCDE_installdir/workspace/crs-web/WebContent/StoreFrontAssetDirectoryName directory.
- New catalog assets, such as image files, are saved to the WCDE_installdir/workspace/crs-web/WebContent/CatalogAssetStoreDirectoryName directory.
- All required generated data is saved to the WCDE_installdir/storepublish/generateData directory. In the next task, you populate this data into the database by performing a one-time scheduler job. Then, you can leverage SFTP and the scheduler job to periodically populate your store's data.