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.

Note: You can create custom stores only in your programming environment. After you have created, customized, and tested your custom store, you can deploy it to your authoring or live environment. For more information, see the Deployment documentation.

Before you begin

For more information about store publish parameters, see:

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

  1. Open the WCDE_installdir/storepublish/gradle.properties file for editing.
  2. Update the store publish parameters in the file to override default values during store creation.
  3. 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 the gradlew command from the same session.

Results

The following files and directory structure are created after you run the command:
  • 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.