Magento: Unable to select custom attribute on product collection

Problem: I had added a new product attribute. Suppose the attribute code is ‘test’. I have been trying to fetch/select that newly added product attribute. Here is my Magento collection code:- $collection = Mage::getModel('catalog/product') ->getCollection() ->addAttributeToSelect('test') ->addAttributeToFilter('url_key', 'SOME_URL_KEY') ->getFirstItem(); I don’t see the attribute ‘test’ when I print the collection data. echo "<pre>"; print_r($collection->getData()); echo … Read more

Magento: Describing Flat Catalog

Difference between EAV and Flat Catalog In EAV database model, data are stored in different smaller tables rather than storing in a single table. Like, product name is stored in catalog_product_entity_varchar table product id is stored in catalog_product_entity_int table product price is stored in catalog_product_entity_decimal table EAV database model is used by Magento for easy … Read more