I'm trying to sort the products in search result by "Position". Obviously this works in product listing but i found out that it is commented in Block Result.php:

 * Set search available list orders
 * @return Mage_CatalogSearch_Block_Result
public function setListOrders()
    $category = Mage::getSingleton('catalog/layer')
    /* @var $category Mage_Catalog_Model_Category */
    $availableOrders = $category->getAvailableSortByOptions();
    $availableOrders = array_merge(array(
        'relevance' => $this->__('Relevance')
    ), $availableOrders);


    return $this;

I removed the unset($availableOrders['position']); but Magento throws an SQL error.

Does anyone know how can I achieve this?

Thanks a lot!

1 Answer 1


category product Collection is coming over on a category and Position is an variance of current category .and catalogsearch is coming on all product here category is not set.that way it is not possible

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.