So I have this resource model that I pulled from some admin code on the dashboard. It works, but I can't seem to join to it. Doing
->getSelect()->__toString(); shows nothing? So is this not a normal collection? Why does it not work like other collections?
My guess that in order to accomplish what I want to accomplish is that I am going to have to extend the collection model, but I just wanted to see if I can get more of an idea of what is going on here.
$storeId = $this->helper('core')->getStoreId(); $collection = Mage::getResourceModel('sales/report_bestsellers_collection') ->setModel('catalog/product') ->addStoreFilter($storeId); $collection->getSelect()->join( array('category_product' => 'catalog_category_product'), 'main_table.product_id = category_product.product_id', array('category_product.*') )->where('category_product.category_id = ?', '3') ->order('main_table.qty_ordered DESC') ->limit($limit);