Configuration/Core/controller/common/product/import/csv/converter

From Aimeos documentation

< Configuration‎ | Core/controller/common/product

Summary

List of converter names for the values at the position in the CSV file

controller/common/product/import/csv/converter = Array
(
)
  • Default: Array
  • Type: array - Associative list of position/converter name (or list of names) pairs
  • Since: 2015.05

Description

Not all data in the CSV file is already in the required format. Maybe the text encoding isn't UTF-8, the date is not in ISO format or something similar. In order to convert the data before it's imported, you can specify a list of converter objects that should be applied to the data from the CSV file.

To each field in the CSV file, you can apply one or more converters, e.g. to encode a Latin text to UTF8 for the second CSV field:

array( 1 => 'Text/LatinUTF8' )

Similarly, you can also apply several converters at once to the same field:

array( 1 => array( 'Text/LatinUTF8', 'DateTime/EnglishISO' ) )

It would convert the data of the second CSV field first to UTF-8 and afterwards try to translate it to an ISO date format.

The available converter objects are named "MW_Convert_<type>_<conversion>" where <type> is the data type and <conversion> the way of the conversion. In the configuration, the type and conversion must be separated by a slash (<type>/<conversion>).

Note: Keep in mind that the position of the CSV fields start at zero (0). If you only need to convert a few fields, you don't have to configure all fields. Only specify the positions in the array you really need!

See also