Hello @Manthan Dave,
I am facing this error when clicking on Check Data Button, when importing csv file.
Solved! Go to Solution.
Hello @Vivek Singh
For implementing import functionality in custom module you have to create import.xml file at app/code/Vendorname/Modulename/etc/import.xml. I think there is some mistake in your import.xml file. Please make sure all the things are correct.
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_ImportExport:etc/import.xsd"> <entity name="custom_import" label="Custom Import" model="Vendorname\Modulename\Model\Import\CustomImport" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Basic" /> </config>
The entry import.xml will add a new option in the import page "Entity Type" dropdown (System > Data Transfer > Import)
now in the import.xml the xml attributes:
behaviorModel: Takes the class name of the model class responsible to handle the logic for the import
label: Label name of the dropdown option
name: name for the dropdown option value
You can follow the following steps shown in below link. Hope it will definetely help you.
https://bsscommerce.com/confluence/how-to-import-csv-file-to-custom-table-magento2/
Problem solved? Click Kudos & Accept as Solution!
Hi @Vivek Singh
Not sure why , but your screenshot is not visible to us - could you please check again ? or post exact error log over here , which you are facing ?
so its help us to troubleshoot the issue !
Hello @Manthan Dave,
Again i have uploaded screenshot of my image but what the problem, image is not showing.
Hello @Vivek Singh
For implementing import functionality in custom module you have to create import.xml file at app/code/Vendorname/Modulename/etc/import.xml. I think there is some mistake in your import.xml file. Please make sure all the things are correct.
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_ImportExport:etc/import.xsd"> <entity name="custom_import" label="Custom Import" model="Vendorname\Modulename\Model\Import\CustomImport" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Basic" /> </config>
The entry import.xml will add a new option in the import page "Entity Type" dropdown (System > Data Transfer > Import)
now in the import.xml the xml attributes:
behaviorModel: Takes the class name of the model class responsible to handle the logic for the import
label: Label name of the dropdown option
name: name for the dropdown option value
You can follow the following steps shown in below link. Hope it will definetely help you.
https://bsscommerce.com/confluence/how-to-import-csv-file-to-custom-table-magento2/
Problem solved? Click Kudos & Accept as Solution!