I'm creating a custom Grid in Adminhtml which is to list all of the items sold in the past 30 days.
I have the Grid setup, with basic product data being filled. However, I need data such as current stock level and custom attributes etc.
I'm a little new to Magento collections and not sure how to use joins etc to build up my desired collection.
Can anyone assist?
protected function _prepareCollection() {
$collection = Mage::getResourceModel('sales/order_item_collection')
->addAttributeToSelect('*')
->join('order', 'order_id=entity_id');
$this->setCollection($collection);
return parent::_prepareCollection();
}