You are here

magento2_profile_customer.yml in Commerce Migrate 3.1.x

modules/magento/migrations/magento2_profile_customer.yml

File

modules/magento/migrations/magento2_profile_customer.yml
View source
  1. id: magento2_profile_customer
  2. label: Magento customer profile
  3. migration_group: commerce_migrate_magento2
  4. migration_tags:
  5. - Content
  6. - Magento 2
  7. source:
  8. # Uses a custom source plugin to yield the top level category.
  9. plugin: magento2_csv
  10. # Change the path and filename to match your source CSV file.
  11. path: 'public://import/magento2_customer_address_20180618_003449.csv'
  12. # Change the enclosure character to suit your source CVS file.
  13. enclosure: "\""
  14. # Change the number of header rows to suit your source CVS file.
  15. header_offset: 0
  16. # Alter default SplFileObject flags so that new lines in cells are preserved.
  17. file_flags: 0xE
  18. # The key field is the top level category determined from the 'categories'
  19. # column. The source plugin determines the vocabulary name and adds it to
  20. # the source row indexed by 'vocabulary'.
  21. ids: [_entity_id]
  22. constants:
  23. bundle: customer
  24. process:
  25. # Skip if this is the shipping default row.
  26. skip:
  27. plugin: magento2_skip_shipping_default
  28. source:
  29. - _address_default_billing_
  30. - _address_default_shipping_
  31. uid:
  32. -
  33. plugin: entity_lookup
  34. source: _email
  35. value_key: mail
  36. entity_type: user
  37. access_check: false
  38. -
  39. plugin: skip_on_empty
  40. method: row
  41. profile_id:
  42. -
  43. plugin: entity_lookup
  44. source: '@uid'
  45. value_key: uid
  46. bundle_key: type
  47. bundle: customer
  48. entity_type: profile
  49. access_check: false
  50. ignore_case: true
  51. -
  52. plugin: skip_on_empty
  53. method: process
  54. type: constants/bundle
  55. langcode:
  56. plugin: default_value
  57. default_value: und
  58. 'address/langcode': destination_default_langcode
  59. 'address/given_name': firstname
  60. 'address/additions_name': middlename
  61. 'address/family_name': lastname
  62. 'address/organization': company
  63. address_lines:
  64. -
  65. plugin: skip_on_empty
  66. source: street
  67. method: process
  68. -
  69. plugin: explode
  70. delimiter: "\n"
  71. 'address/address_line1': '@address_lines/0'
  72. 'address/address_line2': '@address_lines/1'
  73. 'address/postal_code': postcode
  74. # No equivalent source for sorting_code or dependent_locality.
  75. #'address/sorting_code':
  76. #'address/dependent_locality':
  77. 'address/locality': city
  78. 'address/administrative_area': region
  79. 'address/country_code': country_id
  80. phone: telephone
  81. is_default: _address_default_billing_
  82. destination:
  83. plugin: 'entity:profile'
  84. destination_module: profile
  85. migration_dependencies:
  86. required:
  87. - magento2_user