/** * Adding new item to quote * * @param Mage_Sales_Model_Quote_Item $item * @return Mage_Sales_Model_Quote */ function addItem(Mage_Sales_Model_Quote_Item $item) { // elite paint if (isset($_POST['paint'])) { if ('other' != $_POST['paint']) { $item->setElitePaint($_POST['paint']); } else { $item->setElitePaintOther($_POST['vafPaintCustom']); } } // elite paint $item->setQuote($this); if (!$item->getId()) { $this->getItemsCollection()->addItem($item); Mage::dispatchEvent('sales_quote_add_item', array('quote_item' => $item)); } return $this; }