I have been searching for a way of achieving this but so far no luck. I have also looked through the core and found where it is called (vendor\magento\module-import-export\Controller\Adminhtml\Import\Start.php
) but can't work out where to define the CSV file to import.
I know I need to pass data to it like so:
Array
(
[form_key] => 123456789xyz
[entity] => catalog_product
[behavior] => append
[validation_strategy] => validation-stop-on-errors
[allowed_error_count] => 10
[_import_field_separator] => ,
[_import_multiple_value_separator] => ,
[import_images_file_dir] =>
)
Any one have any hints as to how I can run the native CSV import via code?
Thanks