/ Published in: PHP

Almost all Magento Models have a corresponding Collection object that can be used to fetch multiple instances of a Model
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$collection = Mage::getModel('catalog/product')->getCollection(); $collection->addAttributeToSelect('name'); $collection->addAttributeToSelect('orig_price'); //filter for products who name is equal (eq) to Widget A, or equal (eq) to Widget B )); foreach ($collection as $product) { //var_dump($product); }
URL: http://stackoverflow.com/questions/1332742/magento-retrieve-products-with-a-specific-attribute-value
Comments
