Magento – How to add import option to our custom module

csventitiesimport

I have created new custom module with the admin form like to create new Products. I have created successfully.All are working fine.But now i want to add one more feature to this module. I can import products through CSV files under system/import/export, which is a default Magento feature.

Like this how should I import my fields through CSV files.I have no idea about, how to do this task.

Under system/import/export, we have entity type "Products and customers". If I add my entity similar to this, is that enough; or do I have any other solution?

Best Answer

To use the import/export module for custom entities, you will have to extend it properly. You will need to create your own import entity which handles the import. Then you would do the import from the backend exactly like for products, but you select your entity.

To help you get started, refer to this module where a custom import entity is created to be able to import categories:

https://github.com/avstudnitz/AvS_FastSimpleImport/blob/master/src/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Category.php

Similarly, you can do it for your custom entity.

Related Topic