I'm working on one module. module does read CSV file from var/import and making a call to Magmi to import.
RunQuickImport.php
namespace Test\Import\Controller\Adminhtml\Customimport;
class RunQuickImport extends \Magento\Backend\App\Action
{
public function execute()
{
$csv_data =readcsv file ;
foreach($csv_data as $row){
$dp = Magmi_DataPumpFactory::getDataPumpInstance("productimport");
$dp->beginImportSession("default", "xcreate");
$item = "product field array";
$run = $dp->ingest($item);
$dp->endImportSession();
}
}
}
Question is How to include Magmi file in controller ?
I had tried using following.
require_once '/public_html/magmi/inc/magmi_defs.php';
require_once '/public_html/magmi/integration/inc/magmi_datapump.php';
but not working