Collectibles Magento

Can someone please tell me in unprofessional terms what the following code below means.

$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(); 
+4
source share
1 answer

This displays all products in the catalog for the current store for which the 'is facewhatever' attribute is set to one. The resulting fields are explanatory, presumably those that are necessary for your appearance in any store.

This information is extracted as a collection of objects, which, I believe, the rest of your iteration code is sent to Facewhatever.

+3
source

All Articles