我在Magento 1.5.0.1商店看到一个问题,某些产品的库存被覆盖为0。这似乎是自动发生的,我无法弄清楚为什么。我最近安装了来自Tinybrick的Lightspeed和SpeedBooster,这可能与它有关,但我已经禁用它们但仍然没有运气。我真的很茫然,所以任何想法,想法或调试技巧都会非常感激。
谢谢!
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/app/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
答案 0 :(得分:1)
在产品和库存对象上放置一个前后保存事件侦听器。
让听众检查股票是否为“0”。
如果检测到零库存,则通过debug_backtrace
中的信息构建堆栈跟踪。您需要手动创建它,因为回溯的参数中的循环引用可能会创建无限输出。
使用回溯确定股票被设置为零的位置/时间。