akeneo-labs / ExcelConnectorBundle

Akeneo Excel Connector (deprecated)
Other
16 stars 11 forks source link

Associations in Product Import #32

Closed McSurf84 closed 8 years ago

McSurf84 commented 8 years ago

I have a problem with product associations when I try to import some Excel data. I´m Using Akeneo 1.4.18 with MongoDB 2.4.14.

After I exported some products with the default Excel exporter, I´m not able to import the same file with the default Excel product importer.

There is an error at writing the associations. In the Pim\Component\Connector\Writer\Doctrine\ProductAssociationWriter class for the method incrementCount(array $products) an array with Pim\Bundle\CatalogBundle\Model\Association is handed over. But he seems to expect an array with Pim\Bundle\CatalogBundle\Model\Product entities. So for the Associations there is no method "getAssociations()" and the import fails.

PHP Fatal error: Call to undefined method Pim\Bundle\CatalogBundle\Model\Association::getAssociations() in /var/www/vendor/akeneo/pim-community-dev/src/Pim/Component/Connector/Writer/Doctrine/ProductAssociationWriter.php on line 20

When I delete the association columns from the Excel file, everything works fine.

fitn commented 8 years ago

Hi,

It has been fixed on 1.5 branch and master (so for Akeneo PIM 1.4 and 1.5). I would fix #40 before tagging a new version so it's only available on the branches for now.

Regards,

fitn commented 8 years ago

ExcelConnector 1.5.3 and 1.6.1 has been released for this issue.