Manipulate collections of products in Magento

Retrieve a collection of products [php] $Products = Mage :: getResourceModel (‘catalog/product_collection’); / * Or * / $Products = Mage :: getModel (‘catalog/product’)->GetCollection(); [/php] Selecting a specific attribute [php] $Products = Mage::getResourceModel(‘catalog/product_collection’) ->AddAttributeToSelect(‘name’) ->AddAttributeToSelect(‘weight’); [/php] Selecting all attributes [php] $Products = Mage::getResourceModel (‘catalog / product_collection’) -> AddAttributeToSelect (‘*’); [/php] Filters ...

Read More