If you are implementing the Aconcagua release of SCA or later, best practice is to use themes and extensions to extend your website. Themes and extensions are available for installation as bundled SuiteApps or as custom themes and extensions deployed by in-house developers. After installing or deploying, the associated theme or extension can be activated for any domain associated with a website record. You must perform the activation for each site and domain you intend to use the theme or extension. No source code organization is necessary. See Themes & Extensions for details.
If you are implementing SuiteCommerce Advanced and not using themes and extensions, you must perform some set up tasks to allow multi-site development. You can also create custom modules that define different features for each website. You can also maintain different code bases for each website.
SCA lets you manage multiple websites using the same code base. This means that functionality that is common to each website uses the same core module code. Also, any customizations or extensions you create for a specific website are managed in the same way as other modules.
If you are customizing SCA and not using themes and extensions, see Customize and Extend Core SuiteCommerce Advanced Modules for information on creating custom modules.
For example if you were customizing the Header module for two different websites, you might have a directory structure as follows:
In this example, the customized code is contained within the
custom_modules directory. All source code shared among websites resides in the
To determine which modules are included in a website, each website uses its own distro.json file. See The distro.json and ns.package.json Files for information about the distro.json file. The json.distro for a specific website is stored in a website-specific subdirectory within the Sites directory. The Sites directory is contained in the top-level directory of the SuiteCommerce Advanced source code. Thus, when managing multiple sites, you may have a directory structure containing directories similar to the following:
You can compile and deploy the code for a specific website by running the gulp tasks from the site-specific subdirectory. For example, to compile and deploy Site 1, you would navigate to the
site1 directory and run the required gulp tasks. See Deploy to NetSuite and SCA on a Local Server for more information.