shopify_product_variation_type.yml in Commerce Migrate 3.1.x
Same filename and directory in other branches
modules/shopify/migrations/shopify_product_variation_type.yml
File
modules/shopify/migrations/shopify_product_variation_type.ymlView source
- id: shopify_product_variation_type
- label: Shopify product variation type
- migration_group: commerce_migrate_shopify
- migration_tags:
- - Shopify
- - Configuration
- source:
- plugin: csv
- # Change the path and filename to match your source CSV file.
- path: 'public://import/shopify-products_export_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 'handle', which can contains duplicates, 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 used here is used in the product variation migration and must be
- # available on every row. The 'type' column is not used because it can be
- # empty. Instead use the 'handle' column which is a machine name of this
- # product and exists on every row.
- ids: [handle]
- fields:
- - name: handle
- label: Handle
- - name: title
- label: Title
- - name: body
- label: Body (HTML)
- - name: vendor
- label: Vendor
- - name: type
- label: Type
- constants:
- variation_type: default
- line_item_type: product_variations
- # Do not generate a title.
- generate_title: false
- process:
- exists:
- -
- plugin: entity_exists
- source: type
- entity_type: commerce_product_variation_type
- -
- plugin: callback
- callable: is_bool
- -
- plugin: skip_on_empty
- method: row
- id:
- -
- plugin: skip_on_empty
- method: row
- source: type
- -
- plugin: machine_name
- revision: revision
- label:
- plugin: callback
- callable: ucfirst
- source: type
- description:
- plugin: callback
- callable: ucfirst
- source: type
- generateTitle: 'constants/generate_title'
- lineItemType: 'constants/line_item_type'
- orderItemType:
- plugin: default_value
- source: line_item_type
- default_value: default
- destination:
- plugin: 'entity:commerce_product_variation_type'
- destination_module: commerce_product