1

I have a configurable product with one simple product associated in our Magento EE 1.12 application. When I look at the product page, all is well. If I refresh the product page, the entire configurable product is listed as out of stock. It stays like this until I reindex the Stock Status.

Looking in the database, after reindexing the stock status, the line associated with the product looks like this:

+------------+------------+----------+--------+--------------+
| product_id | website_id | stock_id | qty    | stock_status |
+------------+------------+----------+--------+--------------+
|       1013 |          1 |        1 | 0.0000 |            1 |
+------------+------------+----------+--------+--------------+

After loading the product page, the same row looks like:

+------------+------------+----------+--------+--------------+
| product_id | website_id | stock_id | qty    | stock_status |
+------------+------------+----------+--------+--------------+
|       1013 |          1 |        1 | 0.0000 |            0 |
+------------+------------+----------+--------+--------------+

which I would assume would trigger the out of stock message on the product page on refresh. I've dug through a lot of code but have been unable to figure out why loading the product page would trigger a stock decrement of the configurable product. The stock status of the associated simple product has qty of 1000 and stock_status of 1.

Looking at the mysql general log, this line appears 2x on the product page load:

UPDATE `cataloginventory_stock_status` SET `qty` = '0.0000', `stock_status` = '0' WHERE (product_id=1013) AND (website_id=1) AND (stock_id=1)

Will look for how this update is being called -

Any help appreciated

dbcn
  • 641
  • 1
  • 9
  • 20
  • Start by disabling local modules. – Steve Robbins Oct 17 '13 at 23:56
  • Thanks Steve - I did trace it to one of our local modules, but it was tied to an observer event, so disabling the module through the admin did not change the behavior. Working on a fix, but it should be noted for anyone looking at this bug that turning off a module through the admin > System Config > Advanced only turns off the modules output, and any observers in the modules config will still be fired on that dispatched event. To totally disable the module, you need to change the active setting in the module config file to 'false' (app/etc/modules/MyCustom_Module.xml) – dbcn Oct 19 '13 at 19:42
  • There's also a `disable_local_modules` node in `app/etc/local.xml` – Steve Robbins Oct 20 '13 at 01:07

0 Answers0