这是我的产品集合,有人能帮我从产品集合中获取库存状态吗?
$collection = Mage::getModel('catalog/category')
->load($categoryId)
->getProductCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('visibility', array(
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG));
return $collection;