We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I pass parameters like "field separator" and "multiple value separator"?
The text was updated successfully, but these errors were encountered:
Hello, you found a solution?
Sorry, something went wrong.
It's currently not supported by this module.
To specify a different field separator, you may want to take a look at Model/Import.php file : https://github.com/cedricblondeau/magento2-module-catalog-import-command/blob/master/Model/Import.php#L73.
\Magento\ImportExport\Model\Import\Source\CsvFactory builds a Magento\ImportExport\Model\Import\Source\Csv object. Source\Csv constructor takes delimiter and enclosure parameters (see: https://github.com/magento/magento2/blob/develop/app/code/Magento/ImportExport/Model/Import/Source/Csv.php#L41).
So, I guess you could do something like this:
$csvSource = $this->csvSourceFactory->create( [ 'file' => $pathInfo['basename'], 'directory' => $this->readFactory->create($pathInfo['dirname']), 'delimiter' => ';', 'enclosure' => '|' ] ); $validate = $this->importModel->validateSource($csvSource);
No branches or pull requests
How can I pass parameters like "field separator" and "multiple value separator"?
The text was updated successfully, but these errors were encountered: