Download the PHP package ph2m/logistic without Composer
On this page you can find all versions of the php package ph2m/logistic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ph2m/logistic
More information about ph2m/logistic
Files in ph2m/logistic
Package logistic
Short Description Manage imports/exports
License GPL-3.0
Homepage https://github.com/PH2M/logistic
Informations about the package logistic
PH2M_Logistic
Manage your imports / exports.
Requirements
Magento >= 2.1.0
Installation
Console commands
You can launch the imports by typing the following commands:
Launch tests
To do list
- [ ] Complete unit tests
- [ ] Add WS connection type
Add another import
The following steps are for a new import class but they are the same for an export one. Just use export class/folders instead.
- Create a class which extends the
PH2M\Logistic\Model\Import\AbstractImport
class - In this class, add a
code
variable - Add in your
system.xml
these configurations (replace<code>
by yourcode
variable value):<code>_enable
: aselect
with aMagento\Config\Model\Config\Source\Yesno
source model<code>_path
: atext
field<code>_file_pattern
: atext
field<code>_archive_path
: atext
field
- If necessary, override the
columnsToIgnore
variable to ignore some columns -
If necessary, override the
columnsToRename
variable to rename some header columns to real product attributes codes: - If necessary, override the
columnsFixedValue
variable to add some fixed values (attribute set if it's not defined in your CSV file for example)
Add a custom object import
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.
Add another export
- Create a class which extends the
PH2M\Logistic\Model\Export\AbstractExport\
class - In this class, add a
code
variable - If you don't want to create a file for each exported object, set the
createAFileForEachObject
variable to false - Override
_getFileName
function to set the export file name - Override
_initObjectsToExport
function to return the objects to export - Add in your
system.xml
these configurations (replace<code>
by yourcode
variable value):<code>_enable
: aselect
with aMagento\Config\Model\Config\Source\Yesno
source model<code>_path
: atext
field
- XML files are not supported at the moment, if you want to export as XML you have to override the
_exportObjects
function and send an empty header to_createAndSendFile
Local import
Local import must be placed in /var
directory. You can next setup your import and archive paths like in the distant imports.
Licence
GNU General Public License, version 3 (GPLv3)
Troubleshooting
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
Special thanks to Firegento and all contributors to the FastSimpleImport extension!
All versions of logistic with dependencies
firegento/fastsimpleimport Version ^2.0.5
firegento/extendedimport Version dev-main