commerce_export-8.x-1.0-alpha1/config/install/migrate_plus.migration.import_paragraph_cta.yml

config/install/migrate_plus.migration.import_paragraph_cta.yml
# Import a Call to Action paragraph type.
#
# Import two paragraph entities with Call to Action information. The paragraoh
# entity has 3 fields, title, link and image.
#
# Destination site configuration:
#   - Install the Paragraph Module.
#   - Create a paragraph type with three fields, a link, a title and an image.
#
id: import_paragraph_cta
label: Paragraph cta
migration_group: commerce_export
source:
  plugin: product_cta_csv
  path: 'public://import/product.csv'
  header_row_count: 1
  enclosure: '"'
  keys:
    - cta_title
  column_names:
    0:
      title: Title
    1:
      sku: SKU
    39:
      cta_title1: 'CTA title 1'
    40:
      cta_link1: 'CTA link 1'
    41:
      cta_image1: 'CTA product image 1'
    42:
      cta_title2: 'CTA title 2'
    43:
      cta_link2: 'CTA link 2'
    44:
      cta_image2: 'CTA product image 2'
process:
  # Text (plain), single value.
  field_cta_title: cta_title
  # Link field, single value.
  field_cta_link: cta_link
  # A single valued image field. Use migration_lookup to ensure the post migration fid for this file is used.
  field_product_cta_image:
    plugin: migration_lookup
    migration: import_image
    source:
      - sku
      - cta_image
destination:
  plugin: 'entity_reference_revisions:paragraph'
  default_bundle: product_cta
migration_dependencies:
  required:
    - import_image

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc