默认的网站系统用着用着就出这个错误,很奇怪,只需要做以下操作就可以完成解决。
付费内容限时免费中...
lib\Varien\Data\Collection.php
修改
public function addItem(Varien_Object $item) { $itemId = $this->_getItemId($item); if (!is_null($itemId)) { if (isset($this->_items[$itemId])) { throw new Exception('Item ('.get_class($item).') with the same id "'.$item->getId().'" already exist'); } $this->_items[$itemId] = $item; } else { $this->_addItem($item); } return $this; }
为
public function addItem(Varien_Object $item) { $itemId = $this->_getItemId($item); if (!is_null($itemId)) { if (isset($this->_items[$itemId])) { $this->_items[] = $item; //throw new Exception('Item ('.get_class($item).') with the same id "'.$item->getId().'" already exist'); } $this->_items[$itemId] = $item; } else { $this->_addItem($item); } return $this; }