Magento: Neue Collection anlegen / create new collection
Um eine neue Collection in Magento anzulegen erstellt ihr eine entsprechende Datei in eurem Modul unter /Model/Mysql4/CollectionName/Collection.php welche die Klasse Mage_Core_Model_Mysql4_Collection_Abstract erweitert, z.b.:
class Namespace_OwnModule_Model_Mysql4_CollectionName_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
{
protected function _construct()
{
// your own code
}
}
Der Aufruf erfolgt dann über:
$collection = Mage::getModel('namespace_ownModule/')->getCollection();
  		 		
			 
 		


