Configure Views

This topic applies to

Applies to

SuiteCommerce Web Stores

By default, the number of correlated and related items displayed is only limited by the number of correlated and related items set up in NetSuite. The view displays these items within one row. You can change the number of correlated or related items displayed and how they are displayed by customizing the associated view files.

To specify the number of correlated or related items to display:

  1. Create a custom module that includes the following objects as dependencies, depending on the views you are customizing.

    • ItemRelations.Correlated.View – to set the behavior of Correlated Items displayed.

    • ItemRelations.Related.View – to set the behavior of Related Items displayed.

    Note

    Do not edit the original ItemRelations.Correlated.View.js or ItemRelations.Related.View.js source files directly. See Customize and Extend Core SuiteCommerce Advanced Modules for information and best practices on customizing JavaScript.


  2. Customize either ItemRelations.Correlated.View or ItemRelations.Related.View, depending on the manner of your customization:

    • To edit the number of items displayed per row, customize the appropriate view and extend the viewsPerRow property of the initialize method. Replace Infinity with a number equal to the number of items you want to display.

    • To add rows displaying correlated or related items, customize the appropriate view to add the rowsCount property to the initialize method. Specify a number for the value equal to the number of rows you want to display. Without specifying a rowsCount, the default is one row.