Videos

First Look at Commerce Migrate Ubercart

Date Published: 
07/25/2011
Duration: 
13:07

Commerce Migrate is an extension of the excellent Migrate Project allowing its full capabilities to be used with Commerce entities like product, customer profile, etc. Commerce Migrate includes a submodule, Commerce Migrate Ubercart, which can import an Ubercart D6 or D7 database and turn it into a Drupal Commerce store.

In this screencast I give the basics of how to set up a migration.

  1. Read the Commerce Migrate Ubercart README.txt.
  2. Delete all existing product types in your commerce install. If you have products, line items, or orders, make sure they're gone first.
  3. Create a key in the settings.php $databases array that will allow Drupal to connect to the database you will be importing from. This might look like:
    $databases['ubercart']['default'] = array (
      'driver' => 'mysql',
      'database' => 'ubercart',
      'username' => 'root',
      'password' => '',
      'host' => 'localhost',
      'port' => '',
    );
  4. Visit Commerce Migrate Ubercart Options at admin/content/migrate/ubercart_migration_options and enter the information required there. (If the current Drupal install is a D7 Ubercart site, you can just use 'default' as the key. That, however, will make a bit of a mess as you'll have to figure out how to get rid of all the ubercart installation tables and such.)
  5. Visit admin/content/migrate and run the CommerceMigrateUbercartProductType migration, which will create migrations for products and product display nodes.
  6. Run the rest of the migrations, probably in this order: Customer Billing Profile, Product, Node, Order, Line Item