Re-order sort orders in toolbar

What is the best way to re-order the available sort orders shown in the product list toolbar? Currently, we have 3 sorting options available: Name, Price, Most Popular (in that order). I want to have Most Popular be the left-most item since it is our default sort option. I can write a custom module to extend “getAvailableSortOrders” or something like that, but I thought there had to be an easier way. Anyone have a recommendation?

Brian

2 thoughts on “Re-order sort orders in toolbar”

  1. The best way I’ve found so far is to make a copy of

    /app/code/core/Mage/Catalog/Model/Config.php

    at

    /app/code/local/Mage/Catalog/Model/Config.php

    and then edit your local copy of the file at line 341

    //before    
    $options = array(
        'position' => Mage::helper('catalog')->__('Position')
    );
    
    //after
    $options = array(
        'name'     => Mage::helper('catalog')->__('Name'),
        'price'    => Mage::helper('catalog')->__('Price'),
        'position' => Mage::helper('catalog')->__('Best Value')
    );
    

    I wanted name to be first, followed by price, and I wanted position to be renamed “Best Value” on the frontend. Since position wouldn’t really mean anything to a customer.

    I was inspired by this comment on Inchoo.

  2. @jon.niesen: your solution worked only partially. I had no problems renaming ‘position’ but when it comes to renaming ‘name’, Magento was very stubborn on this and was still displaying “Name” in the select drop down box.

    Maybe in 1.4.1.1 “Name” is hardcoded or something?

Leave a Reply

Your email address will not be published. Required fields are marked *