Blog
Custom resource model for Magento product flat tables
In this article we will try to explain how to create your own resource model for getting data from the product flat tables. First of all you need to know why we should do this. It’s simple. For example, you have a category page with configurable products and you need to get all attribute values on this page.
Comments (5)
Read More
How to get configurable product options and attributes
Getting all options of a specific attribute in Magento is fairly easy:
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'color'); foreach ($attribute->getSource()->getAllOptions(true) as $option) { echo $option['value'] . ' ' . $option['label'] . "\n"; }
Comments (28)
Read More