To get the quantity in stock for a particular product in Magento use the following code –
$qtyStock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
To get the quantity in stock for a particular product in Magento use the following code –
$qtyStock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
How to change it, just to show only if quantity is bigger than 0=zero
Or to show some graphics icon when quantity is >0
thanks
loadByProduct($_product)->getQty();
if($qtyStock>0)
— here your code if there is available quantity–
else
echo “”;
?>