magento2_product_variation.yml in Commerce Migrate 8.2
Same filename and directory in other branches
modules/magento/migrations/magento2_product_variation.yml
File
modules/magento/migrations/magento2_product_variation.ymlView source
- id: magento2_product_variation
- label: Product variations
- migration_group: commerce_migrate_magento2
- migration_tags:
- - Magento 2
- - Content
- 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
- # The key fields attribute and name are set in the row in the source plugin.
- ids: [sku]
- process:
- sku: sku
- title: name
- uid:
- plugin: default_value
- default_value: 1
- # The currency code default is 'USD'. If your are using a different currency
- # change the default value here.
- currency_code:
- plugin: default_value
- default_value: USD
- price:
- plugin: magento2_commerce_price
- source:
- - price
- - '@currency_code'
- # The product variation type defaults to 'default'. For each product variation
- # type, make a new migration and change the default value to the desired
- # machine name.
- type:
- -
- plugin: migration_lookup
- migration: magento2_product_variation_type
- source: attribute_set_code
- -
- plugin: default_value
- default_value: default
- active: product_online
- # Attributes are single valued entity reference fields migrated in name/id
- # pairs. The attribute name must be a machine name of a certain format.
- created:
- -
- plugin: explode
- delimiter: ','
- source: created_at
- -
- plugin: concat
- -
- plugin: format_date
- from_format: 'n/d/y g:i A'
- to_format: U
- changed:
- -
- plugin: explode
- delimiter: ','
- source: updated_at
- -
- plugin: concat
- -
- plugin: format_date
- from_format: 'n/d/y g:i A'
- to_format: U
- destination:
- plugin: 'entity:commerce_product_variation'
- migration_dependencies:
- required:
- - magento2_product_variation_type