In some implementations of SCA, the CSS hides the first
div element, which typically includes the product description on the product details page. As a result, the content in the product description is excluded from the output of the SEO Page Generator, which can affect the SEO ranking for the product.
This patch adds an additional check to validate that the Page Generator generates the content and then unhides the
div. To implement this patch, you must override a view file in the ItemDetails module. You can download the code samples described in this procedure here: CSSHidesFirstDiv.zip.
prototype object. This ensures the chances that your customizations continue to work when migrating to a newer version of SuiteCommerce Advanced. However, this patch requires you to modify a file that you cannot extend, and you must use a custom module to override the existing module file. For more information, see Customize and Extend Core SuiteCommerce Advanced Modules.
Step 1. Override the Item.Details.View.js File
In this step, you override the Item.Details.View.js file, located in the ItemDetails module.
If you have not done so already, create a directory in which to store your custom modules.
For example, Modules/extensions.
Open this directory and create a subdirectory to maintain your customizations.
Give this directory a name similar to the module being customized.
For example, create
In your new
ItemDetailsExtension@1.0.0 directory, create a subdirectory called
Copy the following file into this directory:
Open your new Item.Details.View.js file and make the following change:
if(!overflow && !SC.isPageGenerator())
Save Item.Details.View.js .
Step 2. Prepare the Developer Tools for Your Override
The next step shows how to set up the ns.package.json file for your custom module and modify distro.json to include the cutom module.
Open the Modules/extensions/ItemDetailsExtension@1.0.0 module directory.
Create a file in this directory and name it ns.package.json.
Build the ns.package.json file using the following code (where X.Y.Z indicates the current version of your module in SuiteCommerce) :
Save the ns.package.json file.
Open the distro.json file.
This file is located in the top-level directory of your SuiteCommerce Advanced source code.
In distro.json , add your custom module to the
Your code should look similar to the following example:
"name": "SuiteCommerce Advanced Vinson Release",
This ensures that the Gulp tasks include your module when you deploy. In this example, the custom modules are added at the beginning of the list of modules. However, you can add the modules anywhere in the
modules object. The order of precedence in this list does not matter.
Step 3. Test and Deploy Your Override
Test your source code customizations on a local server (see SCA on a Local Server) or deploy them to your NetSuite account (see Deploy to NetSuite). If you are currently running SCA on a local server, your changes should appear on your local site immediately.
Confirm your results.
Upon successful deployment, all the required
div elements appear in the Product Details Page.