Magento - show the stock indicator on product list
how 开发者_高级运维can I show the stock indicator on Magento product list ?
Thanks a lot.
To show the quantity of items left in stock use this:
<?php echo (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty(); ?>
精彩评论