I'm migrating legacy data to a new solidus install...
# support
g
I'm migrating legacy data to a new solidus install, and I'm trying to bring over order history. Luckily I'm only working with completed orders, but I'm running into some hurdles. I found the bit that loads the admin with sample data and am working with the snippets that generate orders. The problem that I'm running into is that it looks like it's actually walking through the order process (pulling shipping rates, taxes, etc). Is there another place I can just throw all the info to have it build out an old order with the data I'm bringing over?
j
I typically just construct the orders from scratch. You could look at Solidus Importer for some ideas about how that’s done with Shopify order data as a reference.
g
Oooh, good call, I forgot about the importer. I'll take a look at that, thanks!
sg horns 1
d
If you have really messy data something like this might be in order -> https://github.com/castlery/datashift_solidus
g
I'm coming from Magento, so it's a bit of a mess. I'm trying to combine from multiple table exports into what I can bring into Solidus. I'll definitely take a look
d
Friends dont let friends use magento
magneto 1.x , or 2x?
g
1.x Also can confirm about friends and magento, we're actually using the site I'm working on as a test to see how big of a hassle it is to switch. The goal is to try to convince our clients to eventually migrate.
d
Ok so in 1.0 the product data is using EAV type of schema
there is nothing in the spree/solidus world that knows how to import that schema to the Solidus model as is.
Using datashift you could write code to pull out the product data from the EAV schema and then format it to the format used by spree's importer or just load it directly using datashift
Solidus is for a different kind of store owner that knows what they want to do with an idea of how they want to do it
it is not a competitor to Shopify, Magento or other systems where a "Plugin" solves everything
g
I ended up using the order importer that's built into solidus (don't know how I didn't know about this before when I was importing products) https://github.com/solidusio/solidus/blob/master/core/lib/spree/core/importer/order.rb
I had to restructure my data a little bit, but it was mostly formatted the same as when I was trying to insert the orders myself. Going through this handled all the stuff that I was struggling with.
a
@Given Reed a heads up - use importer carefully because afaik it can create extras in case you make a wrong import and then try to overwrite it i.e. update. Try to remove the faulty imports in case of mistakes and then re-import them to avoid problems. IMO Importer is meant for people who exactly know what they are doing (or maybe we have customized it too much).
g
good to know, thanks!
👍 1
d
@Given Reed nice work. Alot of ugly code though, bu whatever gets teh job done. After all most of this code is throwaway that you only use once.