Get product stock quantity by id

Tweet, share & co

tweet fb share g+ share

Tags


Description

Get product stock quantity by id

Code

$id = 52;
$_product = Mage::getModel('catalog/product')->load($id);

$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product);

print_r($stock->getData());

echo $stock->getQty();
echo $stock->getMinQty();
echo $stock->getMinSaleQty();

Comments