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 WCDE_installdir/storepublish/generateData/<storeName>Data folder is created for the store where <storeName> is the name of the store.

Sample data for reference stores

If you have set crsGenerateSampleData=yes in gradle.properties to generate the data for the Reference React Store, then the sample data for the reference store is published in theWCDE_installdir/storepublish/generateData folder.

The following files and directories are created inside the WCDE_installdir/storepublish/generateData folder:
  • The sample data is saved to the <crsESiteStoreDirName>Data folder.

    For example, if you set crsESiteStoreDirName=HCL in the gradle.properties file, the sample data is saved to the HCLData folder. You can populate this data into the database by running a one-time scheduler job. After that you can use FTP and the scheduler job to periodically update the store data.

  • The Catalog asset store sample data is saved to the <crsCatalogStoreDirName> folder which is present inside the <crsESiteStoreDirName>Data/Sample/ folder.

    For example if you set crsESiteStoreDirName=HCL and crsCatalogStoreDirName=HCLCAS in the gradle.properties file, the Catalog asset sample data is saved in the HCLData/Sample/HCLCAS folder.

  • The StoreFront asset store sample data is saved to the <crsFrontAssetStoreDirName> folder which is present inside the <crsESiteStoreDirName>Data/Sample/ folder.

    For example, if you set crsESiteStoreDirName=HCL and crsFrontAssetStoreDirName=HCLSAS in the gradle.properties file, the StoreFront asset sample data is saved in the HCLData/Sample/HCLSAS folder.