I want to show Stock Availability on cart page in magento for a configurable products. The stock status is fine on Product Detail page, however on cart page it always shows "out of stock" for configurable product. I can understand what the reason is, the inventory of the configurable product itself is set to 0. However on a product detail page it does show "In Stock" because the child products are "In Stock". But if I want to check the availability on Cart page, it always shows "Out of Stock". Below is the code how I want to achieve the Stock Availability on a Cart page.
<?php
$thisProduct = Mage::getModel('catalog/product')->load($_item->getId());
if($thisProduct->isAvailable()):
echo $this->__('In stock');
else:
echo $this->__('Out of stock');
endif;
?>
You can try with: isSaleable() method instead.
Let me know if that works for you.
Thanks