Question

I have created a bundle product in Magento 1.4.0.1. All the components of the bundle are in stock but when the bundle is displayed on the front end, it shows as out of stock? How do I get that product to display "in stock"?

In the admin system, there isn't an option to add inventory for the bundle, so I guess the stock level is worked out from the component parts (if at all?) - perhaps using the lowest stock count of a component item as the basis for the stock level of the entire bundle?

I really don't want that to happen (if it is?). I just need the bundle to display as in stock. Can anyone help?

Was it helpful?

Solution

Yup, the stock level for a bundle is calculated from the selections for each of the options that are required within the bundle items. If you want to change that behaviour, you will need to override the isSalable($product) function within the Mage_Bundle_Model_Product_Type class so that it is return true.

You can do that by creating your own module with a Model that extends Mage_Bundle_Model_Product_Type and in the config.xml you will need:

<global>
    <models>
        <modulename>
            <class>Namespace_Modulename_Model</class>
        </modulename>
        <bundle>
            <rewrite>
                <product_type>Namespace_Modulename_Model_Product_Type</product_type>
            </rewrite>
        </bundle>
    </models>
....
</global>

Obviously, the danger is that you will sell more items than you have stock to supply, so that needs to be a business decision...

OTHER TIPS

If you don't care that some of your items are out of stock when selling the bundle, you could also mark those items as not keeping track of inventory. Once again, this allows you to sell below 0 qty, but it should not mark them as out of stock when this is selected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top