Hi i am trying to get product collection with category filter and category position sorting but it not working i tried below way

 $collection = $this->_productCollectionFactory->create();
        $collection->addCategoriesFilter(array('eq' => $category->getId()));//

please any one tell me how to sort category positon


1 Answer 1


Try the below:

$collection->getSelect()->order('cat_index_position', 'ASC');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.