Magento

How to Add Sample File For Custom Entity Import Functionality in Magento 2

    Blog       This Blog shows you how to create your own new entity type for import data extending the Magento/ImportExport/Model/Import/Entity/AbstractEntity class to import data into the custom module’s table. When you create your own module you need to attached Download sample file to easily manage Import data. Current import entities can be found in System > Import:    
  • Create import.xml file under the etc/import.xml

http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_ImportExport:etc/import.xsd">
 

  • Now you have to create di.xml in etc folder, etc/di.xml
http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">



Publicdesign_DeliverydateImport



 

  • Now create a function in Model file, a path for module based on the import.xml file model attribute, Publicdesign\DeliverydateImport\Model\Import\Deliverydate.php
   

Publicdesign/DeliverydateImport\Files\Sample\publicdesign_deliverydateimport.csv file, CSV file contains the Sample data you have to import.
 

  • In admin go to System -> Data Transfer -> Import

Select the new entity you have created and click download sample file; file is downloaded with sample data.
 


Read related bolg How to add Custom Validation to checkout fields in Magento 2?
 

  Data Transfer Import


Now you click on Download Sample file with your new entity option selected, the file will download with your sample data.
 

This blog is written by Urvi Sheth Magento Developer TridhyaTech
 

Magento

Magento 2.0 is Crucial to your Business. Learn Why!

A lot of business owners and developers were expecting that Magento 2.0 will be launched in the start of 2015. However so far it hasn't. There is a lot of buzz happening about the Magento 2 and its exclusive business-friendly features. According to Wiki

Magento

Why is Magento Enterprise Edition Highly Recommended For Online eCommerce Business?

Are you an eCommerce retailer bound and determined to achieve eCommerce success? Then you must not ignore to choose Magento Enterprise Edition which is endorsed by thousands of momentously prosperous and illustrious merchants' world-wide. What is Magento Enterprise Edition?

Transform Your Business With Digital Enterprise Solutions

Contact us

Our Offices

INDIA AHMEDABAD, INDIA

401, One World West, Nr. Ambli T-Junction 200, S P Ring Road, Bopal, Ahmedabad, Gujarat 380058

UK
UK

Kemp House 160 City Road, London, United Kingdom EC1V 2NX

GERMANY GERMANY

Nürnberger Str. 46 90579 Langenzenn Deutschland

AUSTRALIA AUSTRALIA

Level 36 Riparian Plaza, 71 Eagle Street, Brisbane, QLD 4000

USA USA

4411 Suwanee Dam road, Bld. 300 Ste. 350 Suwanee GA, 30024

SOUTH AFRICA SOUTH AFRICA

Cube Work Space, 24 Hans Strijdom Avenue, Cape Town

UAE DUBAI, UAE

101-Yes Business Tower, AI Barsha 1 - Dubai United Arab Emirates