You are here

uc7_profile_billing.yml in Commerce Migrate 3.1.x

modules/ubercart/migrations/uc7_profile_billing.yml

File

modules/ubercart/migrations/uc7_profile_billing.yml
View source
  1. # Ubercart 7 Customer Billing Profile Migration
  2. id: uc7_profile_billing
  3. label: Migrate customer billing profiles from Ubercart
  4. migration_tags:
  5. - Drupal 7
  6. - Ubercart
  7. - Content
  8. source:
  9. plugin: uc_profile_billing
  10. process:
  11. uid:
  12. -
  13. plugin: migration_lookup
  14. migration: d7_user
  15. source: uid
  16. no_stub: true
  17. -
  18. plugin: default_value
  19. default_value: 0
  20. strict: true
  21. -
  22. plugin: entity_exists
  23. entity_type: user
  24. -
  25. plugin: default_value
  26. default_value: 0
  27. # Get the profile id for this uid, if it exists.
  28. profile_id:
  29. -
  30. plugin: entity_lookup
  31. source: '@uid'
  32. value_key: uid
  33. bundle_key: type
  34. bundle: customer
  35. entity_type: profile
  36. access_check: false
  37. ignore_case: true
  38. -
  39. plugin: skip_on_empty
  40. method: process
  41. type:
  42. plugin: default_value
  43. default_value: customer
  44. status: status
  45. is_default: is_default
  46. 'address/given_name': billing_first_name
  47. 'address/family_name': billing_last_name
  48. 'address/organization': billing_company
  49. 'address/address_line1': billing_street1
  50. 'address/address_line2': billing_street2
  51. 'address/locality': billing_city
  52. country:
  53. plugin: skip_on_empty
  54. method: process
  55. source: country_iso_code_2
  56. administrative_area:
  57. plugin: skip_on_empty
  58. method: process
  59. source: zone_code
  60. 'address/administrative_area':
  61. plugin: skip_on_empty
  62. method: process
  63. source: '@administrative_area'
  64. 'address/postal_code': billing_postal_code
  65. 'address/country_code': '@country'
  66. phone: billing_phone
  67. created: created
  68. changed: modified
  69. destination:
  70. plugin: 'entity:profile'
  71. destination_module: profile
  72. migration_dependencies:
  73. required:
  74. - d7_user
  75. - uc7_profile_type_customer