This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyCompany_Catalog_Block_Product_List extends Mage_Catalog_Block_Product_List{ | |
/*override this function*/ | |
protected function _getProductCollection(){ | |
/*Add below line to add existing line of code to display stock in descending order*/ | |
$this->_productCollection = $layer->getProductCollection()->addAttributeToSort('created_at','DESC'); | |
} | |
?> |