You can call setOrder function multiple times for different columns. $collection = $ this->getCollection() ->setOrder('fieldname', 'asc') ->setOrder('fieldname2');.
Suggestions? $componentQuantityCollection = Mage::getModel('catalog/product' )->getCollection(); $componentQuantityCollection->joinField( ...
Try to use Zend_DB_Select order rather then Magento setOrder method $ colection->getSelect()->order(..) Example:
I solved the problem. i added a class attribute _categoryFactory and used it in constructor public function __construct( ...
$collection->addAttributeToSort('price', 'ASC');. On your listing page when you are trying to fetch product collection at that time use above code to ...
You can also sort a collection in Magento by attributes in ascending, descending or random order. Ascending Order. $collection->setOrder('price', ...
Suppose, i want override setOrder()function. But it does not work. Always calling Core function instead of rewrite class function..
In this tutorial, we are going to share the steps to get product collection with all of the
I print the collection query on list.phtml I can see that sorting order was ...
php file.