Posted By

duzenz on 02/03/12


Tagged

status product magento stock qty


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

WGenie


Magento getting amount(qty) of a product


 / Published in: PHP
 

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

  1. //if you have a product item model you can use that
  2.  
  3. echo $product->getQty();
  4.  
  5. //or you can use that for getting qty
  6. $product_stock_count = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product)->getQty();
  7.  
  8. echo $product_stock_count;

Report this snippet  

You need to login to post a comment.