Magento News

 

Magento understanding Product Collection

Can anyone please tell me in layman terms what is meaning of following code below.

$collection = Mage::getResourceModel('catalog/product_collection')
            ->addAttributeToSelect('name')
            ->addAttributeToSelect('sku')
            ->addAttributeToSelect('price')
            ->addAttributeToSelect('status')
            ->addAttributeToSelect('short_description')
            ->addAttributeToSelect('small_image')
            ->setStoreId($this->getStoreId())
            ->addMinimalPrice()
            ->addFinalPrice()
            ->addTaxPercents()
            ->addStoreFilter()
            ->addAttributeToFilter('is_facebook', 1)
            ->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds());
        $collection->load();

Magento understanding Product Collection

Possibly Related Posts:


 

Leave a Reply