You are here

shopify_product_type.yml in Commerce Migrate 8.2

modules/shopify/migrations/shopify_product_type.yml

File

modules/shopify/migrations/shopify_product_type.yml
View source
  1. id: shopify_product_type
  2. label: Shopify product type
  3. migration_group: commerce_migrate_shopify
  4. migration_tags:
  5. - Shopify
  6. - Configuration
  7. source:
  8. # Uses a custom source plugin to yield the attribute values.
  9. plugin: csv
  10. # Change the path and filename to match your source CSV file.
  11. path: 'public://import/shopify-products_export_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: [type]
  18. fields:
  19. - name: handle
  20. label: Handle
  21. - name: title
  22. label: Title
  23. - name: body
  24. label: Body (HTML)
  25. - name: vendor
  26. label: Vendor
  27. - name: type
  28. label: Type
  29. constants:
  30. variation_type: default
  31. line_item_type: product_variations
  32. # Do not generate a title.
  33. generate_title: false
  34. process:
  35. id:
  36. - plugin: skip_on_empty
  37. method: row
  38. source: type
  39. -
  40. plugin: machine_name
  41. exists:
  42. -
  43. plugin: entity_exists
  44. source: '@id'
  45. entity_type: commerce_product_type
  46. -
  47. plugin: callback
  48. callable: is_bool
  49. -
  50. plugin: skip_on_empty
  51. method: row
  52. label: type
  53. # description: description
  54. # help: help
  55. variationType: 'constants/variation_type'
  56. lineItemType: 'constants/line_item_type'
  57. generateTitle: 'constants/false'
  58. injectVariationFields:
  59. plugin: default_value
  60. default_value: 1
  61. destination:
  62. plugin: 'entity:commerce_product_type'
  63. destination_module: commerce_product