Recoverable Error: Argument 1 passed to Mage_SalesRule_Model_Validator::process()

使用J2t的rewardpoints插件,cart页面选择区域计算运费时出现如下类似的错误:

Recoverable Error: Argument 1 passed to Mage_SalesRule_Model_Validator::process() must be an instance of Mage_Sales_Model_Quote_Item_Abstract, instance of Mage_Sales_Model_Quote_Address given, called in D:\xampp\htdocs\beads\app\code\community\Rewardpoints\Model\Validator.php on line 7 and defined in D:\xampp\htdocs\beads\app\code\core\Mage\SalesRule\Model\Validator.php on line 270

出现这个错误的原因:Mage_SalesRule_Model_Validator::process() 它获得的对象不是Mage_Sales_Model_Quote_Item_Abstract类的实例,所以应该使用正确的方法,Rewardpoints_Model_Validator这个类的第七行代码应该这样写:

parent::processShippingAmount($address);

这样替换下问题就解决了~

Translate for English: The reason for this issue is the Mage_SalesRule_Model_Validator::process() is not the instance of the class Mage_Sales_Model_Quote_Item_Abstract,but it must be,so the solution is just to change the code line7 of the app\code\community\Rewardpoints\Model\Validator.php to

parent::processShippingAmount($address);

That's all enjoy it,happy coding!


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值