Tuesday, 26 May 2015

Magento : How to change default sort direction

To change default sort order direction (ASC to DESC) for product listing in Magento change following file code.

Go : app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php

Now Open the Toolbar.php file and find out the following line (Line no. 119):

protected $_direction = ‘asc’; 
Now Change above code by the following code:
protected $_direction = ‘desc’;

No comments:

Post a Comment