Resolve error “Reference Shopflow > Internal Error: Cannot sort by field NLSortOption[field=pricelevel5, direction-desc]”

An out-of-the-box install of Reference Shopflow has the Sort By dropdown available in the facet page. By default, it already has the following selections available:

  • Relevance
  • Price, Low to High
  • Price, High to Low

The two options for sorting price does not work initially and will result in the following errors when selected:

Internal Error: “Cannot sort by field NLSortOption[field=pricelevel5, direction-desc]”

or

Internal Error: “Cannot sort by field NLSortOption[field=pricelevel5, direction-asc]”

Solution
  1. Navigate to Commerce > Websites > Website List > Edit the site
  2. Go to Search Index > Sort Fields
  3. Add the Online Price field (Field ID: pricelevel5)

Leave a comment

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