Type
magento2-module
Manage imports/exports
magento2-module
GPL-3.0
None
None
None
None
None
Manage your imports / exports.
Magento >= 2.1.0
composer config repositories.firegento_extendedimport2 vcs https://github.com/firegento/FireGento_ExtendedImport2
composer require ph2m/logistic
bin/magento module:enable FireGento_FastSimpleImport FireGento_ExtendedImport PH2M_Logistic
bin/magento setup:upgrade
You can launch the imports by typing the following commands:
# Products import
bin/magento logistic:import:products
# Stocks import
bin/magento logistic:import:stocks
vendor/phpunit/phpunit/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/ph2m/logistic
The following steps are for a new import class but they are the same for an export one. Just use export class/folders instead.
PH2M\Logistic\Model\Import\AbstractImport
classcode
variablesystem.xml
these configurations (replace <code>
by your code
variable value):
<code>_enable
: a select
with a Magento\Config\Model\Config\Source\Yesno
source model<code>_path
: a text
field<code>_file_pattern
: a text
field<code>_archive_path
: a text
fieldcolumnsToIgnore
variable to ignore some columnscolumnsToRename
variable to rename some header columns to real product attributes codes:
```
/**
columnsFixedValue
variable to add some fixed values (attribute set if it's not defined in your CSV file for example)If you want to import a custom object (stores from a store locator for example), override the _launchImporter
method in your import class.
This method should return an array which has a success
and a message
(in case of error) value.
PH2M\Logistic\Model\Export\AbstractExport\
classcode
variablecreateAFileForEachObject
variable to false_getFileName
function to set the export file name_initObjectsToExport
function to return the objects to exportsystem.xml
these configurations (replace <code>
by your code
variable value):
<code>_enable
: a select
with a Magento\Config\Model\Config\Source\Yesno
source model<code>_path
: a text
field_exportObjects
function and send an empty header to _createAndSendFile
Local import must be placed in /var
directory. You can next setup your import and archive paths like in the distant imports.
GNU General Public License, version 3 (GPLv3)
This file does not contain any data.
I have seen this issue because I was trying to import a product attribute which had a code in camel case, ie MyAttribute
. Replace it by my_attribute
.
It can also happen if your data has a bad format, ie you're trying to import an array as value.
Special thanks to Firegento and all contributors to the FastSimpleImport extension!