Monday, October 17, 2011

How to get products available stock quantity in magento?

Here is the code to get produts stock quantity. Place this code in your view.phtml file.
echo $qtyStock = (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();

No comments:

Post a Comment