基本上,我在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