Magento 购物车定价规则未正确应用
我一直遇到购物车价格规则未正确应用在购物车中的问题。当有多个折扣时就会出现问题。具体示例如下:
折扣 A:
- 产品:3 本书套装
- 价格:每本书 20 美元
- 折扣:10 美元(当您购买全部 3 本书时)
折扣 B:
- 产品:套装(夹克和裤子)
- 价格:每件 500 美元
- 折扣:50 美元(当 您购买全部 3 本书时)你都买了)
情况如下: 如果首先列出套装,然后列出书籍,则所有折扣均适用($50 + $10 = $60)。然而,当书籍首次发售时,只享受套装折扣(50 美元)。
使用 firebug/firephp 我已经能够看到,对于第一种情况,折扣小于第一个产品的价格,并且所有折扣都可以从该产品中扣除。
在第二种情况下,折扣大于第一种产品的价格。发生这种情况时,50 美元的折扣将分摊到 3 本书上。第一本书立减 20 美元,第二本书立减 20 美元,第三本书立减 10 美元;但随后书籍的 10 美元折扣并未得到处理。
我需要知道下一步该去哪里。处理购物车价格规则涉及哪些模型/方法?如何跟踪代码以便找出错误发生的位置?
I have been having a problem with shopping cart price rules that aren't being applied correctly in the cart. The problem occurs when there are multiple discounts. Here is a specific example:
Discount A:
- Product: 3 Book Set
- Price: $20 each book
- Discount: $10 (when you buy all 3)
Discount B:
- Product: Suit (jacket and pants)
- Price: $500 each piece
- Discount: $50 (when you buy both)
Here is the situation:
When the suit is listed first and the books second, all discounts are taken ($50 + $10 = $60). However, when the books are first, only the suit discount is taken ($50).
Using firebug/firephp I have been able to see that for the first case, the discount is less than the price of the first product and all the discounts can be taken off that product.
In the second case, the discount is more than the price of the first product. When this happens, the $50 discount is spread across the 3 books. It takes $20 off the first book, $20 off the second, $10 off the third; but then the $10 discount for the books is not processed.
I need to know where to look next. What models/methods are involved in processing shopping cart price rules? How do I go about tracing the code so I can find out where the error happens?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论