解决 Magento 1.4.1.1 使用 One Step Checkout 插件无法添加到购物车

对于Magento 版本1.4.1.1版本来说,可能会导致产品无法添加到购物车页面,提示错误cannot add item to shopping cart。

这个错误会在如下的条件下产生

1 客户没有登录( The user is not logged in)
2 商店设置了购物车打折规则(There is a shopping cart rule)
3 使用非Magento默认的支付方式 (There are only non default Magento payment methods).

修正的方法如下:

找到 app/code/core/Mage/Sales/Model/Quote/Payment.php 文件 ,修改第115行,_beforeSave()这个方法改成:

 

阅读全文