commerce_export-8.x-1.0-alpha1/config/install/migrate_plus.migration.import_attribute_value.yml
config/install/migrate_plus.migration.import_attribute_value.yml
# Import attribute values for existing attributes. # # Attributes are imported in name/value pairs. Up to 4 pairs per row can be # imported with this migrations. The text in the name column is expected to the # be the same for that entire column. The value should be whatever is required # for the product variation in that row. # # Destination site configuration: # - Install the Commerce Module. # - Create the attributes, with only one value, on the destination site. # id: import_attribute_value label: Product attribute values migration_group: commerce_export source: plugin: attribute_csv path: 'public://import/product.csv' header_row_count: 1 keys: - attribute_name - attribute_value column_names: 13: attribute_name1: 'Attribute name1' 14: attribute_value1: 'Attribute value1' 15: attribute_name2: 'Attribute name2' 16: attribute_value2: 'Attribute value2' 17: attribute_name3: 'Attribute name3' 18: attribute_value3: 'Attribute value3' 19: attribute_name4: 'Attribute name4' 20: attribute_value4: 'Attribute value4' constants: langcode: en process: langcode: 'constants/langcode' # Convert the attribute name to a machine name. attribute: - plugin: machine_name source: attribute_name name: attribute_value destination: plugin: entity:commerce_product_attribute_value destination_module: commerce_product