获取magento中的产品库存数量
我需要获取该商品的产品库存数量,如何获取 $products = Mage::getModel('catalog/product')->getCollection(); $products->addAttributeToSelect(array('name', 'thumbnail', 'weight' ,'price','description')); foreach ($products as $product) { $p['products'][] = array( 'id' => $product->getId(), 'sku' => $product->getSku(), 'name' => $product->getName(), 'description' => $product->getDescription(), 'weight' => $product->getWeight(), 'created at' => $product->getCreatedAt(), 'pirce' => Mage::helper('core')->currency($product->getPrice(), true, false), //." ".$currencyCode, ); }