You are here

magento2_profile_shipping.yml in Commerce Migrate 8.2

modules/magento/migrations/magento2_profile_shipping.yml

File

modules/magento/migrations/magento2_profile_shipping.yml
View source
  1. id: magento2_profile_shipping
  2. label: Magento shipping 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: shipping
  24. process:
  25. skip:
  26. plugin: skip_on_empty
  27. source: _address_default_shipping_
  28. method: row
  29. uid:
  30. -
  31. plugin: entity_lookup
  32. source: _email
  33. value_key: mail
  34. entity_type: user
  35. access_check: false
  36. -
  37. plugin: skip_on_empty
  38. method: row
  39. profile_id:
  40. -
  41. plugin: entity_lookup
  42. source: '@uid'
  43. value_key: uid
  44. bundle_key: type
  45. bundle: shipping
  46. entity_type: profile
  47. access_check: false
  48. ignore_case: true
  49. -
  50. plugin: skip_on_empty
  51. method: process
  52. type: constants/bundle
  53. langcode:
  54. plugin: default_value
  55. default_value: und
  56. 'address/langcode': destination_default_langcode
  57. 'address/given_name': firstname
  58. 'address/additions_name': middlename
  59. 'address/family_name': lastname
  60. 'address/organization': company
  61. address_lines:
  62. -
  63. plugin: skip_on_empty
  64. source: street
  65. method: process
  66. -
  67. plugin: explode
  68. delimiter: "\n"
  69. 'address/address_line1': '@address_lines/0'
  70. 'address/address_line2': '@address_lines/1'
  71. 'address/postal_code': postcode
  72. # No equivalent source for sorting_code or dependent_locality.
  73. #'address/sorting_code':
  74. #'address/dependent_locality':
  75. 'address/locality': city
  76. 'address/administrative_area': region
  77. 'address/country_code': country_id
  78. phone: telephone
  79. is_default: _address_default_shipping_
  80. destination:
  81. plugin: 'entity:profile'
  82. destination_module: profile
  83. migration_dependencies:
  84. required:
  85. - magento2_user