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

To DO Before Using Magento Extension

Start point is config.xml file, for example /app/code/local/Companyname/Extensionname/etc/config.xml file. Then next step will be analyzing files. There will be 3 aspect of checking it. REWRITES Check model/class/controller. EVENT observes CRON job Rewrites => you should at least take a look into every defined model/class/controller rewrite within your config.xml file. however ...

Read More