/ Published in: PHP
Magento getting stock status of a product
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//$product = a magento product model $stock = $product->getStockItem(); if ($stock->getIsInStock()) { echo "product is in stock"; } else { echo "product is not in stock"; }