magento2_profile_shipping.yml in Commerce Migrate 3.0.x
Same filename and directory in other branches
modules/magento/migrations/magento2_profile_shipping.yml
File
modules/magento/migrations/magento2_profile_shipping.ymlView source
- id: magento2_profile_shipping
- label: Magento shipping profile
- migration_group: commerce_migrate_magento2
- migration_tags:
- - Content
- - Magento 2
- source:
- # Uses a custom source plugin to yield the top level category.
- plugin: magento2_csv
- # Change the path and filename to match your source CSV file.
- path: 'public://import/magento2_customer_address_20180618_003449.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
- # Alter default SplFileObject flags so that new lines in cells are preserved.
- file_flags: 0xE
- # The key field is the top level category determined from the 'categories'
- # column. The source plugin determines the vocabulary name and adds it to
- # the source row indexed by 'vocabulary'.
- ids: [_entity_id]
- constants:
- bundle: shipping
- process:
- skip:
- plugin: skip_on_empty
- source: _address_default_shipping_
- method: row
- uid:
- -
- plugin: entity_lookup
- source: _email
- value_key: mail
- entity_type: user
- access_check: false
- -
- plugin: skip_on_empty
- method: row
- profile_id:
- -
- plugin: entity_lookup
- source: '@uid'
- value_key: uid
- bundle_key: type
- bundle: shipping
- entity_type: profile
- access_check: false
- ignore_case: true
- -
- plugin: skip_on_empty
- method: process
- type: constants/bundle
- langcode:
- plugin: default_value
- default_value: und
- 'address/langcode': destination_default_langcode
- 'address/given_name': firstname
- 'address/additions_name': middlename
- 'address/family_name': lastname
- 'address/organization': company
- address_lines:
- -
- plugin: skip_on_empty
- source: street
- method: process
- -
- plugin: explode
- delimiter: "\n"
- 'address/address_line1': '@address_lines/0'
- 'address/address_line2': '@address_lines/1'
- 'address/postal_code': postcode
- # No equivalent source for sorting_code or dependent_locality.
- #'address/sorting_code':
- #'address/dependent_locality':
- 'address/locality': city
- 'address/administrative_area': region
- 'address/country_code': country_id
- phone: telephone
- is_default: _address_default_shipping_
- destination:
- plugin: 'entity:profile'
- destination_module: profile
- migration_dependencies:
- required:
- - magento2_user