Properies
|
The configuration file is divided into the following described standard configuration sections and can include the following properties:
Following examples are based on a configuration during initial installation
additional-vendor-dirs
- Property
-
Property Name Default Description []
With
additional-vendor-dirsadditional vendor directories can be specified.When installing with the PHAR version of Pacemaker Community Edition, it is required to use the
additional-vendor-dirsdirective. - Example 1
-
In a existing configuration file
{ "magento-edition": "CE", "magento-version": "2.3.4", "system-name": "12345-mbp", ..., "additional-vendor-dirs" : [ { "vendor-dir": "vendor", "relative": true, "libraries": [ "techdivision/import-adapter-custom" ] } ]..., } - Example 2
-
As a custom override configuration file
{ "additional-vendor-dirs" : [ { "vendor-dir": "vendor", "relative": true, "libraries": [ "techdivision/import-adapter-custom" ] } ] }
archive-dir
- Property
-
Property Name Default Description </path/to/my/archive/dir>
The option--archive-dircan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", "system-name": "12345-mbp", ..., "archive-dir" : "<archive/dir/path>", ..., } - CLI
-
import:execute --archive-dir="<OptionValue>"
aliases
|
Overriding classes can be dangerous and should only be done when you aware of what you’re doing |
- Property
-
Property Name Default Description []
Aliases can be used to override classes with custom functionality, e.g. provided by a project-specific library.
As example, if a custom adapter for caching is used, the default class behind the Symfony DI configuration of the
cache.adaptercan be replaced by the customer DI identifierimport_parallel.cache.adapter.redisin a snippet, e.g.<custom-installation-dir>/aliases.json. - Example
-
<custom-installation-dir>/aliases.json{ "aliases": [ { "id": "cache.adapter", "target": "import_parallel.cache.adapter.redis" } ] }
archive-artefacts
- Property
-
Property Name Default Description true
The option--archive-artefactscan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", "operation-name": "add-update", "debug-mode": false, ... "archive-artefacts": true, (1) ... }1 The archive-artefactsoption can be set astrue|falsevalue - CLI
-
import:execute --archive-artefacts="<OptionValue>"
configuration
- Property
-
Property Name Default Description </path/to/my/configuration/file>
The option--configurationcan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.1", "operation-name" : "replace", ... "configuration" : "app/etc/configuration/", ... } - CLI
-
import:clear:pid-file --configuration="<OptionValue>"
custom-configuration-dir
- Property
-
Property Name Default Description <app/etc/custom-configuration/dir/>
The option--custom-configuration-dircan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.1", "operation-name" : "replace", ... "custom-configuration-dir" : "<app/etc/custom-configuration-dir/>", ... } - CLI
-
import:execute --custom-configuration-dir="<OptionValue>"
cache-enabled
- Property
-
Property Name Default Description false
The option--cache-enabledcan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", "system-name": "12345-mbp", "image-types": [], "single-transaction": false, ..., "cache-enabled": false, ..., "aliases": [], } - CLI
-
import:execute --cache-enabled="<OptionValue>"
clear-artefacts
- Property
-
Property Name Default Description true
The option--clear-artefactscan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", "operation-name": "add-update", "debug-mode": false, ... "clear-artefacts": true, (1) ... }1 The clear-artefactsoption can be set astrue|falsevalue - CLI
-
import:execute --clear-artefacts="<OptionValue>"
databases
- Property
-
Property Name Default Description []
-
value is generated automatically
A user-defined database connection can be specified; the
databasesproperty of the type array contains the selected database access data.Depending on the command-line option
--use-db-idand the specified value, the database with the given ID will be used.-
If the command-line options are not specified, the one with the flag
"default": truewill be used. -
If not found, the first configured database will get used.
-
If a value for the command-line option
--db-pdo-dsnhas been specified, the--use-db-idoption will get ignored, and the given DSN value will be used for database connection instead. -
In addition, the credentials, by using the
--db-usernameand--db-passwordoptions, also need to be specified.
The database configuration gets used if there is a need to access a separate database, e.g., for testing purposes or when running Pacemaker Community Edition standalone.
The default for Magento is the Magento own database configuration from the
env.phpfile. -
- Example
-
{ "databases": [ { "id": "local", "default": false, (1) "pdo-dsn": "mysql:host=127.0.0.1;dbname=appserver_magento2_ee212", "username": "your-username", "password": "your-password" }, { "id": "remote", "default": true, (2) "pdo-dsn": "mysql:host=127.0.0.130;dbname=appserver_magento2_ee212", "username": "your-username", "password": "your-password" } ] }1 If no command-line options are found, the first configured database will get used 2 If the command-line options are not specified, the one with the flag "default": truewill be used
db-password
- Property
-
Property Name Default Description The option--db-passwordcan get used with the following CLI commands: - CLI
-
import:execute --db-password="<OptionValue>"
dest
- Property
-
Property Name Default Description The option--destcan get used with the following CLI commands: - Example
-
- CLI
-
import:create:configuration-file --dest="<OptionValue>"
db-pdo-dsn
- Property
-
Property Name Default Description The option--db-pdo-dsncan get used with the following CLI commands: - CLI
-
import:execute --db-pdo-dsn="<OptionValue>"
db-table-prefix
- Property
-
Property Name Default Description The option--db-table-prefixcan get used with the following CLI commands: - CLI
-
import:execute --db-table-prefix="<OptionValue>"
db-username
- Property
-
Property Name Default Description The option--db-usernamecan get used with the following CLI commands: - CLI
-
import:execute --db-username="<OptionValue>"
default-values
- Property
-
Property Name Default Description {…}
- Example
-
{ "default-values": { "catalog_product": {(1) "my-column": "my-column-value",(2) } } }1 Entity Type code section, Available Entity Type Code 2 For each user-defined field, a key-value pair can get specified
debug-mode
- Property
-
Property Name Default Description false
The option--debug-modecan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", "operation-name": "add-update", "archive-artefacts": false, ... "debug-mode": false, ... } - CLI
-
import:execute --debug-mode="<OptionValue>"
empty-attribute-value-constant
- Property
-
Property Name Default Description The option--empty-attribute-value-constantcan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", ... "empty-attribute-value-constant": "__CUSTOM_CONSTANT__EMPTY__VALUE__", ... } - CLI
-
import:execute --empty-attribute-value-constant="<OptionValue>"
entity-type-code
- Property
-
Property Default Description none
Pacemaker support Magento Eav Entity Types
All listed Entity Types below are available with Pacemaker.
Pacemaker entity types:
-
customer -
customer_address -
catalog_category -
catalog_product -
eav_attribute -
eav_attribute_set -
catalog_product_inventory_msi -
catalog_product_tier_price -
catalog_product_url -
debug -
company_entity(professional version) -
catalog_product_custom_option(professional version) -
catalog_product_fpt(professional version) -
sales_gift_card(professional version)
Be sure to specify the correct category configuration file with the option
--configuration=<path/to/your-category-configuration>.json; alternatively you can pass the path to the default category configuration. -
- Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", "operation-name": "add-update", "archive-artefacts": false, "debug-mode": false, ... "entity-type-code": "catalog_product", ... } - CLI
-
import:create:ok-file --entity-type-code="<OptionValue>"
extension-libraries
- Property
-
Property Name Default Description []
For more complex projects, additional libraries may get needed.
Pacemaker Community Edition Console Tool uses Symfony DI container. Therefore, it is necessary to register other libraries by adding them to the configuration file.
- Example 1
-
Default after inital installation
{ "magento-edition": "CE", "magento-version": "2.3.4", ..., "extension-libraries": [], ..., } - Example 2
-
Add a additional extension library using a custom configuration file (
app/etc/configuration/extension-libraries.json){ "extension-libraries" : [ "techdivision/import-product-magic360" ] }
image-types
- Property
-
Property Name Default Description []
image-typesallow us to set different Magento image types for the import as available table columns.By default, all Magento standard image types get specified in Pacemaker Community Edition, and under specification or as default
[]is set and all provided types are supported.-
Magento standard image types
-
base_image -
small_image -
thumbnail_image -
additional_images
-
Once one or more types get listed in the given array, Pacemaker Community Edition assumes that only the listed image types need to get imported.
-
- Example 1
-
Default
{ "magento-edition": "CE", "magento-version": "2.3.4", "system-name": "12345-mbp", ..., "image-types": [], ..., } - Example 2
-
{ "magento-edition": "CE", "magento-version": "2.3.4", "system-name": "12345-mbp", ..., "image-types": [ "base_image", "small_image", "thumbnail_image", "additional_images" ], ..., }
installation-dir
- Property
-
Property Default Description </path/to/my/project/root>
-
value is generated automatically
The option--installation-dircan get used with the following CLI commands: -
- Example
-
{ "magento-edition": "CE", "magento-version": "2.3.1", "operation-name" : "replace", "table-prefix": "test_", ... "installation-dir" : "/Volumes/workspace/www/myproject", ... } - CLI
-
Example
import:execute --installation-dir="<OptionValue>"
listeners
- Property
- Example
-
{ "listeners": [ { "app.set.up": [ "import.listener.render.ansi.art", (1) "import.listener.render.operation.info", "import.listener.render.mysql.info", "import.listener.render.debug.info", "import.listener.initialize.registry" ], "app.process.transaction.success": [ (2) "import.listener.finalize.registry", "import.listener.archive", "import.listener.clear.artefacts", "import.listener.clear.directories", "import.listener.operation.report" ], "app.process.transaction.failure": [ (3) "import.listener.finalize.registry", "import.listener.render.validations" ], "app.tear.down": [ "import.listener.import.history", "import.listener.clear.registry" ] } ] }1 The first listener named import.listener.render.ansi.artrenders the ASCII graphic image when the CLI gets called2 The second part is mandatory as it is responsible for initializing the registry of the actual import 3 The third part is mandatory as it is responsible for initializing the registry of the actual import
|
As a solution partner, feel free to replace the ASCII art renderer with one of your choices, e.g., rendering your company logo |
loggers
Pacemaker Import Community uses Monolog to provide the basic logging functionality.
- Property
-
Property Name Default Description {…}
-
One logger instance is necessary
-
As a minimum requirement, at least one logger instance gets needed
-
By default, if no logger is configured, a system logger is installed that writes log messages to the error log set in the
php.inifile of thePHPinstallation used
-
Additional loggers
E.g., to send emails when an exception gets thrown, the configuration can be extended as follows, with a custom
<custom-configuration-dir>/loggers.jsonsnippet.-
See Example 2 and loggers.mail.handlers
-
- Example 1
-
{ "loggers": { "system": { "channel-name": "logger/system", "id": "import.logger.factory.monolog", "processors": [ { "id": "import.logger.processor.serial", "params": [], "param-delimiter": "," }, { "id": "import.logger.processor.memory.peak.usage", "params": [], "param-delimiter": "," } ], "handlers": [ { "id": "import.logger.factory.handler.stream.wrapper", "formatter": { "id": "import.logger.factory.formatter.line", "params": { "format": "[%datetime%] %channel%.%level_name%: %message% %context% %extra% ", "date-format": "Y-m-d H:i:s", "allow-inline-line-breaks": true, "ignore-empty-context-and-extra": true }, "param-delimiter": "," }, "params": { "stream": "system.log", "level": "info" }, "param-delimiter": "," }, { "id": "import.logger.factory.handler.stream.wrapper", "formatter": { "id": "import.logger.factory.formatter.line", "params": { "format": "[%datetime%] %channel%.%level_name%: %message% %context% %extra% ", "date-format": "Y-m-d H:i:s", "allow-inline-line-breaks": true, "ignore-empty-context-and-extra": true }, "param-delimiter": "," }, "params": { "relative": false, "stream": "php://stdout", "level": "notice" }, "param-delimiter": "," } ], "params": [], "param-delimiter": "," } } } - Example 2
-
There is also a possibility to use Handler for Native Mail Sender, which takes over PHP configuration settings.
{ "loggers": { "mail": { "id": "import.logger.factory.monolog", "channel-name": "logger/mail", "handlers": [ { "id": "import.logger.factory.handler.swift", "formatter": { "id": "import.logger.factory.formatter.line", "params": { "format": "[%datetime%] %channel%.%level_name%: %message% %context% %extra%", "date-format": "Y-m-d H:i:s", "allow-inline-line-breaks": true, "ignore-empty-context-and-extra": true } }, "params": { "log-level": "error", (1) "bubble": false }, "swift-mailer" : { "id" : "import.logger.factory.transport.swift.smtp", "params" : { "to" : "<to-email-address.com>", "from" : "<from-email-address.com>", "subject": "<subject-text>", "content-type" : "text/plain" }, "transport" : { "params" : { "smtp-host" : "<smtp-host>", "smtp-port" : 25 } } } } ] } } }1 We add a mail logger, and the default log level gets set to error
loggers.mail.handlers
To add additional loggers, e.g. in case you want to send mails if an exception has been thrown,
the configuration can get extended, e.g. with a snippet <custom-configuration-dir>/loggers.json.
- Property
- Example 1
-
{ ..., "handlers": [ { "id": "import.logger.factory.handler.native.mail.log", "formatter": { "id": "import.logger.factory.formatter.line", "params": { "format": "[%datetime%] %channel%.%level_name%: %message% %context% %extra%", "date-format": "Y-m-d H:i:s", "allow-inline-line-breaks": true, "ignore-empty-context-and-extra": true } }, "params": { "to": [ "<to-email-address.com>" ], "subject": "<subject-text>", "from": "<from-email-address.com>", "level": "error", (1) "bubble": true, "maxColumnWidth": 500 } } ], ... }1 The mail logger sets the default log level to error - Example 2
-
{ "loggers": { "mail": { "id": "import.logger.factory.monolog", "channel-name": "logger/mail", "handlers": [ { "id": "import.logger.factory.handler.native.mail.log", "formatter": { "id": "import.logger.factory.formatter.line", "params": { "format": "[%datetime%] %channel%.%level_name%: %message% %context% %extra%", "date-format": "Y-m-d H:i:s", "allow-inline-line-breaks": true, "ignore-empty-context-and-extra": true } }, "params": { "to": [ "<to-email-address.com>" ], "subject": "<subject-text>", "from": "<from-email-address.com>", "level": "error", "bubble": true, "maxColumnWidth": 500 } } ] } } }
log-level
- Property
-
Property Name Default Description info
The option--log-levelcan get used with the following CLI commands: - Example
-
{ "loggers": { "mail": { "id": "import.logger.factory.monolog", ..., "handlers": [ { "id": "import.logger.factory.handler.swift", ..., "params": { "log-level": "error", ... }, ... } ] } } } - CLI
-
import:execute --log-level="<OptionValue>"
magento-edition
- Property
-
Property Default Description CE|PE|EE
-
value is generated automatically
The option--magento-editioncan get used with the following CLI commands: -
- Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", "system-name": "12345-mbp", ..., } - CLI
-
Example
import:execute --magento-edition="<OptionValue>"
magento-version
- Property
-
Property Name Default Description x.x.x
-
value is generated automatically
The option--magento-versioncan get used with the following CLI commands: -
- Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", "system-name": "12345-mbp", ..., } - CLI
-
Example
import:execute --magento-version="<OptionValue>"
move-files-prefix
- Property
-
Property Name Default Description <Defaults to the prefix of the first plugin subject>
The option--move-files-prefixcan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", ... "move-files-prefix": "admin", ... } - CLI
-
import:execute --move-files-prefix="<OptionValue>"
multiple-field-delimiter
- Property
- Example
-
{ "magento-edition": "CE", "magento-version": "2.3.2", "operation-name" : "add-update", "installation-dir" : "/var/www/magento", "multiple-field-delimiter" : ",", "multiple-value-delimiter" : "|", "databases" : [ ... ], "loggers" : [ ... ], "operations" : { ... } }
multiple-value-delimiter
- Property
- Example
-
{ "magento-edition": "CE", "magento-version": "2.3.2", "operation-name" : "add-update", "installation-dir" : "/var/www/magento", "multiple-field-delimiter" : ",", "multiple-value-delimiter" : "|", "databases" : [ ... ], "loggers" : [ ... ], "operations" : { ... } }
operations
- Property
-
Property Name Default Description []
-
An operation represents a single step of an import command, such as
add-update, and combines the required functions as a container -
An operation allows to add a user-defined configuration (e.g.,
app/etc/configuration/operations.json) for an existing operation or to create a new operation
-
- Example 1
-
operationsection as a customoperations.jsonfile{ "operations": { "general": { "catalog_product_tier_price": { "add-update": { "plugins": { "subject": { "id": "import.plugin.subject", "listeners": [ { "plugin.process.success": [ "import_product_tier_price.listener.delete.obsolete.tier_prices" ] } ], "subjects": [ ... ] } } } } } } } - Example 2
-
operationsection in aconfiguration.jsonfile{ "system-name": "00752-mbp", "entity-type-code": "none", "installation-dir": "<magento-install-dir>", "magento-edition": "CE", "magento-version": "2.2.0", "databases": [], ..., "operations": { "general": { "general": { "create-ok-files": { "plugins": [ {...} }, ... }, ... }, "ce": {...}, "ee": {...} }, "extension-libraries": [], ... }
params
- Property
-
Property Name Default Description {…}
The option--paramscan get used with the following CLI commands: - Example
-
{ "params": { "my-website-country-mapping": { "DE": [ "de_DE", "de_AT", "de_CH" ], "EN": [ "en_US", "en_UK" ] } } } - CLI
-
import:products --params="<OptionValue>"Example how to pass parameterimport:products --params='{ "params": { "my-website-country-mapping": { "DE": [ "de_LI" ] } } }'
params-file
- Property
-
Property Name Default Description The option--params-filecan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.2", "operation-name" : "add-update", "installation-dir" : "/var/www/magento", ..., "params-file": "<system-temp-dir>/<custom-configuration-file.json>", ..., } - CLI
-
import:execute --params-file="<OptionValue>"
pid-filename
- Property
-
Property Name Default Description -
pid-filenameis the exact PID file name to be applied for a import process -
pid-filenameis generated when an import gets started -
pid-filenamemust only get specified if the import PID is stored at a different location -
The file
pid-filenamecontains only the import PID, represented as a number -
pid-filenameensures that only one import process can run -
The
pid-filenamefile gets removed after each finished import
The option--pid-filenamecan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.2", "operation-name" : "add-update", "installation-dir" : "/var/www/magento", "multiple-field-delimiter" : ",", "multiple-value-delimiter" : "|", ..., "pid-filename": "<system-temp-dir>/importer.pid", ..., "databases" : [ ... ], "loggers" : [ ... ], "operations" : { ... } } - CLI
-
import:execute --pid-filename="<OptionValue>"
render-validation-issues
- Property
-
Property Name Default Description 100
The option--render-validation-issuescan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.2", "operation-name" : "add-update", "installation-dir" : "/var/www/magento", ..., "render-validation-issues": "100", ..., } - CLI
-
import:execute --render-validation-issues="<OptionValue>"
serial
- Property
-
Property Name Default Description The option--serialcan get used with the following CLI commands: - CLI
-
import:execute --serial="<OptionValue>"
shortcuts
- Property
-
Property Name Default Description {…}
The option--shortcutscan get used with the following CLI commands: - Example
-
{ "shortcuts": { "ce": { "catalog_product": { "add-update": [ "general/general/global-data", "general/general/move-files", "general/catalog_product/collect-data", "general/catalog_category/convert", "ce/catalog_category/sort", "ce/catalog_category/add-update", "ce/catalog_category/add-update.path", "ce/catalog_category/add-update.url-rewrite", "general/catalog_category/children-count", "general/catalog_product/validate", "ce/catalog_product/add-update", "ce/catalog_product/add-update.variants", "ce/catalog_product/add-update.bundles", "ce/catalog_product/add-update.links", "ce/catalog_product/add-update.grouped", "ce/catalog_product/add-update.media", "general/catalog_product/add-update.msi", "general/catalog_product/add-update.url-rewrites" ] } } } }
single-transaction
- Property
-
Property Name Default Description false
The option--single-transactioncan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", "operation-name": "add-update", "archive-artefacts": false, "debug-mode": false, ... "cache-enabled": false, ... } - CLI
-
import:create:ok-file --single-transaction="<OptionValue>"
source-dir
- Property
-
Property Name Default Description The option--source-dircan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", ..., "source-dir": "<system-temp-dir>/<directory-name-to-be-monitored>", ..., } - CLI
-
import:execute --source-dir="<OptionValue>"
strict-mode
- Property
-
Property Name Default Description true
The option--strict-modecan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", ..., "strict-mode": "true", ..., } - CLI
-
import:execute --strict-mode="<OptionValue>"
system-name
- Property
-
Property Default Description <OptionValue e.g. 00752-mbp>
The option--system-namecan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", ..., "system-name": "12345-mbp", ..., } - CLI
-
Example
import:execute --system-name="<OptionValue>"
target-dir
- Property
-
Property Name Default Description The option--target-dircan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", ..., "target-dir": "<system-temp-dir>/<directory-of-import-files>", ..., } - CLI
-
import:execute --target-dir="<OptionValue>"
use-db-id
- Property
-
Property Name Default Description The option--use-db-idcan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", ..., "use-db-id": "<my-db-id>", ..., } - CLI
-
import:execute --use-db-id="<OptionValue>"
config-output
- Property
-
Property Name Default Description The option--config-outputcan get used with the following CLI commands: - Example
-
{ "magento-edition": "CE", "magento-version": "2.3.4", ..., "config-output": true, ..., } - CLI
-
import:debug --config-output="<OptionValue>"