Reference Product List Patch for Reference ShopFlow
Before applying this patch, apply the patch for Configuration Changes for Custom Records.
To implement this patch, set the permissions for the product-list.ss
and product-list-item.ss
files and modify the commons.js
file.
Step 1: Set Permissions for product-list.ss File
-
In NetSuite, go to Documents > Files > File Cabinet.
-
In the File Cabinet, go to Web Site Hosting Files > Live Hosting Files > SSP Applications > NetSuite Inc. -X.Y.Z > Custom ShopFlow > services.
Important:Replace the string, X.Y.Z, with the version of ShopFlow you are using.
-
Next to product-list.js, click Edit.
-
Go to the Permission tab and check the Enabled box.
-
From the Execute as Role list, select SC Product List.
-
Check the Run Script Without Login box.
-
Click Save.
Step 2: Set Permissions for product-list-item.ss File
-
In NetSuite, go to Documents > Files > File Cabinet.
-
In the File Cabinet, go to Web Site Hosting Files > Live Hosting Files > SSP Applications > NetSuite Inc. -X.Y.Z > Custom ShopFlow > services.
Important:Replace the string, X.Y.Z, with the version of ShopFlow you are using.
-
Next to product-list-item.js, click Edit.
-
Go to the Permission tab and check the Enabled box.
-
From the Execute as Role list, select SC Product List.
-
Check the Run Script Without Login box.
-
Click Save.
Step 3: Modify the commons.js File
You can edit the file, commons.js
, in the NetSuite File Cabinet. See Editing Files in the File Cabinet.
-
In the
Models.js
file, find and replace the following line of code with the provided code sample.Find the following code:
if (this.loginRequired && !session.isLoggedIn()) { throw unauthorizedError; }
Replace it with the following code:
if (this.loginRequired && !session.isLoggedIn3()) { throw unauthorizedError; }
-
Save and deploy the file.
-
Go to Documents > Files > File Cabinet.
-
In the File Cabinet, go to Web Site Hosting Files > Live Hosting Files > SSP Applications > NetSuite Inc. -ShopFlow X.Y.Z > Custom ShopFlow > ssp_libraries.
Important:Replace the string, X.Y.Z, with the version of ShopFlow you are using.
-
Create a backup of the file,
commons.js
.Note:If
commons.js
does not exist in the ssp_libraries directory, make a copy from Web Site Hosting Files > Live Hosting Files > SSP Applications > Netsuite Inc. -ShopFlow X.Y.Z > Reference ShopFlow > ssp_libraries > commons.js. -
In the
commons.js
file, find and replace the following line of code with the provided code sample.Find the following code:
return session.isLoggedIn();
Replace it with the following code:
return session.isLoggedIn3();
-
Save and deploy the file.
Step 4: Confirm Custom Record ID and Access Type
-
In NetSuite, go to Customization > List, Records & Fields > Record Types.
-
Click the link for the custom record type, Product Lists.
-
On the Custom Record Type page for Product Lists, confirm that ID has the value,
customrecord_ns_pl_productlist
. -
Confirm that Access Type has Use Permission List selected.
If the access type is not correct, select Use Permission List from Access Type.
-
Click Save to save any changes you made.
-
Repeat steps 1 to 5 for the following custom record type:
Product Lists Items – the ID should be
customrecord_ns_pl_productlistitem
and the access type should be Use Permission List.
Step 5: Add Item List Permission to View
-
In NetSuite, go to Setup > Users/Roles > Manage Roles.
-
Next to the SC Product Lists role with the ID,
customrole_sc_product_lists
, click Edit. -
Go to the Permissions tab and the Lists subtab.
-
For the permission, Items, confirm the level is set to View.
If the Items permission level is not View, update the level to View, then click Save.
Related Topics
- Changes in Product Reviews and Product List Permissions Levels
- Reference Product List Patch for SuiteCommerce, SCA 2024.2.10, and Later
- Reference Product List Patch for SCA 2024.2
- Reference Product List Patch for SCA 2019.2 to 2024.1
- Reference Product List Patch for SCA 2018.2 to 2019.1
- Reference Product List Patch for SCA Aconcagua
- Reference Product List Patch for SCA Kilimanjaro
- Reference Product List Patch for SCA Elbrus
- Reference Product List Patch for SCA Vinson
- Reference Product List Patch for SCA Mont Blanc
- Reference Product List Patch for SCA Denali
- Reference Product List Patch for Reference My Account