How to Import CSV File to Custom Table In Magento 2

in magentotutorials •  4 years ago 

During the import of the product in Magento 2, some of the data or columns from the CSV file need to be imported to a custom table. So let’s crack up on the implementation to Import CSV file to Custom Table in Magento 2 🚀

How-to-Import-CSV-File-to-Custom-Table-In-Magento-2-950x500.png

Steps to Import CSV File to Custom Table in Magento 2:
Step 1: Create an import.xml file at the following path:

app/code/Vendor/Extension/etc

Step 2: Create file CustomImport.php under app/code/Vendor/Extension/Model/Import folder and add the following code:

Step 3: Create validator interface file RowValidatorInterface.php under app/code/Vendor/Extension/Model/Import/CustomImport folder and add the below code

for more details: https://magecomp.com/blog/import-csv-file-to-custom-table-magento-2/

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!