avstudnitz / AvS_FastSimpleImport

Wrapper for Magento ImportExport functionality, which imports products and customers from arrays
308 stars 146 forks source link

Error importing configurable and grouped products with native import (via GUI) #193

Open kesonno opened 9 years ago

kesonno commented 9 years ago

The error is the same reported here: https://github.com/avstudnitz/AvS_FastSimpleImport/issues/92#issuecomment-51709738

<b>Fatal error</b>: Call to undefined method Mage_ImportExport_Model_Import_Entity_Product::filterRowData() in <b>/var/www/magento/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Product/Type/Configurable.php</b> on line <b>166</b><br />

I think this is caused by the fact that when import is done via AvS_FastSimpleImport_Model_Import::processProductImport is explicitly set AvS_FastSimpleImport_Model_Import_Entity_Product as entityModel, which implements the public method filterRowData, while when the admin GUI is used the entityModel is Mage_ImportExport_Model_Import_Entity_Product.

A quick & dirty solution could be wrap the call to filterRowData inside a check on the class type, like this:

if ($this->_entityModel instanceof AvS_FastSimpleImport_Model_Import_Entity_Product) {
    $this->_entityModel->filterRowData($rowData);
}

but is not very elegant imho, although at the moment I can not think of a better solution.

paales commented 9 years ago

@kesonno Using the importer through the Admin Panel is not supported at this moment.

kesonno commented 9 years ago

Yes, I know that through the admin GUI I can't access the advanced features of AvS_FastSimpleImport, but currently the module break the native funtionality.

chrisjz commented 9 years ago

I second this, we have to disable this module every time we want to do a native import. The issue has been around at least since v0.6.0.