Return to Snippet

Revision: 55344
at February 3, 2012 08:52 by duzenz


Initial Code
//if you have a product item model you can use that

echo $product->getQty();

//or you can use that for getting qty
$product_stock_count = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product)->getQty();

echo $product_stock_count;

Initial URL


Initial Description
this snippet of code is getting the qty of product in magento

Initial Title
Magento getting amount(qty) of a product

Initial Tags
magento

Initial Language
PHP