where do i find app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php? I desperately need to change my default sorting order to Price descending. Also - what are the default sorting options? I have removed Best Value and now only have Price as an option. I would like to search by designer/brand but I am not sure if this is possible?
I have tried to add the code that you suggested to the custom layout field within the individual categories to change the default sorting order from ascending to descending but it doesn’t work for me. It works for about 2 mins and then it reverts back to price ascending. any further ideas or advice on this?
Edit this file: app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php
(sidenote, I always make a backup of files I edit and rename it something like ToolbarBACKUP.php)
Find this code:
public function setDefaultDirection($dir) { if (in_array(strtolower($dir), array('asc', 'desc'))) { $this->_direction = strtolower($dir); } return $this; }
Change ‘asc’ to ‘desc’ and change ‘desc’ to ‘asc’.
Edit this file: app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php
(sidenote, I always make a backup of files I edit and rename it something like ToolbarBACKUP.php)
Find this code:
public function setDefaultDirection($dir) { if (in_array(strtolower($dir), array('asc', 'desc'))) { $this->_direction = strtolower($dir); } return $this; }
Change ‘asc’ to ‘desc’ and change ‘desc’ to ‘asc’.