我一直在玩Magento Enterprise 1.14.1.0的购物车价格规则,偶然发现了一个问题。
我正在尝试创建一条简单的规则,如果您从定义的类别中购买任意3件商品,并且花费超过15英镑,您将获得10英镑的折扣。请参阅下面的配置。
在我的购物篮中,我有id类别的3个项目和id类别的5
1个项目3
。
启用此规则并查看购物篮时,会收到致命错误。这是堆栈跟踪的一部分。如您所见,我已经提高xdebug.max_nesting_level
到了令人恐惧的水平。
Fatal error: Maximum function nesting level of '18000' reached, aborting! in /dev/builds/1_14_1_0/lib/Varien/Object.php on line 344 Call Stack:
0.0003 348680 1. {main}() /dev/builds/1_14_1_0/index.php:0
0.0020 694956 2.Mage::run() /dev/builds/1_14_1_0/index.php:89
0.0068 1819640 3.Mage_Core_Model_App->run() /dev/builds/1_14_1_0/app/Mage.php:684
0.0509 9129168 4.Mage_Core_Controller_Varien_Front->dispatch() /dev/builds/1_14_1_0/app/code/core/Mage/Core/Model/App.php:354
0.0626 11074424 5. Mage_Core_Controller_Varien_Router_Standard->match() /dev/builds/1_14_1_0/app/code/core/Mage/Core/Controller/Varien/Front.php:172
0.0658 11765288 6. Mage_Core_Controller_Varien_Action->dispatch() /dev/builds/1_14_1_0/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php:250
0.1314 16963044 7. Mage_Checkout_CartController->indexAction() /dev/builds/1_14_1_0/app/code/core/Mage/Core/Controller/Varien/Action.php:418
0.3065 27313592 8. Mage_Checkout_Model_Cart->save() /dev/builds/1_14_1_0/app/code/core/Mage/Checkout/controllers/CartController.php:144
0.3195 28006864 9. Mage_Sales_Model_Quote->collectTotals() /dev/builds/1_14_1_0/app/code/core/Mage/Checkout/Model/Cart.php:458
0.3827 32507432 10. Mage_Sales_Model_Quote_Address->collectTotals() /dev/builds/1_14_1_0/app/code/core/Mage/Sales/Model/Quote.php:1331
0.6151 37466752 11. Mage_SalesRule_Model_Quote_Freeshipping->collect() /dev/builds/1_14_1_0/app/code/core/Mage/Sales/Model/Quote/Address.php:1013
0.6245 37839108 12. Mage_SalesRule_Model_Validator->processFreeShipping() /dev/builds/1_14_1_0/app/code/core/Mage/SalesRule/Model/Quote/Freeshipping.php:74
0.6247 37839784 13. Mage_SalesRule_Model_Validator->_canProcessRule() /dev/builds/1_14_1_0/app/code/core/Mage/SalesRule/Model/Validator.php:249
0.6282 37960924 14. Mage_Rule_Model_Abstract->validate() /dev/builds/1_14_1_0/app/code/core/Mage/SalesRule/Model/Validator.php:223
0.6418 38895940 15. Mage_Rule_Model_Condition_Combine->validate() /dev/builds/1_14_1_0/app/code/core/Mage/Rule/Model/Abstract.php:353
0.6420 38896372 16. Mage_SalesRule_Model_Rule_Condition_Product_Subselect->validate() /dev/builds/1_14_1_0/app/code/core/Mage/Rule/Model/Condition/Combine.php:307
0.6421 38896772 17. Mage_SalesRule_Model_Rule_Condition_Product_Combine->validate() /dev/builds/1_14_1_0/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php:117
0.6428 38898084 18. Mage_SalesRule_Model_Rule_Condition_Product_Subselect->validate() /dev/builds/1_14_1_0/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Combine.php:219
0.6429 38898484 19. Mage_SalesRule_Model_Rule_Condition_Product_Combine->validate() /dev/builds/1_14_1_0/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php:117
0.6433 38898572 20. Mage_SalesRule_Model_Rule_Condition_Product_Subselect->validate() /dev/builds/1_14_1_0/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Combine.php:219
0.6434 38898972 21. Mage_SalesRule_Model_Rule_Condition_Product_Combine->validate() /dev/builds/1_14_1_0/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php:117
0.6439 38899060 22. Mage_SalesRule_Model_Rule_Condition_Product_Subselect->validate() /dev/builds/1_14_1_0/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Combine.php:219
0.6440 38899460 23. Mage_SalesRule_Model_Rule_Condition_Product_Combine->validate() /dev/builds/1_14_1_0/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php:117
当我从那时的Magento中删除该If total quantity is 3
部分时,它Condition
不再是怪胎了。有人可以指出正确的方式来配置此促销活动,并阐明为什么我会致命吗?
这是Magento的香草装置,我担心我这么容易折断购物车。
更新资料
我正在运行mysql
Server version: 5.5.41-0ubuntu0.12.04.1 (Ubuntu)
和PHP一样
PHP 5.3.10-1ubuntu3.15 with Suhosin-Patch (cli) (built: Oct 29 2014 12:16:30)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd., and
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
更新2
数据库转储位于此处,约为130kb。
http://www.lukerodgers.co.uk/files/vanilla_1_14_1_0.sql.gz
- 是使用mysql创建的,以root @ localhost的身份运行,没有密码
- Magento管理控制台的用户名是
admin
,密码是password1
- 你将需要更新
web/unsecure/base_url
,并web/secure/base_url
在core_config_data
以指向您的安装实例。
复制
- 作为客人,在您的购物篮中添加1个绿色礼帽
- 然后将3个绿色靴子放入您的购物篮
- 希望我看到一个可怕的错误
magerun index:reindex:all
,没有什么区别。我今天和明天都在忙碌,但是如果您仍然无法复制,那么在星期四我可以提供数据库转储,如果这样好?