基本上,我在SUPEE 7405更新后遇到了这个问题。每当我向购物车添加东西,然后点击AJAX购物车中的删除项目时,它都会告诉我“无法删除该项目”。SUPEE 7405并且不能删除购物车商品
我必须刷新页面,然后项目才能成功删除。 基本上添加,然后立即删除item =不工作,我需要添加,刷新页面(或转到网站的其他页面),然后单击删除。
我注意到贴片压倒 应用程序/代码/核心/法师/结帐/控制器/ CartController.php
代码补丁后的补丁
/**
* Delete shoping cart item action
*/
public function deleteAction()
{
$id = (int) $this->getRequest()->getParam('id');
if ($id) {
try {
$this->_getCart()->removeItem($id)
->save();
} catch (Exception $e) {
$this->_getSession()->addError($this->__('Cannot remove the item.'));
Mage::logException($e);
}
}
$this->_redirectReferer(Mage::getUrl('*/*'));
}
代码之前
/**
* Delete shoping cart item action
*/
public function deleteAction()
{
if ($this->_validateFormKey()) {
$id = (int)$this->getRequest()->getParam('id');
if ($id) {
try {
$this->_getCart()->removeItem($id)
->save();
} catch (Exception $e) {
$this->_getSession()->addError($this->__('Cannot remove the item.'));
Mage::logException($e);
}
}
} else {
$this->_getSession()->addError($this->__('Cannot remove the item.'));
}
$this->_redirectReferer(Mage::getUrl('*/*'));
}
在我的文件中修补程序覆盖了什么导致此问题?
刚刚试了一下,反正,我的编译是Disabled。感谢您的想法! – Icon
这实际上为我工作。谢谢! – rltegantvoort