Wednesday, 28 September 2016

Magento : Item (Mage_Catalog_Model_Product) with the same id already exist

We have fixed this issue in magento core file.
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');
           } else {
               $this->_items[$itemId] = $item;
           }
       }
       else {
           $this->_items[] = $item;
       }
       return $this;

   }

No comments:

Post a Comment