shopify_product_type.yml in Commerce Migrate 8.2
Same filename and directory in other branches
modules/shopify/migrations/shopify_product_type.yml
File
modules/shopify/migrations/shopify_product_type.ymlView source
- id: shopify_product_type
- label: Shopify product type
- migration_group: commerce_migrate_shopify
- migration_tags:
- - Shopify
- - Configuration
- source:
- # Uses a custom source plugin to yield the attribute values.
- 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
- # The key fields attribute and name are set in the row in the source plugin.
- ids: [type]
- 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:
- id:
- - plugin: skip_on_empty
- method: row
- source: type
- -
- 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: type
- # description: description
- # 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