Add Parameters Required for Shopper Access to Suitelet Internal URLs
Beginning October 30, 2024, access to the Suitelet’s internal URL for the Shopper role requires two additional parameters.
Visitors to your website are assigned the Shopper role to maintain their session while browsing. With the Shopper role, users can access the Suitelet URL for Suitelets with the Available Without Login and Select All Roles boxes checked if you have used the internal URL instead of the External URL in your site design. This may be done to maintain the shopper’s session, including for cart items.
If you use the following versions of SuiteCommerce Advanced (SCA), you will need to update the files, CMSadapter.Impl.Categories.v3.js
and Logger.js
.
-
SCA 2018.2
-
SCA 2019.1
-
SCA 2019.2
The files must be updated to include two additional parameters, &compid=<VALUE>
and &ns-at=<VALUE>
, in the URL. This will ensure the Suitelet remains available and maintains the session for users with the Shopper role. The <VALUE> field should match the values of the parameters in the External URL field on the Suitelet’s script deployment record.
These patch instructions describe the steps to add the two parameters.
Be sure to follow the instructions for the version of SCA you have implemented.
-
Suite Commerce Advanced versions 2018.2 and 2019.1 – Update CMSadapter and Logger Files (SCA 2018.2 and 2019.1)
-
Suite Commerce Advanced version 2019.2 – Update CMSadapter and Loggers Files (SCA 2019.2)
Update CMSadapter and Logger Files (SCA 2018.2 and 2019.1)
Update CMSadapter.Impl.Categories.v3.ts File
-
In NetSuite, go to Customization > Scripting > Script Deployments.
-
Search for
customdeploy_ns_sca_environment
in the list of scripts and click View. -
From the External URL field, copy the parameter information for
compid
andns-at
from the URL. -
In your SCA directory, open the following file:
Modules\suitecommerce\CMSadapter\JavaScript\CMSadapter.Impl.Categories.v3.js
-
Search for the following method:
setUpEndPoints
-
At the end of the parameter of the method,
jQuery.getJSON
, add the two parameters you copied in Step 3.For example, find the following code:
(...) '_environment')
And update it to the following:
(...) '_environment&compid=VALUE&ns-at=VALUE')
Note:Replace the string VALUE with the values of the parameters in the External URL field on the Suitelet’s script deployment record.
-
Save the file.
Update Logger.js File
-
In NetSuite, go to Customization > Scripting > Script Deployments.
-
Search for
customdeploy_sca_loggerendpoint
(orcustomscript_cs_loggerendpoint
) in the list of scripts and click View. -
From the External URL field, copy the parameter information for
compid
andns-at
from the URL. -
In your SCA directory, open the following file:
Modules\suitecommerce\Instrumentation\JavaScript\Logger.js
-
Search for the following method:
sendQueues
-
At the end of the value of the variable,
URL
, add the two parameters you copied in Step 3.For example, find the following code:
(...) '_loggerendpoint';
And update it to the following:
(...) '_loggerendpoint&compid=VALUE&ns-at=VALUE
Note:Replace the string VALUE with the values of the parameters in the External URL field on the Suitelet’s script deployment record.
-
Save the file.
Update CMSadapter and Loggers Files (SCA 2019.2)
Update CMSadapter.Impl.Categories.v3.ts File
-
In NetSuite, go to Customization > Scripting > Script Deployments.
-
Search for
customdeploy_ns_sca_environment
in the list of scripts and click View. -
From the External URL field, copy the parameter information for
compid
andns-at
from the URL. -
In your SCA directory, open the following file:
Advanced\CMSadapter\JavaScript\CMSadapter.Impl.Categories.v3.ts
-
Search for the following method:
setUpEndPoints
-
At the end of the parameter of the method,
jQuery.getJSON
, add the two parameters you copied in Step 3.For example, find the following code:
(...) '_environment')
And update it to the following:
(...) '_environment&compid=VALUE&ns-at=VALUE')
Note:Replace the string VALUE with the values of the parameters in the External URL field on the Suitelet’s script deployment record.
-
Save the file.
Update Loggers.Appender.ElasticLogger.ts File
-
In NetSuite, go to Customization > Scripting > Script Deployments.
-
Search for
customdeploy_ns_sca_environment
(orcustomscript_cs_loggerendpoint
) in the list of scripts and click View. -
From the External URL field, copy the parameter information for
compid
andns-at
from the URL. -
In your SCA directory, open the following file:
Commons\Loggers\JavaScript\Loggers.Appender.ElasticLogger.ts
-
Search for the following method:
sendQueues
-
At the end of the value of the variable,
relativeURL
, add the two parameters you copied in Step 3.For example, find the following code:
(...) '_loggerendpoint';
And update it to the following:
(...) '_loggerendpoint&compid=VALUE&ns-at=VALUE
Note:Replace the string VALUE with the values of the parameters in the External URL field on the Suitelet’s script deployment record.
-
Save the file.