I\'m trying to add product_type to my Magento Google Base output based on the product\'s categories, but I seem to be unable to. I have the following code:
// Ge
Rao's solution tries to load all the attributes which means lots of queries and joins but you only need a product_id to load it's categories. So you can do this:
$product = Mage::getModel("catalog/product")->setId($productId);
$categories = $product->getCategoryCollection();
This will not load the product and will give you the categories.