I have changed the default sort by to reference one of our attributes so the best sellers get listed first, It works perfectly via this code

public function setListOrders()
    $category = Mage::getSingleton('catalog/layer')
    /* @var $category Mage_Catalog_Model_Category */
    $availableOrders = $category->getAvailableSortByOptions();
    $availableOrders = array_merge(array(
        'best_sellers' => $this->__('Best Seller'),
        'relevance' => $this->__('Relevance')
    ), $availableOrders);


    return $this;

As you can see i have set the direction to descending, However when ever i change the sort by attribute (ie name, relevance or price) it changes the order to ascending, how can i change it so it always stays on descending unless the customer changes it?


1 Answer 1


You need to override Mage_Catalog_Block_Product_List_Toolbar and change variable $_direction value to desc

  • I have already done that but it still changes when i change what i sort it by
    – Adam Allen
    Dec 11, 2014 at 13:24

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.