Example: Sample usages of the addStore script for creating custom stores

Consult the examples in this topic for sample usages of the addStore script. The examples include sample gradle.properties file values that can be passed in when creating your custom store.

The following example demonstrates a scenario where your company:
  1. Creates an initial store.
  2. Adds an extended site to support a new geography.
  3. Adds an extended site that uses a different catalog.
  4. Adds an extended site that uses a new storefront asset store.

1 Creates an initial store

Your company, Ycom, performs its initial deployment in United States English. The following assets must be created:
  • A new catalog asset store, YcomCatalogAssetStore.
  • A new storefront asset store, YcomStoreFrontAssetStore.
  • A new extended site store, YcomB2CEsite.
The sample gradle.properties file contains the following values:

crsCreateESiteStore=yes
crsESiteStoreIdentifier=YcomB2CEsite
crsESiteStoreDirName=YcomB2CEsite
crsCreateStoreFrontAssetStore=yes
crsFrontAssetStoreIdentifier=YcomStoreFrontAssetStore
crsFrontAssetStoreDirName=YcomStoreFrontAssetStore
crsCreateCatalogAssetStore=yes
crsCatalogStoreIdentifier=YcomCatalogAssetStore
crsCatalogStoreDirName=YcomCatalogAssetStore
crsStoreLocale=en_US
crsInventoryModel=Non-ATP
crsStoreType=b2c
  • As part of the initial deployment, you must populate bootstrap, and optionally sample data into the database. To populate bootstrap data and sample data, complete the following task: Populating your store's bootstrap data into the database. This task works with the generated data populated after running the gradle script.

2 Adds an extended site to support a new geography

Your company, Ycom, decides to expand to Asia. You create a second extended site store, YcomAsiaEsite, that reuses all stores and assets from the initial deployment.

The sample gradle.properties file contains the following values:

crsCreateESiteStore=yes
crsESiteStoreIdentifier=YcomAsiaEsite
crsESiteStoreDirName=YcomAsiaEsite
crsCreateStoreFrontAssetStore=no
crsFrontAssetStoreIdentifier=YcomStoreFrontAssetStore
crsFrontAssetStoreDirName=YcomStoreFrontAssetStore
crsCreateCatalogAssetStore=no
crsCatalogStoreIdentifier=YcomCatalogAssetStore
crsCatalogStoreDirName=YcomCatalogAssetStore
crsStoreLocale=en_US
crsInventoryModel=Non-ATP
crsStoreType=b2b

Then, populate bootstrap data for the new extended site store: Populating your store's bootstrap data into the database.

3 Adds an extended site that uses a different catalog

Your company, Ycom, acquires a hardware manufacturing company. You create a third extended site store, YComHDEsite, that uses a new catalog asset store, YcomHardwareCatalogAssetStore, but reuses the storefront asset store from the initial deployment.

The sample gradle.properties file contains the following values:

crsCreateESiteStore=yes
crsESiteStoreIdentifier=YComHDEsite
crsESiteStoreDirName=YComHDEsite
crsCreateStoreFrontAssetStore=no
crsFrontAssetStoreIdentifier=YcomStoreFrontAssetStore
crsFrontAssetStoreDirName=YcomStoreFrontAssetStore
crsCreateCatalogAssetStore=yes
crsCatalogStoreIdentifier=YComHardwareCatalogAssetStore
crsCatalogStoreDirName=YComHardwareCatalogAssetStore
crsStoreLocale=en_US
crsInventoryModel=Non-ATP
crsStoreType=b2b

Then, populate bootstrap data for the new extended site store: Populating your store's bootstrap data into the database. Use the Catalogs tool to upload your own catalog data into your new catalog asset store.

4 Adds an extended site that uses a new storefront asset store

Your company, Ycom, decides to market its Men's apparel category differently. You create a fourth extended site store, YComManEsite, that reuses the catalog asset store from the initial deployment, but uses a new storefront asset store, YComMenStoreFrontAssetStore.

The sample gradle.properties file contains the following values:

crsCreateESiteStore=yes
crsESiteStoreIdentifier=YComManEsite
crsESiteStoreDirName=YcomAsiaEsite
crsCreateStoreFrontAssetStore=yes
crsFrontAssetStoreIdentifier=YComMenStoreFrontAssetStore
crsFrontAssetStoreDirName=YComMenStoreFrontAssetStore
crsCreateCatalogAssetStore=no
crsCatalogStoreIdentifier=YComCatalogAssetStore
crsCatalogStoreDirName=YComCatalogAssetStore
crsStoreLocale=en_US
crsInventoryModel=Non-ATP
crsStoreType=b2b

Then, populate bootstrap data for the new extended site store: Populating your store's bootstrap data into the database.