Tag Archives: model

Magento Model Collection

Magento data collection inhert from the object public function productAction() { $collection_of_products = Mage::getModel(‘catalog/product’)->getCollection(); var_dump($collection_of_products->getFirstItem()->getData()); }Most Magento Model objects have a method named getCollection which will return a collection that, by default, is initialized to return every Object of that type in the system. The products Collection, as well as many other Magento Collections, also… Read More »