commerce1_order.yml in Commerce Migrate 3.0.x
Same filename and directory in other branches
modules/commerce/migrations/commerce1_order.yml
File
modules/commerce/migrations/commerce1_order.ymlView source
- id: commerce1_order
- label: Commerce order
- migration_tags:
- - Drupal 7
- - Commerce
- - Content
- class: Drupal\commerce_migrate_commerce\Plugin\migrate\Order
- source:
- plugin: commerce1_order
- process:
- # If you are using this file to build a custom migration consider removing
- # the order_id field to allow incremental migrations.
- order_id: order_id
- order_number: order_number
- revision_id: revision_id
- type:
- plugin: static_map
- source: type
- default_value: default
- map:
- commerce_order: default
- uid: uid
- ip_address: hostname
- state:
- plugin: static_map
- source: status
- map:
- checkout_checkout: draft
- checkout_review: draft
- checkout_payment: draft
- checkout_complete: draft
- cart: draft
- canceled: canceled
- # If you are using validation change 'completed' to 'validation' for the
- # pending and processing states.
- pending: completed
- processing: completed
- completed: completed
- cart:
- plugin: static_map
- source: status
- default_value: false
- map:
- cart: true
- created: created
- changed: changed
- # Set the placed time only if not draft or cancelled.
- placed:
- -
- plugin: skip_on_value
- method: process
- source: '@state'
- value:
- - draft
- - cancelled
- -
- plugin: get
- source: created
- # Set the completed time only if completed
- completed:
- -
- plugin: skip_on_value
- method: process
- not_equals: true
- source: '@state'
- value: completed
- -
- plugin: get
- source: changed
- mail: mail
- # Do not refresh the order during migration.
- data/refresh_state: refresh_state
- store_id:
- plugin: default_value
- source: default_store_id
- default_value: 1
- adjustments:
- -
- plugin: commerce1_order_adjustment_shipping
- source: shipping_line_items
- -
- plugin: commerce_adjustments
- destination:
- plugin: 'entity:commerce_order'
- destination_module: commerce_order
- migration_dependencies:
- required:
- - commerce1_order_item
- - commerce1_profile
- optional:
- - d7_field_instance