How to show stock status in shopping cart in Magento
It is very simple. Please add a <th> Stock Status </th> filed in default\template\checkout\cart.phtml
and go to \default\template\checkout\cart\item\default.phtml
<?php $_product= Mage::getSingleton(‘catalog/product’)->load($_item->getProductId()); ?>
<td class=”a-center”>
<span calss=”stock-cart”> <?php
$qty = $_product->getStockItem()->getQty();
if($qty > 0){
echo “In stock”;
}else{
echo “Out of stock”;
}
?></span>
</td>
Hope so it will work.