This example applies to Vinson implementations of SuiteCommerce Advanced (SCA) and later
The following procedure explains how to use the Configuration Modification method to change existing configurable properties and associated metadata. When you deploy this modification to NetSuite, the SuiteCommerce Configuration record’s user interface will reflect any changes specified.
Important
Before you modify configuration files, you should be aware of these requirements and limitations:
- Never alter or delete the configurationManifest.json file. To make changes to property metadata, customize the individual JSON files only. When you deploy your site using the SCA developer tools, these individual files and customizations concatenate into and update the configurationManifest.json file. For detailed information about how JSON configuration files affect the configurationManifest.json and the SuiteCommerce Configuration record, see Configure Properties.
- Making changes to core source files or changing vital functionality of the application can make migrating to future releases difficult. Before making changes to SCA, see Best Practices for Customizing SCA.
To modify the SuiteCommerce Configuration record’s user interface:
- Create the directory structure for a custom module.In this example, the name of the module being customized is the RecentlyViewedItems module. Following best practices, the example custom directory is named
RecentlyViewedItemsExtension@1.0.0. - Create a Configuration subdirectory in your new module directory.
- Create a new JSON file in the Configuration subdirectory. In this example, the name of the JSON file being customized is
SearchResultsPerPage.json. Following best practices, the custom JSON file is namedSearchResultsPerPageModification.json. - Add modification code to your custom JSON file.See Configuration Modification Schema and Use Case Examples for specific information and examples on how to structure this file.
- Create and edit an ns.package.json file in the root directory of your custom module.Add the following code to this file:
Add the following code to this file:
{
"gulp": {
"configuration": [
"Configuration/*.json"
]
}
}
- Update the distro.json file.
- If implementing 2019.2 and later, this file is in the Advanced directory. Examples: SC_20.1/Advanced/distro.json, SC_19.2_Live/Advanced/distro.json.
- If implementing 2019.1 and earlier, this file is in the root directory of the SCA source code.Add the name of your custom module to the list of modules defined in the
modulesobject.... "modules": { "extensions/RecentlyViewedItemsExtension": "1.0.0", "suitecommerce/Account": "2.2.0", ...Copy
- Deploy your changes to NetSuite and access the SuiteCommerce Configuration record in NetSuite to view your changes.