One thing that I would like to support is migrating from WooCommerce into Drupal Commerce. There are two possible ways this would happen
- Direct database migration from WordPress to Drupal
- WordPress XML exports
As pointed out on Twitter (https://twitter.com/daggerhart/status/861416550099820545), WooCommerce provides dummy data imports on https://docs.woocommerce.com/document/importing-woocommerce-dummy-data/.
The first way forward is to export a WooCommerce site with the imported data using the db-tools.php script. Get tests going, and rock that out.
A follow up would be great to provide an XML source plugin (from https://www.drupal.org/project/migrate_plus) to migrate WooCommerce. However that might fall into the large WP -> Drupal scope.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2876446-2.patch | 992.63 KB | quietone |
Comments
Comment #2
quietone CreditAttribution: quietone commentedMade a test fixture using the woocommerce dummy data and put in a new module.
Comment #4
mglamanWoo! Excited to see this get started. I wonder, though, if we might end up running into duplicate efforts with generic WordPress migration (everything is posts)
Comment #5
quietone CreditAttribution: quietone commentedUnfortunately this fixture doesn't load
Comment #6
quietone CreditAttribution: quietone commentedBoth the Woocommerce and the magento test fixture fail to load in the usual way. That is, they were created in the same way as the Drupal 6 and 7 test fixtures in core. And that is the problem, db-tools and the the load method expect a Drupal db. So, we need to do something different.
Talked to phenaproxima about this in #drupal-migrate, He suggested a temporary hack where the db is dumped with mysqldump and then loaded via by reading the entire SQL file into memory with file_get_contents() and call db_query().
db_query(file_get_contents('fixture.sql'))
So, I am going to try that here.
A new issue has been created for the wider issue of loading non Drupal db test fixtures, #2894055: Creating and loading non drupal db test fixtures.
Comment #7
quietone CreditAttribution: quietone commentedNo, does work. Even tried reading it line by line, as in, https://stackoverflow.com/questions/18559875/php-mysqldump-file-import. But it fails on inserting serialized data.
Comment #8
quietone CreditAttribution: quietone commentedLet's revert this.
Comment #9
heddnDoes this still need a revert?
Comment #10
quietone CreditAttribution: quietone at Acro Commerce commentedYes, it contains a WooCommerce test fixture that we can't load.
Any work on solving that is in #2894055: Creating and loading non drupal db test fixtures.
Comment #11
quietone CreditAttribution: quietone at Acro Commerce commentedYes, this needs a revert.
Comment #13
quietone CreditAttribution: quietone at Acro Commerce commented