magento2_product_type.yml in Commerce Migrate 3.1.x
Same filename and directory in other branches
modules/magento/migrations/magento2_product_type.yml
File
modules/magento/migrations/magento2_product_type.ymlView source
- id: magento2_product_type
- label: Magento product type
- migration_group: commerce_migrate_magento2
- migration_tags:
- - Magento 2
- - Configuration
- source:
- plugin: csv
- # Change the path and filename to match your source CSV file.
- path: 'public://import/magento2-catalog_product_20180326_013553_test.csv'
- # Change the enclosure character to suit your source CVS file.
- enclosure: "\""
- # Change the number of header rows to suit your source CVS file.
- header_offset: 0
- # Since this is keyed by 'type' the number of rows in the file will probably
- # be greater than the number of row processed. Set skip_count true so that
- # count check is not used when determining if the migration succeeded. This
- # means this migration can be used as a dependency.
- skip_count: true
- # The key fields attribute and name are set in the row in the source plugin.
- ids: [attribute_set_code]
- constants:
- variation_type: default
- line_item_type: product_variations
- # Do not generate a title.
- generate_title: false
- process:
- id:
- - plugin: skip_on_empty
- method: row
- source: attribute_set_code
- -
- plugin: machine_name
- exists:
- -
- plugin: entity_exists
- source: '@id'
- entity_type: commerce_product_type
- -
- plugin: callback
- callable: is_bool
- -
- plugin: skip_on_empty
- method: row
- label: attribute_set_code
- description:
- plugin: callback
- callable: ucfirst
- source: attribute_set_code
- # help: help
- variationType: 'constants/variation_type'
- lineItemType: 'constants/line_item_type'
- generateTitle: 'constants/false'
- injectVariationFields:
- plugin: default_value
- default_value: 1
- destination:
- plugin: 'entity:commerce_product_type'
- destination_module: commerce_product