I create a Module in Magento, Now i am want to Use the Other model to take collection but thats give me error,
**Error:** There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: 1685082734
And my Collection class is given below..
class Mage_Banners_Model_Mysql4_Category_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
{
public function _construct()
{
parent::_construct();
$this->_init('banners/category');
}
}
So how to run this and how this model resource know about has table..?
If you want to add another model to your custom module, you should enter your table name in
config.xmlfile, which is located in yourmodule/etc folder:After that you should add your collection class in corresponding
model/mysql4/category/Collection.php. You should create model class in model/file name.Suppose
category.phpis the model file, you should initiate that model class by using these methods. These files should be in themodelfolder: