How to Add Sorting Methods in NetSuite SCA

Sorting product listings by different attributes can greatly enhance the shopping experience in your SuiteCommerce Advanced (SCA) store. By adding custom sorting methods, you allow customers to filter search results based on fields like price, popularity, or custom attributes. This guide walks you through the steps to configure sorting methods for your SCA website.

Step-by-Step Process to Add Sorting Methods

1. Add Sort Fields in the Search Index The first step is to define which item fields can be used for sorting. NetSuite allows you to select various fields like price, best-sellers, or custom item attributes.

  • Navigate to the Website Configuration:
  • Go to Commerce > Websites > Website List.
  • Click Edit next to your SuiteCommerce Advanced site.
  • Select the Search Index subtab, then click on Sort Fields.
  • Define Sort Fields:
  • Field Name: Choose an item record field (e.g., price, best-seller rating) to sort by.
  • Sort Order: Select either ascending or descending for how the items should be arranged in search results (e.g., low to high price, or high to low).

2. Configure Sort Fields in SuiteCommerce Configuration Once you’ve defined the fields, you must configure them to be visible in your online store.

  • Navigate to the SuiteCommerce Configuration:
  • Go to Commerce > Websites > Configuration.
  • Select your site and domain.
  • Click Configure.
  • Enable Sorting:
  • Under the Search tab, click the Result Sorting subtab.
  • Add the sort fields you configured earlier, making them available in the web store.
  • Click Save to apply the changes.

3. Extend Sort Fields for Custom Implementations (if needed) For some custom implementations, such as pre-Vinson SuiteCommerce Advanced versions, you may need to extend the configuration in your SC.Shopping.Configuration.js file.

  • Modify the SortOptions Array:
  • Add the new sort field to the sortOptions array to ensure it appears as an option on your site.
  • Example for adding a custom field:
sortOptions: [
  {id: 'relevance:asc', name: _('Sort by relevance').translate(), isDefault: true},
  {id: 'onlinecustomerprice:asc', name: _('Sort by price, low to high').translate()},
  {id: 'custitem41:desc', name: _('Sort by best seller, low to high').translate()}
]
  • Ensure your custom fields are added to all relevant devices (desktop, phone, tablet) as needed.

Important Notes

  • Visibility Delay: After configuring your sort fields, they may take some time to become visible on the website. If the sorting method is not visible immediately, don’t worry—it will eventually show up as the system syncs the new configurations.
  • Error Display: If a sorting method appears but shows an error message, this is likely because it takes a little time for items to sync with the new sorting fields. Wait for a short period, and the sorting method should work as expected.

By following these steps, you can successfully add custom sorting methods to your NetSuite SuiteCommerce Advanced site, enhancing the shopping experience for your customers.

Leave a comment

Your email address will not be published. Required fields are marked *