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
- Navigate to Commerce > Websites > Website List > Edit the site
- Go to Search Index > Sort Fields
- Add the Online Price field (Field ID: pricelevel5)