Organizing Source Files for Multi-site in SuiteCommerce
Organize source files effectively for multi-site implementations in SuiteCommerce using themes, extensions, and custom modules.
TL;DR
To implement multi-site with SuiteCommerce, especially with the Aconcagua release or later, it's essential to leverage themes and extensions for efficient source file organization. This allows for streamlined deployment while maintaining a single code base for common functionality across multiple websites.
How to Organize Your Source Files for Multi-site
When working with multiple websites within SuiteCommerce, proper source file organization becomes crucial. The guidelines below help ensure your implementation is both effective and manageable.
Implementing Themes and Extensions
Starting with the Aconcagua release of SuiteCommerce Advanced (SCA) or later, utilizing themes and extensions is recommended. Themes adjust the visual styling of your website, while extensions enhance functionality. Both options can be either packaged SuiteApps or custom solutions created in-house. After installation, themes and extensions need to be activated on each specific domain associated with your website records.
Key Steps:
- Installation and Activation: After installing your desired theme or extension, use the Extension Manager in NetSuite to activate these for each domain.
- No Source Code Organization Needed: If using themes and extensions, you do not need to organize source code manually, simplifying the process.
When Not Using Themes and Extensions
If your implementation of SuiteCommerce Advanced does not incorporate themes and extensions, certain setup tasks are necessary to facilitate multi-site development. In these cases:
- Custom Modules: Define different features for each website using custom modules. Each website can also maintain its unique code base, which may be necessary for specific customizations.
- Shared Code Base: SCA allows the management of multiple websites using a shared core module code. Customizations for individual websites can be integrated seamlessly.
Directory Structure Example
When creating custom modules without using themes or extensions, organizing your code can look like this:
1Modules2 suite_commerce3 <shared modules>4 custom_modules5 Header_Site16 Header_Site2In this structure:
- Customized code resides within the
custom_modulesdirectory. - Shared code lives in
Modules/suite_commerce.
Utilizing Distro Files
Each website within your multi-site arrangement makes use of a dedicated distro.json file to define which modules are included. To maintain proper organization, the distro.json file for each website is stored in a specific subdirectory under the top-level SuiteCommerce Advanced source code directory structure:
1Modules2 suite_commerce3 <shared modules>4 custom_modules5 Header_Site16 Header_Site27Sites8 site19 distro.json10 site211 distro.jsonTo compile and deploy code for a specific website, navigate to the appropriate site directory and execute the necessary gulp tasks. Refer to guides such as Deploy SCA Customizations to NetSuite for detailed instructions.
Key Considerations
- If you are managing multiple websites, consider how the shared code base can reduce redundancy.
- Always activate your themes and extensions for each specific domain once installed.
- Maintain clarity in your directory structure to make development and deployment straightforward.
Who This Affects
- Developers: Those tasked with building and managing different websites under SuiteCommerce.
- Site Administrators: Individuals overseeing the deployment and activation of themes and extensions.
- In-house Developers: Teams creating custom themes and extensions that serve specific consumer needs.
Key Takeaways
- Use themes and extensions for streamlined multi-site management in SuiteCommerce.
- Custom modules allow for tailored features across different websites.
- Maintain a clear and organized directory structure for easy management and deployment.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
Is it necessary to manually organize source code when using themes and extensions in SuiteCommerce?
What should be done if we are implementing SuiteCommerce without themes and extensions?
How are themes and extensions activated for each domain in a multi-site setup?
What is the role of the distro.json file in a multi-site SuiteCommerce setup?
Was this article helpful?
More in Commerce
- Available Items Only Feature in NetSuite 2026.1
Available items only filtering boosts sales efficiency in NetSuite 2026.1 with Intelligent Item Recommendations.
- Commerce Extensions in NetSuite 2026.1
Commerce Extensions in NetSuite 2026.1 enhance performance and user experience in eCommerce.
- Convert Multiple Transaction Line Items into Configured Items in
Enhance transaction processing in NetSuite by converting multiple line items into configured items with improved session handling.
- New SuiteCommerce Features in NetSuite 2026.1
New SuiteCommerce features in NetSuite 2026.1 enhance user experience and improve eCommerce efficiency.
