You are here

magento2_product.yml in Commerce Migrate 3.0.x

modules/magento/migrations/magento2_product.yml

File

modules/magento/migrations/magento2_product.yml
View source
  1. id: magento2_product
  2. label: Product
  3. migration_group: commerce_migrate_magento2
  4. migration_tags:
  5. - Magento 2
  6. - Content
  7. source:
  8. # Uses a custom source plugin to yield the attribute values.
  9. plugin: product_csv
  10. # Change the path and filename to match your source CSV file.
  11. path: 'public://import/magento2-catalog_product_20180326_013553_test.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. # The key fields attribute and name are set in the row in the source plugin.
  17. ids: [sku]
  18. process:
  19. title: name
  20. # Using default as the fallback product type.
  21. type:
  22. -
  23. plugin: migration_lookup
  24. migration: magento2_product_type
  25. source: attribute_set_code
  26. -
  27. plugin: default_value
  28. default_value: default
  29. # Set products to be owned by uid 1. This can be changed to suit your needs.
  30. uid:
  31. plugin: default_value
  32. default_value: 1
  33. 'body/format':
  34. plugin: default_value
  35. default_value: basic_html
  36. 'body/value': description
  37. 'body/summary': short_description
  38. # The Enabled product field is not exported in the product CSV, assume
  39. # published.
  40. status:
  41. plugin: default_value
  42. default_value: 1
  43. # Use store 1 as the default store.
  44. stores/target_id:
  45. plugin: default_value
  46. default_value: 1
  47. created:
  48. -
  49. plugin: explode
  50. delimiter: ','
  51. source: created_at
  52. -
  53. plugin: concat
  54. -
  55. plugin: format_date
  56. from_format: 'n/d/y g:i A'
  57. to_format: U
  58. changed:
  59. -
  60. plugin: explode
  61. delimiter: ','
  62. source: updated_at
  63. -
  64. plugin: concat
  65. -
  66. plugin: format_date
  67. from_format: 'n/d/y g:i A'
  68. to_format: U
  69. variations:
  70. plugin: migration_lookup
  71. migration: magento2_product_variation
  72. source: variations
  73. destination:
  74. plugin: 'entity:commerce_product'
  75. destination_module: commerce_product
  76. migration_dependencies:
  77. required:
  78. - magento2_product_type
  79. - magento2_product_variation