Magento online tutorial, Magento tutorial, Magento Programming. Magento script online, Magento Script, Magento step by step tutorial, Magento tutorial for beginners, Magento tutorial for programmer.
Thursday, July 4, 2013
How to change Default Sort Order Magento
I’ll be clear… Magento is not good as you could imagine. In fact sucks in so many ways.
Today i’m showing you one. There is no backend option to change the Default Sort Order in your product listing (catalog).
Lucky there is an easy solution.
The Toolbar
Look for the file toolbar.php located in:
/app/code/core/Mage/Catalog/Block/Product/List
Create the Local folder
Create the same folder structure in the local. Now the future upgrades will not affect your changes.
Should be like:
/app/code/local/Mage/Catalog/Block/Product/List
Edit the Toolbar
Now you have to change 1 single stupid line.
Look for:
/**
* Default direction
*
* @var string
*/
protected $_direction = 'asc';
And change it for:
/**
* Default direction
*
* @var string
*/
protected $_direction = 'desc';
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment