Skip to content

Instantly share code, notes, and snippets.

@rndstr
Created February 15, 2011 08:56
Show Gist options
  • Save rndstr/827285 to your computer and use it in GitHub Desktop.
Save rndstr/827285 to your computer and use it in GitHub Desktop.
# line 367, magento-1.5.0.1
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->_items[] = $item;
}
return $this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment