Querying cms_block ids: $collection = Mage::getModel( 'cms/block' ) -> getCollection() // can't add addAttributeToSelect ...
I was able to find the answer on my own. This is what I had to do: $model = Mage ::getModel('testimonials/testimonials') ->getCollection() ...
... H:i:s', strtotime($toDate)); /* Get the collection */ $orders = Mage::getModel(' sales/order')->getCollection() ->addAttributeToFilter('created_at', ...
Use the addFieldToFilter method $order_collection = Mage::getModel('sales/ order')->getCollection()->addFieldToFilter('status', array('nin' ...
EAV collections work with attributes, the sorting method is a little different here as well $componentQuantityCollection->addAttributeToSort('sku', 'ASC');.
This is how we did in in Magento 1. Thank you. $orderCollection = Mage:: getModel('sales/order')->getCollection(); $lastyear = date('Y-m-d', ...
To sort using multiple Fields, you can chain calls to the Collection's method addAttributeToSort() $productCollection->getCollection() ...
Ordering Child Categories by id DESC
You could use addAttributeToSort() $collection = Mage::getModel("blogpromo/ blogpromo")->getCollection() ->addFieldToFilter('status', ...
In this post Adam looks at how to load, filter and sort your Magento product