4

I'm having an issue with bundles and configurables that cropped up in the last two months in Magento 1.7.0.2. It seems like it happened around the time I installed an extension, but it has since been removed. The problem still persists. These same items worked perfectly before this.

Bundle and configurable products are showing out of stock on the front end at a random time after re-indexing. They have in stock selected, and they're enabled with associated products that are in stock, so they should show as "In Stock" on the front end. Turning off inventory management for this store isn't an option for us.

Doing some digging, it seems to be only isSalable() that's returning false. Since this function is derived, I'm unsure why this is the case with bundles and configurables. Those two product types should be using their own isSalable functions but it feels like it's returning isSalable for simple products. I got this info from where does is_salable come from?

In my debugging, Magento seems to only be calling Mage_Catalog_Model_Product_Type_Abstract::isSalable() for all 3 product types.

Here's a script that returns some testing with a few product ids, all different types. All of these should be in stock and able to be sold. I'm calling getIsInStock() for the first line and isSaleable() for the second line.

Bundle Product
getIsInStock: 300 is in stock
isSaleable: 300 is not saleable

Simple Product
getIsInStock: 331 is in stock
isSaleable: 331 is saleable

Configurable Product
getIsInStock: 127 is in stock
isSaleable: 127 is not saleable

If I re-index Magento the bundles and configurables will show in stock for a short time.

1 Answer 1

1

Have had the same problem in 1.6, in our situation the configurable products went out of stock every time there was a sale for that product. We created a work-around where we reindexed the stock_status every hour. Now that we have updated our installation to 1.9 we no longer need to run the indexer and the problem has gone away.

3
  • The odd thing is that this just started happening. I have Magento now sending me emails on some events so I can debug where it happens, and it looks like it's happening when someone purchases anything from our store, not just the bundles or configurables.
    – Fight me
    Commented Feb 13, 2015 at 18:59
  • I'm going to look into upgrading to 1.9 soon once I'm on a more compatible theme. I did not too long ago but there were issues with my upgrade path.
    – Fight me
    Commented Feb 13, 2015 at 19:00
  • Make a staging copy of you site and use default theme. Update magento at staging and test, test, test. Then figure out your production strategy.
    – ladle3000
    Commented Feb 14, 2015 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.