Finally manage to fix the issue. I'll explain what I did to fix this because it might help someone else as well.
Like I said in my question I did my checklist. But $_product->isSaleable()
was returning false
.
So I had to dig in to the code and found that $_product->isSaleable()
is set in Mage_CatalogInventory_Model_Stock_Status::assignProduct()
.
public function assignProduct(Mage_Catalog_Model_Product $product, $stockId = 1, $stockStatus = null)
{
if (is_null($stockStatus)) {
$websiteId = $product->getStore()->getWebsiteId();
$status = $this->getProductStatus($product->getId(), $websiteId, $stockId);
$stockStatus = isset($status[$product->getId()]) ? $status[$product->getId()] : null;
}
$product->setIsSalable($stockStatus);
return $this;
}
Then I found that $this->getProductStatus();
returned an empty array, and the reason for that is there are no entries in cataloginventory_stock_status
table for my new product.
This table is only get updated when Stock Status index was rebuilt, which was all Green and "Ready" in Magento admin, but it was not really "Ready" :(.
So I ran shell/indexer.php --reindexall
to manually re-build all my indexes, which also updated cataloginventory_stock_status
table.
Finally I could see my products. Yey!!
@Kingshuk Deb - So you are correct, it was indexing, but Magento admin said it was all good, which mislead me from the beginning.