Migrate commerce_order__order_items from CSV information

I am writing a customized migration module from a legacy system. I’ve all of my orders and order objects being migrated, however Drupal Developer commerce_order__order_items desk shouldn’t be being populated.

My orders migration:

id: my_order_data label: My orders migration_group: mygroup migration_tags:   - kentico   - orders supply:   plugin: csv   ids: [OrderID]   path: 'public://import/program/orders.information.csv'   header_row_count: 1 course of:   order_number: OrderInvoiceNumber   sort:     plugin: static_map     supply: sort     default_value: default     map:       commerce_order: default   uid:     -       plugin: migration_lookup       migration: my_user_data       supply: OrderCreatedByUserID       no_stub: true     -       plugin: default_value       default_value: 0       strict: true     -       plugin: entity_exists       entity_type: consumer     -       plugin: default_value       default_value: 0   state:     plugin: default_value     default_value: accomplished   created:     plugin: callback     supply: OrderDate     callable: strtotime   modified:     plugin: callback     supply: OrderLastModified     callable: strtotime   positioned:     plugin: callback     supply: OrderDate     callable: strtotime   accomplished:     plugin: callback     supply: OrderDate     callable: strtotime   mail: CustomerEmail   store_id:     plugin: default_value     default_value: 1   billing_profile_data:     -       plugin: migration_lookup       migration: my_profile_data       supply: OrderBillingAddressID       no_stub: true   billing_profile/target_id:     -       plugin: skip_on_empty       technique: course of       supply: '@billing_profile_data'     -       plugin: extract       index: [0]   billing_profile/target_revision_id:     -       plugin: skip_on_empty       technique: course of       supply: '@billing_profile_data'     -       plugin: extract       index: [0]   total_price/quantity: OrderTotalNumber   total_price/currency_code:     plugin: default_value     default_value: 'USD'   total_paid/quantity: OrderTotalNumber   total_paid/currency_code:     plugin: default_value     default_value: 'USD'   changes:     plugin: my_order_adjustment_shipping vacation spot:   plugin: entity:commerce_order   destination_module: commerce_order migration_dependencies:   required:     - my_user_data     - my_profile_data dependencies:   enforced:     module:       - my_migration 

My order objects:

id: my_order_item_data label: My order objects migration_group: mygroup migration_tags:   - kentico   - orders   - objects supply:   plugin: csv   ids: [OrderItemID]   path: 'public://import/program/order-items.information.csv'   header_row_count: 1 course of:   sort:     plugin: default_value     default_value: 'default'   order_id:     -       plugin: migration_lookup       migration: my_order_data       supply: OrderItemOrderID       no_stub: true     -       plugin: default_value       default_value: 0       strict: true     -       plugin: entity_exists       entity_type: commerce_order     -       plugin: default_value       default_value: 0   purchased_entity:     bar:       plugin: static_map       supply: OrderItemSKUID       map:         377: 67         378: 66         ...       default_value: 0   title: OrderItemSKUName   amount: OrderItemUnitCount   unit_price/quantity: OrderItemUnitPrice   unit_price/currency_code:     plugin: default_value     default_value: 'USD'   total_price/quantity: OrderItemTotalPriceInMainCurrency   total_price/currency_code:     plugin: default_value     default_value: 'USD'   created:     plugin: callback     supply: OrderItemLastModified     callable: strtotime   modified:     plugin: callback     supply: OrderItemLastModified     callable: strtotime   uses_legacy_adjustments:     plugin: default_value     default_value: false vacation spot:   plugin: entity:commerce_order_item   destination_module: commerce_order migration_dependencies:   required:     - my_order_data dependencies:   enforced:     module:       - my_migration 

I’ve tried to look into customized course of capabilities, however I am afraid I do not know the place to essentially begin with that. Drupal Development Service commerce migrate module is not terribly useful with it is CSV instance.

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

Migrate commerce_order__order_items from CSV information

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.