Magento – Mage::getModel(‘catalog/product’)->getCollection() returns only created_at & updated_at attributes

magento-1.8

If I use following, only weight and status are added.

$_products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect("*");

If I could get SKU or entity_id, I can still make another call to get some other attributes, but that is not the option.

Best Answer

The collection loads at least everything in catalog_product_entity, which is:

  • entity_id
  • entity_type_id
  • attribute_set_id
  • type_id
  • sku
  • has_options
  • required_options
  • created_at
  • updated_at

If they are not loaded, something is wrong.

  1. Did you try without the addAttributeToSelect() ?
  2. Are the attributes you expect in the attribute set of the products?
  3. What does the query look like? try with $collection->load(true);