Additional attributes
The column additional_attributes
allows import values for all attributes that are not part of the default CSV format,
including the user-defined columns.
Remember always that for an attribute of type The rendered value is the one by the selected store view, either in the back or front; it is also the case for all other attribute types. |
Enclosing, Escaping, and Delimiter
As the default multiple field separator, which separates the key-value pairs with the option values to be imported,
is a comma (,
) it is necessary to enclose the complete value of the column with double apostrophes ("
).
Additionally, if only one of the attribute option values also contains a comma, e. g. the value Laptop Sleeve, 15 inches
,
the complete key-value pair additionally has to be enclosed with double apostrophes ("
).
It leads to unusual constellations, as those double apostrophes ("
) has to be escaped with double apostrophes ("
) again see
sku | … | additional_attributes | … |
---|---|---|---|
MB-2401 |
"color=black,""features=Audio Pocket|Laptop Sleeve, 15 inches""" |
In case the values of additional attributes contain a double apostrophe ("
), e. g. like Laptop "Sleeve"
those have to be escaped with a
backslash or a double apostrophe ("
) itself like
sku | … | additional_attributes | … |
---|---|---|---|
MB-2401 |
"color=black,features=Audio Pocket|Laptop ""Sleeve""" |
It will also be possible that the values of additional attributes contain double apostrophes ("
) as well as commas (,
).
Those have to be enclosed and escaped like
sku | … | additional_attributes | … |
---|---|---|---|
MB-2401 |
"color=black,""features=Audio Pocket|Laptop ""Sleeve"", 15 inches""" |
Please keep in mind that when an escape character, which defaults to backslash ( |
Multiselect Attributes
In the case of Multiselect Attributes, more than one value for an attribute is specified.
Those values have to be separated by character, which by default is the pipe (|
).
For example, if the Multiselect Attribute activity
should have the values gym
and hiking, trails
selected,
the column additional_attributes
must look like
sku | … | additional_attributes | … |
---|---|---|---|
MB-2401 |
"""activity=gym|hiking, trails"",""features=Audio Pocket|Laptop Sleeve, 15 inches""" |
The Multiselect Attributes are the only values that use the multiple value delimiter. |
Configuration
Beside the general CSV configuration on subject level Pacemaker Community Edition (CE) allows to override the default values, which are a comma (,
)
for the multiple fields and a pipe (|
) for the numerous value separator.
In contrast to the general CSV configuration, this has to be done on the global level and is therefore valid for all operations, subjects, and observers.
It is possible to override the default configuration by adding either one of or both multiple-field-delimiter
and multiple-value-delimiter
to the configuration file like
{
"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" : { ... }
}