Created from bug 73777
Currently it is not possible to use sort order #manual if the field includeChildren is set to true on the category. This makes it very hard to control the order of products on parent category pages, for example when sorting by popular is not good enough.
Case:
We have a parent category, where we would like to list all products from the child categories. We would also like to highlight some of the products on the parent category. A good solution here would be if we could simply add the products that we want to highlight to the parent category to control the sorting, and leave the remaining products only in their respective child category. This was possible in the MVC accelerator, but does not seem to be possible to achieve using the storefront API.
If one tries to sort by manual and also include products from child categories, you will be faced with an error message saying "Category cant include children when sorting on #manual." I think this behaviour need to be changed to better support different sorting options.
Example query, will return error:
query {
productSearch(
query: {
category: {
categoryId: "<categoryid>"
includeChildren: true
}
}
sortBy: { field: "#manual" }
) {
totalCount
}
}