/** * Save product (import) * * @param array $importData * @throws Mage_Core_Exception * @return bool */ public function saveRow(array $importData, $keepImage = false) { $this->__dataBeSaved = $this->__defaultAttributes; if (!$this->checkBeforeSave($importData)) { return; } $this->doImageDownload($importData); $this->doDataFilter($importData); $websites = array(); foreach (Mage::app()->getWebsites() as $web) { $websites[] = $web->getCode(); } $this->__dataBeSaved = array_merge($this->__dataBeSaved, array('sku' => $importData[$this->__skuFieldName], 'store' => "default", 'websites' => implode(',', $websites))); $importData[$this->__categoriesFieldName] = preg_replace('/:/i', '/', $importData[$this->__categoriesFieldName]); $importData[$this->__categoriesFieldName] = preg_replace('/\\s*;\\s*/i', ',', $importData[$this->__categoriesFieldName]); $this->__dataBeSaved["categories"] = $importData[$this->__categoriesFieldName]; //$this->__dataBeSaved['category_ids'] = $this->catPreProcess($importData['Category IDs']) ; parent::saveRow($this->__dataBeSaved, $keepImage); return true; }