Modify JSON Configuration Files

This example applies to Vinson implementations of SuiteCommerce Advanced (SCA) and later. For details about configuring SCA for Vinson and earlier releases, see Extend JavaScript Configuration Files.

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. Configuration Modification requires knowledge of JSONPath query schema, see https://github.com/s3u/JSONPath for more information.

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:

  1. 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.

  2. Create a Configuration subdirectory in your new module directory.

  3. 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 named SearchResultsPerPageModification.json.

  4. 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.

  5. Create and edit an ns.package.json file in the root directory of your custom module.

    Add the following code to this file:

                    {
        "gulp": {
            "configuration": [
                "Configuration/*.json"
            ]
        }
    } 
    
                  
  6. 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 modules object.

                    ...
    "modules": {
           "extensions/RecentlyViewedItemsExtension": "1.0.0",
           "suitecommerce/Account": "2.2.0",
    ... 
    
                  
  7. Deploy your changes to NetSuite and access the SuiteCommerce Configuration record in NetSuite to view your changes. See Deploy SCA Customizations to NetSuite for details.

    Note:

    You must deploy your customizations to NetSuite using the SCA developer tools to apply modifications to the SuiteCommerce Configuration record. You can confirm changes to the configurationManifest.json code on a local server, but modifications will not take effect until you deploy to NetSuite.

Related Topics

Example SCA Customizations
Create a Custom Module
Extend Frontend Configuration Files
Configure Facet Fields
Extend the Backend Configuration File
Add a Child View to a Composite View
Override a Template File
Extend a Sass File
Add a Sticky Button
Customizing the Loading Icon
Adding a Custom Web Font
Extending Font Awesome
Displaying Device-Specific Carousel Images

General Notices