How magmi engine works altogether

Now we will understand high level introduction of each directory.

Cli : Under this directory there is a single file magmi.cli.php file. This is basically for command line script for product import.

Conf : This folder contain sample configuration file for magmi. It contain magmi.ini.default. In order to run Magmi we need to rename this file as magmi.ini. And this file contain all database related credentials as well as other important configuration settings.

Engines : To handle each specific import magmi does have an engine created for it. For example essentially you can see a file named “magmi_productimportengine.php” tha handle product import. In future if we need to perform any other importy type like category then we can easily create new import engine that will handle import for that specific type of import.

Inc: This folder contain few important PHP scripts that is required as helper script or support script in order to streamline the import process. So we can say this folder contain common files for import.

Integration : This folder contain all the datapump scripts. Now you might has some queries about this

What is datapump in Magmi? : You might need to import data from some other platform that might not be Magento itself. In that case datapump script actually does actual push into Magento database by using datapump. So for each different type of import we will have separate type of datapump. You can see “datapump.ini” file under Integration/inc folder that contain necessary configuration settings for datapump.

Plugins : This folder contain almost all third party modules that is downloaded for specific purpose. So we can say this folder contain itemprocessor scripts that is required in order to override existing functionality.

 

State: Essentially this folder contain nothing but its actually contain 3 files if we will use magmi

*. Magmistate : That tell what is current state of magmi processor either idle or busy. If state is busy then it wouldn’t process any other further request until state doesn’t become idle.

*. Progress.txt : It shows which import in progress currently.

*. Trace.txt: It contain if there is any trace info required for that import.

 

So how can we use Magmi:

There could be multiple ways to handle

  1. By command line script
  2. Running url in browser
  • Create any observer that will update file (import file on server ) and then on cron script run processor.

Related posts:

The following two tabs change content below.

Chandra Shekhar

GCP Architect
Chandra Shekhar Pandey is Google certified Cloud engineer, I am Magento2 Trained developer. Having huge experience in designing cloud solution. I have around 12 years of experience with world enterprise IT companies and fortune 500 clients. During my architecture design I am always caring about high availability, fast performance and resilient system. From the programmer background I have huge experience in LAMP stack as well. Throughout my carrier I have worked on Retail, E-Learning, Video... Read More about Chandra Shekhar

Latest posts by Chandra Shekhar (see all)