2

We have to migrate a CSV dump from a Drupal commerce shop to Craft Commerce.

It is important to import ‘Order Email’ / ‘Username’, ‘Order Date’, ‘Ordered Items’ (Name or ID), ‘Item Price’. Address etc. are not relevant. An Order Reference could be generated automatically from us.

If these are not enough fields for a Craft Commerce order: Which mandatory fields does an order require in Commerce?

Anyone know if there is a way to do this? We would of course love to do it with the FeedMe plugin, but that does not seem to be applicable to Craft Commerce orders.

4

Sprout Import supports importing Craft Commerce Orders on Craft 3.

I can't speak to which fields are required off of the top of my head but importing to custom fields, variants, and even custom fields like Matrix on Variant Layouts is possible. Any required fields you don't include will throw an error and tell you they are needed.

An example of the Orders import format is available in the Element Importer docs.

Sprout Import uses a specific JSON format to perform imports so you will need to convert your CSV export into the appropriate JSON format to import if you choose to go this route.

|improve this answer|||||
  • Thanks a lot Ben, Sprout Import looks good. I do get a failure using the example import from the Documents, though. Seems like orderLangauage is missing in your example: 2018-09-07 13:43:49 [-][-][-][error][sprout-import] Unable to run Sprout Import job. 2018-09-07 13:43:49 [-][-][-][error][sprout-import] SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'orderLanguage' cannot be null – HendrikEng Sep 7 '18 at 11:46
  • I added orderLanguage to the Json but it still fails with: 2018-09-07 13:47:34 [-][-][-][info][yii\db\Command::execute] UPDATE `queue` SET `fail`=1, `dateFailed`='2018-09-07 11:47:34', `error`='SQLSTATE[23000]: Integrity constraint violation: 1048 Column \'orderLanguage\' – HendrikEng Sep 7 '18 at 11:48
  • Can you open a ticket for any issues you run into (github.com/barrelstrength/craft-sprout-import/issues)? Craft Commerce is still in beta and our examples have to be general as often specific import situations require different IDs depending on how you have things setup, but these specific implementation questions get away from the original question here. – Ben Parizek Sep 7 '18 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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