You are here

csv_example_paragraph_cta.yml in Commerce Migrate 3.1.x

modules/csv_example/migrations/csv_example_paragraph_cta.yml

File

modules/csv_example/migrations/csv_example_paragraph_cta.yml
View source
  1. # Import a Call to Action paragraph type.
  2. #
  3. # Import two paragraph entities with Call to Action information. The paragraph
  4. # entity has 3 fields, title, link and image.
  5. #
  6. # Destination site configuration:
  7. # - Install the Paragraph Module.
  8. # - Create a paragraph type with three fields, a link, a title and an image.
  9. #
  10. id: csv_example_paragraph_cta
  11. label: Paragraph cta
  12. migration_group: commerce_migrate_csv_example
  13. migration_tags:
  14. - Commerce CSV
  15. - Content
  16. source:
  17. plugin: csv_example_product_cta
  18. path: 'public://import/example-products.csv'
  19. enclosure: "\""
  20. header_offset: 0
  21. ids: [cta_title]
  22. fields:
  23. - name: title
  24. label: Title
  25. - name: sku
  26. label: SKU
  27. - name: status
  28. label: Status
  29. - name: product_type
  30. label: Product type
  31. - name: description
  32. label: Description
  33. - name: product_variation_type
  34. label: Product variation type
  35. - name: sell_price
  36. label: Sell price
  37. - name: vocabulary_name1
  38. label: Vocabulary1
  39. - name: term1
  40. label: Vocabulary value1
  41. - name: vocabulary_name2
  42. label: Vocabulary2
  43. - name: term2
  44. label: Vocabulary value2
  45. - name: vocabulary_name3
  46. label: Vocabulary3
  47. - name: term3
  48. label: Vocabulary value3
  49. - name: attribute_name1
  50. label: Attribute name1
  51. - name: attribute_value1
  52. label: Attribute value1
  53. - name: attribute_name2
  54. label: Attribute name2
  55. - name: attribute_value2
  56. label: Attribute value2
  57. - name: attribute_name3
  58. label: Attribute name3
  59. - name: attribute_value3
  60. label: Attribute value3
  61. - name: attribute_name4
  62. label: Attribute name4
  63. - name: attribute_value4
  64. label: Attribute value4
  65. - name: related1
  66. label: SKU of Related item 1
  67. - name: related2
  68. label: SKU of Related item 2
  69. - name: related3
  70. label: SKU of Related item 3
  71. - name: image1
  72. label: Image 1
  73. - name: image2
  74. label: Image 2
  75. - name: image3
  76. label: Image 3
  77. - name: video1
  78. label: Video 1
  79. - name: thumbnail1
  80. label: Thumbnail 1
  81. - name: video2
  82. label: Video 2
  83. - name: thumbnail2
  84. label: Thumbnail 2
  85. - name: video3
  86. label: Video 3
  87. - name: thumbnail3
  88. label: Thumbnail 3
  89. - name: tab_title1
  90. label: Tab title 1
  91. - name: tab_content1
  92. label: Tab content 1
  93. - name: tab_cta1
  94. label: Associated tab CTA 1
  95. - name: tab_title2
  96. label: Tab title 2
  97. - name: tab_content2
  98. label: Tab content 2
  99. - name: tab_cta2
  100. label: Associated tab CTA 2
  101. - name: cta_title1
  102. label: CTA title 1
  103. - name: cta_link1
  104. label: CTA link 1
  105. - name: cta_image1
  106. label: CTA product image 1
  107. - name: cta_title2
  108. label: CTA title 2
  109. - name: cta_link2
  110. label: CTA link 2
  111. - name: cta_image2
  112. label: CTA product image 2
  113. process:
  114. # Text (plain), single value.
  115. field_cta_title: cta_title
  116. # Link field, single value.
  117. field_cta_link: cta_link
  118. # A single valued image field. Use migration_lookup to ensure the post migration fid for this file is used.
  119. field_product_cta_image:
  120. plugin: migration_lookup
  121. migration: csv_example_image
  122. source:
  123. - sku
  124. - cta_image
  125. destination:
  126. plugin: 'entity_reference_revisions:paragraph'
  127. default_bundle: product_cta
  128. migration_dependencies:
  129. required:
  130. - csv_example_image