1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- # Migrates role purchase licenses from UC Roles module.
- # This is incomplete and is specificaly created for materio.
- id: d7_uc_roles_license
- label: License from D7 Ubercart Roles.
- migration_group: d7_materio
- migration_tags:
- - Drupal 7
- - Ubercart
- - Materio
- source:
- plugin: d7_uc_license_role
- destination:
- plugin: entity:commerce_license
- destination_module: commerce_license
- process:
- type:
- # Migrate into the role license type.
- plugin: default_value
- default_value: role
- uid:
- -
- plugin: skip_on_empty
- method: row
- source: uid
- -
- plugin: migration_lookup
- migration: d7_users
- # source: uid
- no_stub: true
- # state:
- # plugin: default_value
- # default_value: active
- state: state
- created: created
- granted: created
- renewed: renewed
- changed: renewed
- license_role:
- plugin: static_map
- source: rid
- map:
- 6: adherent
- 10: student
- expiration_type:
- # This assumes Commerce Recurring is used with licenses.
- plugin: default_value
- default_value:
- target_plugin_id: rolling_interval
- target_plugin_configuration:
- interval:
- interval: 1
- period: year
- # array (
- # 'interval' => array (
- # 'interval' => '6',
- # 'period' => 'month',
- # ),
- # )
- # expires:
- # # This assumes Commerce Recurring is used with licenses.
- # plugin: default_value
- # default_value: 0
- expires: expiration
- # product_variation:
- # plugin: migration_lookup
- # migration: # your product variation migration
- # source: nid
- product_variation:
- plugin: static_map
- source: rid
- map:
- 6: 2 # web annual
- 10: 7 # web annual student
- migration_dependencies:
- required:
- - d7_users
- optional: {}
- dependencies:
- enforced:
- module:
- - commerce_product
- - commerce_license
|