You are here

magento2_product_variation_type.yml in Commerce Migrate 3.1.x

modules/magento/migrations/magento2_product_variation_type.yml

File

modules/magento/migrations/magento2_product_variation_type.yml
View source
  1. id: magento2_product_variation_type
  2. label: Magento product variation 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. exists:
  29. -
  30. plugin: entity_exists
  31. source: attribute_set_code
  32. entity_type: commerce_product_variation_type
  33. -
  34. plugin: callback
  35. callable: is_bool
  36. -
  37. plugin: skip_on_empty
  38. method: row
  39. id:
  40. - plugin: skip_on_empty
  41. method: row
  42. source: attribute_set_code
  43. -
  44. plugin: machine_name
  45. revision: revision
  46. type: '@id'
  47. label:
  48. plugin: callback
  49. callable: ucfirst
  50. source: attribute_set_code
  51. description:
  52. plugin: callback
  53. callable: ucfirst
  54. source: attribute_set_code
  55. help: help
  56. generateTitle: 'constants/generate_title'
  57. lineItemType: 'constants/line_item_type'
  58. orderItemType:
  59. plugin: default_value
  60. source: line_item_type
  61. default_value: default
  62. destination:
  63. plugin: 'entity:commerce_product_variation_type'
  64. destination_module: commerce_product