For non-EAV collections use one of the following methods $kitCollection-> getSelect()->order('related_sku DESC'); $kitCollection->setOrder('related_sku', ...
FROM `eav_attribute` AS `main_table` ORDER BY attribute_id DESC. So you were on the right path, just Magento was doing its level best to ...
$collection->addAttributeToSort('price', 'ASC');. On your listing page when you are trying to fetch product collection at that time use above code to ...
... order rather then Magento setOrder method $colection->getSelect()->order(..) Example: ->order(array('line_items_per_product DESC', ...
Method 1: Get All Order Collection with filters. To get all order collection with filters, go to the following path Mageplaza/HelloWorld/Block/Orders.php and create an ...
->getCollection() ->setOrder(' created_time', 'DESC');
However regardless of which piece of code I use (below) the order remains id ASC and not id DESC. I have tried Google and stack overflow ...
Step3: Sorting the collection by "news_id" in Ascending order. Step4: Sorting the collection by "update_time" in Descending order. Step5: Set limit of 5 records ...
I am try to sort my product collection. At first it should be sorted by Ascending Order (1,2,3..) and then by other character like NULL
I show you how to set order of collection for Magento 1 and why there are more