I've recently upgraded a Drupal site from 6 to 7, and now want to migrate from Ubercart to Drupal commerce. The Ubercart upgrade has been completed already just in case.

Ubercart has a module called uc_file that allows files to be assigned to products.

The module has three tables: 1. uc_files: contains the file id (fid) and the name of the file 2. uc_file_products: contains fid, feature product id (fpid), something called pfid, and some other fields for the description, etc. 3. uc_file_users: contains fid, uid, fpid, fuid (?), and other fields.

Has anyone migrated these tables, and if so, what approach did you take? The most important data I need to migrate is the actual line item purchases, so the users will be able to access their purchased downloads.

I have commerce_migrate_ubercart installed, but it doesn't appear to handle the Ubercart File Downloads, which is the entire store.

1 Answer 1


Well as it turns out, no code was needed.

In case anyone runs into this issue, here's what you need to do:

  1. Download the dev version of commerce_migrate_ubercart and apply the payment patch if it hasn't already been applied.
  2. Disable all Ubercart modules
  3. Carefully follow the instructions in the README.txt file. You'll want to migrate every available table starting with products, and working your way to payments (transactions). Save the database early and often along the way.
  4. Download/configure commerce_file and commerce_license.
  5. Be sure you are able to go end-to-end with your cart and download privileged files in your user/uid/my_files tab.
  6. Download/enable commerce_vbo_views and views_bulk_operations
  7. Edit the rule "Activates licenses of an order", and add the event "After updating an existing commerce order".
  8. Go to your Store's order list page, select the desired order states that have completed orders, then select all rows in the table, then click modify order values, and just set the exact same state as selected before. What we're after here is to force a re-save of the order to trigger our rule.
  9. You should now be able to view a user and click the "Files" tab to see their downloads assuming permissions are correctly set and the migration worked.
  10. Edit the rule again to remove the added event and you're done.

Easy peasy :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.