发现了magento 中"Shopping Cart Price Rules"一个bug
2011-10-25 17:22
232 查看
I Found an issue in magento core source code for "Shopping Cart Price Rules"(by the way , the screenshot is done in your demo ).
The issue is follow, in "Shopping Cart Price Rules" conditions, if i select "If total quantity is 2 for a subselection of items in cart matching ALL of these conditions", this rule have issue for Configurable Product.
I do a test in magento 1.6.0 demo, add a shop cart rule "buy two shoes 10% off", then I add one shoe( is Configurable Product), then this rule is apply on shop cart!!!
Please see in following:
This issue is case by Mage_SalesRule_Model_Rule_
Condition_Product_Subselect::validate(), line 133:
foreach ($object->getQuote()->getAllItems() as $item) {
If $attr=="qty", after add one Configurable Product to shop cart, because Configurable Product have two items in shop cart(one is configurable product it self,another one is simple product belong to the configurable Product), so the qty will be duplicable
.
If modify line 133 to following, this issue can be fiexed:
foreach ($object->getQuote()->getAllVisibleItems() as $item) {
The issue is follow, in "Shopping Cart Price Rules" conditions, if i select "If total quantity is 2 for a subselection of items in cart matching ALL of these conditions", this rule have issue for Configurable Product.
I do a test in magento 1.6.0 demo, add a shop cart rule "buy two shoes 10% off", then I add one shoe( is Configurable Product), then this rule is apply on shop cart!!!
Please see in following:
This issue is case by Mage_SalesRule_Model_Rule_
Condition_Product_Subselect::validate(), line 133:
foreach ($object->getQuote()->getAllItems() as $item) {
If $attr=="qty", after add one Configurable Product to shop cart, because Configurable Product have two items in shop cart(one is configurable product it self,another one is simple product belong to the configurable Product), so the qty will be duplicable
.
If modify line 133 to following, this issue can be fiexed:
foreach ($object->getQuote()->getAllVisibleItems() as $item) {
相关文章推荐
- Magento——利用购物车促销规则(Shopping Cart Price Rules)实现自己的功能第一章: 添加新的动作(Actions)
- 发现 ASP.Net 的一个关于"回车提交"的 Bug ? 必须多于一个 Text 域"回车提交",Server: ButtonX_Click 才能截获!
- 发现百度一个"Bug"
- Magento——利用购物车促销规则(Shopping Cart Price Rules)实现自己的功能第二章: 购物车页面判断设置的规则和动作
- IE中发现新BUG "重影
- 《IE中发现新BUG "重影"》
- 发现Windows的一个很奇怪的事情,文件不能取名"prn"!
- "Dynamic Code Evolution for Java dcevm"发现一个NB的东西
- 发现 ASP.Net 的一个关于"回车提交"的 Bug ? 必须多于一个 Text 域"回车提交",Server: ButtonX_Click 才能截获!
- 抓住了java version "1.6.0-rc"国际化的一个bug
- total commander在64位系统中的一个小"bug"
- 20140528 repo sync后发现的bug "replace is not a member of std"
- 小发现之"c#中的Main函数不能调同一个类中的非静态方法"
- Java为什么不支持"无符号型基本数据"---一个无意中的发现!!
- magento Shopping Cart Price Rule 购物车促销规则
- 偶然发现的QQ的一个挺讨厌的BUG
- 用1、2、2、3、4、5这六个数字,用java写一个main函数,打印出所有不同的排列,如:512234、412345等,要求:"4"不能在第三位,"3"与"5"不能相连。
- 已知字母序列【d, g, e, c, f, b, o, a】,请实现一个函数针对输入的一组字符串 input[] = {"bed", "dog", "dear", "eye"},按照字母顺序排序并打印
- "ResourceRules.plist": cannot read resources
- 似乎是发现了asp.net ajaxToolkit中TAB控件的一个BUG