Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $product = Mage::getModel('catalog/product');
- $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
- ->setEntityTypeFilter($product->getResource()->getTypeId())
- ->addFieldToFilter('attribute_code', 'manufacturer');
- $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
- $manufacturers = $attribute->getSource()->getAllOptions(false);
- print_r($manufacturers);
- Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('manufacturer')->addAttributeToFilter('category_id', '3')
Add Comment
Please, Sign In to add comment