You're actually doing it the right way. However, since Magento uses EAV, it needs to apply tricks to help performance. One of these tricks is the ...
For non-EAV collections use one of the following methods $kitCollection-> getSelect()->order('related_sku DESC'); $kitCollection->setOrder('related_sku', ...
Use the addFieldToFilter method $order_collection = Mage::getModel('sales/ order')->getCollection()->addFieldToFilter('status', array('nin' ...
Magento 1.9.x CMS Static Blocks are saved in cms_block table which doesn't have any field called "position". So you cannot sort by "position".
I show you how to set order of collection for Magento 1 and why there are more than one possibilities. You have to find out if your sort attribute ...
1 Answer · I need to display the items in the front end based on the sort order.I am not sure above code will work? – blakcaps Nov 27 '13 at 8:54 · 2. @blakcaps.
Method 1: Get All Order Collection with filters. To get all order collection with filters, go to the ...
Try below code $fromDate = date('Y-m-d H:i:s', strtotime($fromDate)); $toDate = date('Y-m-d H:i:s', strtotime($toDate)); /* Get the collection ...
Hi, I'm trying to set custom sort for product collection on category view and I'm hitting wall. I tried simple observer for event:
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