Configure Sort Fields

After you select the sort fields, you can configure the sort fields for your Commerce web stores using the SuiteCommerce Configuration record. Configuring a Sort Field ensures that the sort field is available to the shoppers in the web store.

To configure the sort fields:

  1. Select the domain to configure at Commerce > Websites > Configuration.

  2. Select the site you want to configure from the Select Website list.

  3. Select the specific domain you want to configure from the Select Domain list.

  4. Click Configure.

  5. On the SuiteCommerce Configuration record page, click the Search tab and then click the Result Sorting subtab.

  6. Define and configure your sort options. For details, see Result Sorting Subtab.

    For example, if you’ve set up a custom field like custitem41 as a sort field, you’ll need to add it to the Desktop, Phone, and Tablet sections before shoppers can use it on those devices.

  7. Click Save.

To configure sort fields for pre-Vinson SuiteCommerce Advanced implementations, add the new sort field to the sortOptions array in the SC.Shopping.Configuration.js configuration file. For guidance on extending your implementation, see Develop Your SCA Customization.

For example, if you’ve set up custitem41 as a sort field, add it to the sortOptions array before it shows up in your web store.

          sortOptions: [
   {id: 'relevance:asc', name: _('Sort by relevance').translate(), isDefault: true}
,   {id: 'onlinecustomerprice:asc', name: _('Sort by price, low to high').translate()}
,   {id: 'onlinecustomerprice:desc', name: _('Sort by price, high to low ').translate()}
,   {id: 'custitem41:desc', name: _('Sort by best seller, low to high ').translate()}
] 

        

For information about handling Matrix Item sorting and combining Sort Fields using the Item Search API, see Sorting Best Practices.

Related Topics

General Notices