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