You are here

magento2_product_type.yml in Commerce Migrate 3.1.x

modules/magento/migrations/magento2_product_type.yml

File

modules/magento/migrations/magento2_product_type.yml
View source
  1. id: magento2_product_type
  2. label: Magento product type
  3. migration_group: commerce_migrate_magento2
  4. migration_tags:
  5. - Magento 2
  6. - Configuration
  7. source:
  8. plugin: csv
  9. # Change the path and filename to match your source CSV file.
  10. path: 'public://import/magento2-catalog_product_20180326_013553_test.csv'
  11. # Change the enclosure character to suit your source CVS file.
  12. enclosure: "\""
  13. # Change the number of header rows to suit your source CVS file.
  14. header_offset: 0
  15. # Since this is keyed by 'type' the number of rows in the file will probably
  16. # be greater than the number of row processed. Set skip_count true so that
  17. # count check is not used when determining if the migration succeeded. This
  18. # means this migration can be used as a dependency.
  19. skip_count: true
  20. # The key fields attribute and name are set in the row in the source plugin.
  21. ids: [attribute_set_code]
  22. constants:
  23. variation_type: default
  24. line_item_type: product_variations
  25. # Do not generate a title.
  26. generate_title: false
  27. process:
  28. id:
  29. - plugin: skip_on_empty
  30. method: row
  31. source: attribute_set_code
  32. -
  33. plugin: machine_name
  34. exists:
  35. -
  36. plugin: entity_exists
  37. source: '@id'
  38. entity_type: commerce_product_type
  39. -
  40. plugin: callback
  41. callable: is_bool
  42. -
  43. plugin: skip_on_empty
  44. method: row
  45. label: attribute_set_code
  46. description:
  47. plugin: callback
  48. callable: ucfirst
  49. source: attribute_set_code
  50. # help: help
  51. variationType: 'constants/variation_type'
  52. lineItemType: 'constants/line_item_type'
  53. generateTitle: 'constants/false'
  54. injectVariationFields:
  55. plugin: default_value
  56. default_value: 1
  57. destination:
  58. plugin: 'entity:commerce_product_type'
  59. destination_module: commerce_product