开发者

Magento stock getting overwritten to 0 on some products

开发者 https://www.devze.com 2023-04-09 03:24 出处:网络
I\'m seeing an issue in our Magento 1.5.0.1 store where the stock is getting overwritten to 0 on some products.This seems to be happening automatically and I can\'t figure out why.I recently installed

I'm seeing an issue in our Magento 1.5.0.1 store where the stock is getting overwritten to 0 on some products. This seems to be happening automatically and I can't figure out why. I recently installed Lightspeed and SpeedBooster from Tinybrick, which may have something to do with it, but I have since disabled them and still no luck. I'm really at a loss here, so any thoughts, ideas, or debugging tips would be greatly appreciated.

Thanks!

Backtrace Data

2011-09-29T18:10:05+00:00 DEBUG (7): before save, QTY is 0 for 615906-2PK...printing backtrace
2011-09-29T18:10:05+00:00 DEBUG (7): [21] VPS_Stock_Model_Observer::catalog_product_save_before LINE 1265 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Core/Model/App.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [20] Mage_Core_Model_App::_callObserverMethod LINE 1246 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Core/Model/App.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [19] Mage_Core_Model_App::dispatchEvent LINE 416 (/chroot/home/valuepet/valuepetsupplies.com/html/app/Mage.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [18] Mage::dispatchEvent LINE 391 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Core/Model/Abstract.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [17] Mage_Core_Model_Abstract::_beforeSave LINE 306 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Catalog/Model/Abstract.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [16] Mage_Catalog_Model_Abstract::_beforeSave LINE 474 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Catalog/Model/Product.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [15] Mage_Catalog_Model_Product::_beforeSave LINE 316 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Core/Model/Abstract.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [14] Mage_Core_Model_Abstract::save LINE 114 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [13] Mage_CatalogInventory_Model_Stock_Item_Api::update LINE  ()
2011-09-29T18:10:05+00:00 DEBUG (7): [12] ::call_user_func_array LINE 404 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [11] Mage_Api_Model_Server_Handler_Abstract::multiCall LINE  ()
2011-09-29T18:10:05+00:00 DEBUG (7): [10] SoapServer::handle LINE 832 (/chroot/home/valuepet/valuepetsupplies.com/html/lib/Zend/Soap/Server.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [9] Zend_Soap_Server::handle LINE 145 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [8] Mage_Api_Model_Server_Adapter_Soap::run LINE 76 (/chroot/home/valuepet/valuepetsupplies.com/html/开发者_如何学JAVAapp/code/core/Mage/Api/Model/Server.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [7] Mage_Api_Model_Server::run LINE 42 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Api/controllers/IndexController.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [6] Mage_Api_IndexController::indexAction LINE 418 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [5] Mage_Core_Controller_Varien_Action::dispatch LINE 253 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [4] Mage_Core_Controller_Varien_Router_Standard::match LINE 176 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Core/Controller/Varien/Front.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [3] Mage_Core_Controller_Varien_Front::dispatch LINE 340 (/chroot/home/valuepet/valuepetsupplies.com/html/app/code/core/Mage/Core/Model/App.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [2] Mage_Core_Model_App::run LINE 627 (/chroot/home/valuepet/valuepetsupplies.com/html/app/Mage.php)
2011-09-29T18:10:05+00:00 DEBUG (7): [1] Mage::run LINE 80 (/chroot/home/valuepet/valuepetsupplies.com/html/index.php)
2011-09-29T18:10:05+00:00 DEBUG (7): END BACKTRACE


Place a before and after save event listener on the product and stock objects.

Have the listener check for a stock of "0".

If a stock of zero is detected, construct a stack trace via the information in debug_backtrace. You'll want to manually create this, as a circular reference in a backtrace's paramaters can potentially create infinite output.

Use the backtrace to determine where/when the stock is getting set to zero.

0

精彩评论

暂无评论...
验证码 换一张
取 消