Domain Bridging Update

In some implementations of the Kilimanjaro, Elbrus, and Vinson releases of SuiteCommerce Advanced (SCA), an error is returned in the Checkout page when the Encrypted Payload Domain Bridging feature is active.

These patch instructions describe how to correct this problem.

To implement this patch, create a custom module to override the Configuration.js JavaScript file, which is part of the SspLibraries module.

If you are unfamiliar with implementing patches for SCA, refer to the following:

Step 1: Create the Override File

Create the Override File for SCA Kilimanjaro and Elbrus

Following the instructions in the Patch Using Override Mode procedure, create a new directory and file: /Modules/extensions/SspLibraries@1.0.0/JavaScript/Configuration.js. In the new Configuration.js file, find and replace the following line of code with the provided code sample.

Find the following code:

              var domain = ModelsInit.session.getSiteSettings(['touchpoints']).touchpoints.home.match(/^http(s?)\:\/\/([^\/?#]+)(?:[\/?#]|$)/i)[2]; 

            

And replace it with the following code:

              var domain = ModelsInit.session.getEffectiveShoppingDomain(); 

            

Create the Override File for SCA Vinson

Following the instructions and in the Patch Using Override Mode procedure, create a new directory and file: /Modules/extensions/SspLibraries@1.0.0/JavaScript/Configuration.js. In the new Configuration.js file, find and replace the following line of code with the provided code sample.

Find the following code:

              var domain = session.getSiteSettings(['touchpoints']).touchpoints.home.match(/^http(s?)\:\/\/([^\/?#]+)(?:[\/?#]|$)/i)[2]; 

            

And replace it with the following code:

              var domain = ModelsInit.session.getEffectiveShoppingDomain() 

            

Step 2: Prepare the Developer Tools For Your Patch

When preparing the Developer Tools for your patch as described in the Patch Using Override Mode procedure, perform the following actions:

  1. Paste the following sample code into the new ns.package.json file that you create in the Modules directory: /Modules/extensions/SspLibraries@1.0.0/ns.package.json

                    { "gulp": { "javascript": [ "JavaScript/*.js" ] }, "overrides": { "suitecommerce/SspLibraries@X.Y.Z/SuiteScript/Configuration.js" : "SuiteScript/Configuration.js" }
    } 
    
                  
    Important:

    You must replace the string, X.Y.Z, with the version of the module in your implementation of SCA.

  2. Open the distro.json file in the root SCA development directory and then add your custom module to the modules object as described in the Patch Using Override Mode procedure. The following sample shows the value to add to the list of existing values that follow the “modules” key.

                    "modules": { "extensions/SspLibraries": "1.0.0", . . . 
    
                  

Step 3: Test and Deploy Your Patch

Follow the instructions provided in the Patch Using Override Mode procedure to test and deploy your patch.

Related Topics

SCA Patches

General Notices