Posted By

duzenz on 02/04/12


Tagged

status product magento stock isInStock


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

WGenie


Magento getting stock status of a product


 / Published in: PHP
 

Magento getting stock status of a product

  1. //$product = a magento product model
  2. $stock = $product->getStockItem();
  3. if ($stock->getIsInStock()) {
  4. echo "product is in stock";
  5. } else {
  6. echo "product is not in stock";
  7. }

Report this snippet  

You need to login to post a comment.