Hello,
the customer created a new rule (which has ID 36), duplicating an old one, and now in the product view I get an exception:
Item (Mage_SalesRule_Model_Rule) with the same id "36" already exist
. If I comment in 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; }
the product view works correctly.
What is happening here and how to solve?
Many thanks
You have to remove old one entry from your table because issue related to duplicate entry.
In magento you cant keep two element with same id in table.
You cant comment out core file its not proper solutions. This will break other functionality of magento.
if issue solved, Click Kudos/Accept as solutions.
The customer duplicated a rule from magento admin, and as you can see in the screenshot there are no 2 rules with same ID.
any other hint?
thanks