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?
Best Answer
Changing core methods might not be the best way to go about. I would suggest accepting backorders on the simple products making up the bundled product or turning off stock all together. Both settings can be found under
System > Configuration > Catalog > Stock > Settings product stock
This way your bundled product will always be 'in stock' without having to change the core.