Using 1.9.3.1
I've set my store to allow back orders. When a product is set to "Out of Stock" the "add to basket" button is removed and configurable products can't be configured even if the associated products are available.
So I've set the product to "In Stock" and 0 quantity. The product page says "In Stock" and the customer only discovers that it will be back ordered when they get to the basket and see the message.
Can I find the code that triggers the message in the basket and use that on the product page to display a new attribute "Lead Time" in place of "In Stock"?
In basket, you're probably seeing message from class Mage_CatalogInventory_Model_Stock_Item:
app/code/core/Mage/CatalogInventory/Model/Stock/Item.php, about lines 641 and 645 (slightly varies between Magento versions).
if ($this->getBackorders() == Mage_CatalogInventory_Model_Stock::BACKORDERS_YES_NOTIFY) { if (!$this->getIsChildItem()) { $result->setMessage( Mage::helper('cataloginventory')->__('This product is not available in the requested quantity. %s of the items will be backordered.', ($backorderQty * 1)) ); } else { $result->setMessage( Mage::helper('cataloginventory')->__('"%s" is not available in the requested quantity. %s of the items will be backordered.', $this->getProductName(), ($backorderQty * 1)) ); } } elseif (Mage::app()->getStore()->isAdmin()) { $result->setMessage( Mage::helper('cataloginventory')->__('The requested quantity for "%s" is not available.', $this->getProductName()) ); }
Regarding product page, it's kept on:
app/design/frontend/base/default/template/catalog/product/view/type/default.phtml
app/design/frontend/rwd/default/template/catalog/product/view/type/default.phtml
For grouped product type:
app/design/frontend/base/default/template/catalog/product/view/type/grouped.phtml
app/design/frontend/rwd/default/template/catalog/product/view/type/grouped.phtml
For bundle product type:
app/design/frontend/rwd/default/template/bundle/catalog/product/view/type/bundle/availability.phtml
You can easily find "In stock" strings in those files.