我的问题是当数据分析运行时,它好像根本没有拾取covert_adapter_category ......我似乎看不到遗漏了什么......有什么想法吗?
数据流导入的输出:
Starting profile execution, please wait...
Warning: Please do not close the window during importing/exporting data
Starting Mage_Dataflow_Model_Convert_Adapter_Io :: load
Loaded successfully: "/opt/bitnami/apps/magento/htdocs/var/import/Categories.csv".
Starting Mage_Dataflow_Model_Convert_Parser_Csv :: parse
Method "parse" not defined in adapter catalog/convert_adapter_category.
Finished profile execution.
配置.xml:
<?xml version="1.0"?>
<config>
<modules>
<Import_Catalog>
<version>0.1.0</version>
</Import_Catalog>
</modules>
<global>
<models>
<catalog>
<rewrite>
<convert_adapter_category>Import_Catalog_Model_Convert_Adapter_Category</convert_adapter_category>
</rewrite>
</catalog>
</models>
</global>
</config>
protected $_stores;
/**
* Category display modes
*/
protected $_displayModes = array( 'PRODUCTS', 'PAGE', 'PRODUCTS_AND_PAGE');
public function parse()
{
$batchModel = Mage::getSingleton('dataflow/batch');
/* @var $batchModel Mage_Dataflow_Model_Batch */
$batchImportModel = $batchModel->getBatchImportModel();
$importIds = $batchImportModel->getIdCollection();
foreach ($importIds as $importId) {
//print '<pre>'.memory_get_usage().'</pre>';
$batchImportModel->load($importId);
$importData = $batchImportModel->getBatchData();
$this->saveRow($importData);
}
}