By default Magento indicates a bundled product out of stock if none of the associated products are in stock. Is there a way to change that behaviour?
I'm not using any isSaleable() conditionals, so that can't be the cause.
I'm getting the bundle products via product_collection
model like this:
$products = Mage::getResourceModel('catalog/product_collection')
->addAttributeToSelect('*')
->addStoreFilter()
->addIdFilter($child_prods[0], false);
#->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
$products->load();
where $child_prods[0]
is a list of product IDs of bundle products.
I tried changing the isSalable()
method in /app/code/core/Mage/Bundle/Model/Product/Type.php
to return always true, but the change didn't take effect. Any ideas?
isSalable()
method to return true as mentioned above does indeed change the bool to true for all bundle products, but still, the bundle product with all associated products not in stock doesn't pick up in the product collection. Any idea?catalog_category_product_index
AScat_index
ON cat_index.product_id=e.entity_id' Out of Stock products would not be indexed, due to the before mentioned setting being set to no.